mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +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();
|
||||
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 {
|
||||
result = api.action("query")
|
||||
.param("format", "xml")
|
||||
|
|
@ -47,7 +47,7 @@ public class ExistingFileAsync extends AsyncTask<Void, Void, Boolean> {
|
|||
} catch (IOException e) {
|
||||
Log.e(TAG, "IO Exception: ", e);
|
||||
//Return empty arraylist
|
||||
return items;
|
||||
return false;
|
||||
}
|
||||
|
||||
ArrayList<ApiResult> categoryNodes = result.getNodes("/api/query/search/p/@title");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue