mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 13:53:54 +01:00
Review category issues (#4897)
* Ask for category only if exists in Peer Review * Minor Fixes * Fixed wrong categories issue * Added comments * Added comments * Minor Changes * Added test * Tests * Tests * Tests
This commit is contained in:
parent
7bc78f67ff
commit
103e2d546e
9 changed files with 171 additions and 13 deletions
|
|
@ -3,7 +3,6 @@ package fr.free.nrw.commons.media;
|
|||
import io.reactivex.Single;
|
||||
import java.util.Map;
|
||||
import org.wikipedia.dataclient.mwapi.MwQueryResponse;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
import retrofit2.http.QueryMap;
|
||||
|
|
@ -16,6 +15,13 @@ public interface MediaInterface {
|
|||
"&iiextmetadatafilter=DateTime|Categories|GPSLatitude|GPSLongitude|ImageDescription|DateTimeOriginal" +
|
||||
"|Artist|LicenseShortName|LicenseUrl";
|
||||
|
||||
/**
|
||||
* fetches category detail(title, hidden) for each category along with File information
|
||||
*/
|
||||
String MEDIA_PARAMS_WITH_CATEGORY_DETAILS ="&clprop=hidden&prop=categories|imageinfo&iiprop=url|extmetadata|user&&iiurlwidth=640" +
|
||||
"&iiextmetadatafilter=DateTime|GPSLatitude|GPSLongitude|ImageDescription|DateTimeOriginal" +
|
||||
"|Artist|LicenseShortName|LicenseUrl";
|
||||
|
||||
/**
|
||||
* Checks if a page exists or not.
|
||||
*
|
||||
|
|
@ -81,7 +87,7 @@ public interface MediaInterface {
|
|||
* @return
|
||||
*/
|
||||
@GET("w/api.php?action=query&format=json&formatversion=2" +
|
||||
MEDIA_PARAMS)
|
||||
MEDIA_PARAMS_WITH_CATEGORY_DETAILS)
|
||||
Single<MwQueryResponse> getMedia(@Query("titles") String title);
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue