mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Add xml format
This commit is contained in:
parent
a2b3be5959
commit
9721472c4c
1 changed files with 2 additions and 2 deletions
|
|
@ -36,7 +36,7 @@ public class ExistingFileAsync extends AsyncTask<Void, Void, Boolean> {
|
||||||
MWApi api = CommonsApplication.createMWApi();
|
MWApi api = CommonsApplication.createMWApi();
|
||||||
ApiResult result;
|
ApiResult result;
|
||||||
|
|
||||||
// https://commons.wikimedia.org/w/api.php?action=query&list=allimages&aisha1=801957214aba50cb63bb6eb1b0effa50188900ba
|
// https://commons.wikimedia.org/w/api.php?action=query&list=allimages&format=xml&aisha1=801957214aba50cb63bb6eb1b0effa50188900ba
|
||||||
try {
|
try {
|
||||||
result = api.action("query")
|
result = api.action("query")
|
||||||
.param("format", "xml")
|
.param("format", "xml")
|
||||||
|
|
@ -47,7 +47,7 @@ public class ExistingFileAsync extends AsyncTask<Void, Void, Boolean> {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Log.e(TAG, "IO Exception: ", e);
|
Log.e(TAG, "IO Exception: ", e);
|
||||||
//Return empty arraylist
|
//Return empty arraylist
|
||||||
return items;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ArrayList<ApiResult> categoryNodes = result.getNodes("/api/query/search/p/@title");
|
ArrayList<ApiResult> categoryNodes = result.getNodes("/api/query/search/p/@title");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue