mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
fixes - #3559 - Failed to send thanks" notification, but thank actually sent successfully
I create another Model Class->"MwThankPostResponse.java" to store the Result of Post Request POST(MW_API_PREFIX+"action=thank")
This commit is contained in:
parent
8384ad03dc
commit
944bede42d
3 changed files with 41 additions and 2 deletions
|
|
@ -11,6 +11,7 @@ import org.wikipedia.dataclient.mwapi.SiteMatrix;
|
|||
import org.wikipedia.dataclient.mwapi.page.MwMobileViewPageLead;
|
||||
import org.wikipedia.dataclient.mwapi.page.MwMobileViewPageRemaining;
|
||||
import org.wikipedia.dataclient.mwapi.page.MwQueryPageSummary;
|
||||
import org.wikipedia.dataclient.mwapi.page.MwThankPostResponse;
|
||||
import org.wikipedia.edit.Edit;
|
||||
import org.wikipedia.edit.preview.EditPreview;
|
||||
import org.wikipedia.login.LoginClient;
|
||||
|
|
@ -192,7 +193,7 @@ public interface Service {
|
|||
|
||||
@FormUrlEncoded
|
||||
@POST(MW_API_PREFIX + "action=thank")
|
||||
@NonNull Observable<MwPostResponse> thank(@Nullable @Field("rev") String rev,
|
||||
@NonNull Observable<MwThankPostResponse> thank(@Nullable @Field("rev") String rev,
|
||||
@Nullable @Field("log") String log,
|
||||
@NonNull @Field("token") String token,
|
||||
@Nullable @Field("source") String source);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
package org.wikipedia.dataclient.mwapi.page;
|
||||
|
||||
|
||||
import org.wikipedia.dataclient.mwapi.MwResponse;
|
||||
|
||||
public class MwThankPostResponse extends MwResponse {
|
||||
private Result result;
|
||||
|
||||
public Result getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(Result result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public class Result {
|
||||
private Integer success;
|
||||
private String recipient;
|
||||
|
||||
public Integer getSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(Integer success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
public String getRecipient() {
|
||||
return recipient;
|
||||
}
|
||||
|
||||
public void setRecipient(String recipient) {
|
||||
this.recipient = recipient;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue