mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 22:03:55 +01:00
Consistent api interfaces (#5530)
* Converted CategoryInterface to kotlin * Converted DepictsInterface to kotlin * Convert the MediaDetailInterface to kotlin * Convert MediaInterface to kotlin * Convert ReviewInterface to kotlin * Convert the UserInterface to kotlin * Convert the WikiBaseInterface to kotlin * Convert WikidataInterface to kotlin * Convert WikidataMediaInterface to kotlin * Convert UploadInterface to kotlin
This commit is contained in:
parent
c6cb97e199
commit
f9090b0c2c
20 changed files with 535 additions and 524 deletions
|
|
@ -1,16 +1,14 @@
|
|||
package fr.free.nrw.commons.review;
|
||||
package fr.free.nrw.commons.review
|
||||
|
||||
import fr.free.nrw.commons.wikidata.mwapi.MwQueryResponse;
|
||||
|
||||
import io.reactivex.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
import fr.free.nrw.commons.wikidata.mwapi.MwQueryResponse
|
||||
import io.reactivex.Observable
|
||||
import retrofit2.http.GET
|
||||
import retrofit2.http.Query
|
||||
|
||||
/**
|
||||
* Interface class for peer review calls
|
||||
*/
|
||||
public interface ReviewInterface {
|
||||
|
||||
interface ReviewInterface {
|
||||
/**
|
||||
* Fetch recent changes from MediaWiki API
|
||||
* Calls the API for the latest 50 changes (the default limit is 10)
|
||||
|
|
@ -21,11 +19,11 @@ public interface ReviewInterface {
|
|||
*
|
||||
*/
|
||||
@GET("w/api.php?action=query&format=json&formatversion=2&generator=categorymembers&gcmtype=file&gcmsort=timestamp&gcmdir=desc&gcmtitle=Category:Uploaded_with_Mobile/Android&gcmlimit=50")
|
||||
Observable<MwQueryResponse> getRecentChanges();
|
||||
fun getRecentChanges(): Observable<MwQueryResponse>
|
||||
|
||||
@GET("w/api.php?action=query&format=json&formatversion=2&prop=revisions&rvprop=timestamp|ids|user&rvdir=newer&rvlimit=1")
|
||||
Observable<MwQueryResponse> getFirstRevisionOfFile(@Query("titles") String titles);
|
||||
fun getFirstRevisionOfFile(@Query("titles") titles: String?): Observable<MwQueryResponse>
|
||||
|
||||
@GET("w/api.php?action=query&format=json&formatversion=2&prop=fileusage|globalusage")
|
||||
Observable<MwQueryResponse> getGlobalUsageInfo(@Query("titles") String title);
|
||||
fun getGlobalUsageInfo(@Query("titles") title: String?): Observable<MwQueryResponse>
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue