Skip to content
This repository has been archived by the owner on Apr 16, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:wikimedia/wikimedia-android-data-…
Browse files Browse the repository at this point in the history
…client
  • Loading branch information
dbrant committed Jun 7, 2019
2 parents 290dc9e + 4c81067 commit a003aa2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/wikipedia/dataclient/Service.java
Original file line number Diff line number Diff line change
Expand Up @@ -304,15 +304,15 @@ public interface Service {
@FormUrlEncoded
@Headers("Cache-Control: no-cache")
@POST(MW_API_PREFIX + "action=edit&nocreate=")
@NonNull Call<Edit> postAppendEdit(@NonNull @Field("title") String title,
@NonNull Observable<Edit> postAppendEdit(@NonNull @Field("title") String title,
@NonNull @Field("summary") String summary,
@NonNull @Field("appendtext") String text,
@NonNull @Field("token") String token);

@FormUrlEncoded
@Headers("Cache-Control: no-cache")
@POST(MW_API_PREFIX + "action=edit&nocreate=")
@NonNull Call<Edit> postPrependEdit(@NonNull @Field("title") String title,
@NonNull Observable<Edit> postPrependEdit(@NonNull @Field("title") String title,
@NonNull @Field("summary") String summary,
@NonNull @Field("prependtext") String text,
@NonNull @Field("token") String token);
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/org/wikipedia/edit/Edit.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
public class Edit extends MwPostResponse {
@SuppressWarnings("unused,") @Nullable private Result edit;

@Nullable Result edit() {
public @Nullable Result edit() {
return edit;
}

boolean hasEditResult() {
return edit != null;
}

class Result {
public class Result {
@SuppressWarnings("unused") @Nullable private String result;
@SuppressWarnings("unused") private int newrevid;
@SuppressWarnings("unused") @Nullable private Captcha captcha;
Expand All @@ -28,35 +28,35 @@ class Result {
return result;
}

int newRevId() {
public int newRevId() {
return newrevid;
}

boolean editSucceeded() {
public boolean editSucceeded() {
return "Success".equals(result);
}

@Nullable String captchaId() {
return captcha == null ? null : captcha.id();
}

boolean hasEditErrorCode() {
public boolean hasEditErrorCode() {
return code != null;
}

boolean hasCaptchaResponse() {
return captcha != null;
}

@Nullable String code() {
public @Nullable String code() {
return code;
}

@Nullable String info() {
public @Nullable String info() {
return info;
}

@Nullable String warning() {
public @Nullable String warning() {
return warning;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public long revID() {
return contents;
}

@NonNull Date getTimestamp() {
@NonNull public Date getTimestamp() {
return timestamp != null ? timestamp.date() : new Date();
}

Expand Down

0 comments on commit a003aa2

Please sign in to comment.