mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Add commons API query as comment
This commit is contained in:
parent
49ee084c31
commit
9b2b3c7861
2 changed files with 4 additions and 3 deletions
|
|
@ -38,7 +38,8 @@ public class ExistingFileAsync extends AsyncTask<Void, Void, ArrayList<String>>
|
||||||
|
|
||||||
ArrayList<String> items = new ArrayList<>();
|
ArrayList<String> items = new ArrayList<>();
|
||||||
|
|
||||||
//URL https://commons.wikimedia.org/w/api.php?action=query&format=xml&list=search&srwhat=text&srenablerewrites=1&srnamespace=14&srlimit=10&srsearch=
|
// https://commons.wikimedia.org/w/api.php?action=query&list=allimages&aisha1=801957214aba50cb63bb6eb1b0effa50188900ba
|
||||||
|
|
||||||
try {
|
try {
|
||||||
result = api.action("query")
|
result = api.action("query")
|
||||||
.param("format", "xml")
|
.param("format", "xml")
|
||||||
|
|
|
||||||
|
|
@ -249,7 +249,7 @@ public class ShareActivity
|
||||||
String fileSHA1 = Utils.getSHA1(inputStream);
|
String fileSHA1 = Utils.getSHA1(inputStream);
|
||||||
|
|
||||||
//FIXME: Replace hardcoded string with call to Commons API instead (use TitleCategories.java as template)
|
//FIXME: Replace hardcoded string with call to Commons API instead (use TitleCategories.java as template)
|
||||||
// https://commons.wikimedia.org/w/api.php?action=query&list=allimages&aisha1=801957214aba50cb63bb6eb1b0effa50188900ba
|
|
||||||
ExistingFileAsync fileAsyncTask = new ExistingFileAsync(fileSHA1);
|
ExistingFileAsync fileAsyncTask = new ExistingFileAsync(fileSHA1);
|
||||||
fileAsyncTask.execute(url1, url2, url3);
|
fileAsyncTask.execute(url1, url2, url3);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue