Context
This is "dummy" API spec for us to comment and discuss over for the task API which will enable image recommendations for both Android and Growth.
- As a mobile reader (familiar with editing on my device)
- When I am reading an article with no images
- I want to see any image(s) that could be used to illustrate the article,
- so that I can both gain a better understanding of the topic, as well as contribute to helping others who read the article in future.
Scenarios
Provide a list of tasks of type "add image" or the "Jane Goodall" page on English Wikipedia
URI: https://api.wikimedia.org/tasks/v1/wikipedia/en/task
GET Request
The following parameters could be inlined... just formatting as a request payload for now
{
"page_title": "Jane Goodall",
"type": "add_image",
"limit": 10 //default set to 100?
}Response
{
"tasks":[
{
"id": "36f270fd-8f87-4ce9-ba03-19488fb86843",
"type": "add_image",
"page":{
"id": 9458,
"title": "Jane Goodall",
"wiki": "enwikipedia"
},
"images": [
{
"wiki": "commonswiki",
"file": "File:Jane Goodall at TEDGlobal 2007.jpg"
},
{
"wiki": "commonswiki",
"file": "File:Jane Goodall 2015.jpg"
},
{
"wiki": "commonswiki",
"file": "File:Jane Goodall at RS Hungary.JPG"
}
]
}
]
}User adds the suggested image to the page and completes the task
URI: https://api.wikimedia.org/tasks/v1/wikipedia/en/task/{task_id}
POST Request
{
"decision": <"Rejected", "Accepted", "Skipped">
"user": ?
"reason":
}Response
200
User skips the task with no reason provided
URI: https://api.wikimedia.org/tasks/v1/wikipedia/en/task/{task_id}
POST Request
{
"decision": <"Rejected", "Accepted", "Skipped">
"user": ?
"reason":
}Response
200
Acceptance Criteria
- Agree upon what our initial API spec will be for the Android implementation of image recommendations using the Task API