apps-android-commons icon indicating copy to clipboard operation
apps-android-commons copied to clipboard

Prepare an API behavior document for all the APIs used by the app

Open maskaravivek opened this issue 5 years ago • 12 comments

Summary:

The commons app uses quite a few MediaWiki APIs throughout the app. It would be great to have an API collection with all the HTTP calls added there.

It would facilitate in debugging issues quickly. We can quickly call and check an API to observe the response/latency or timeouts.

We can probably use https://www.postman.com/ or https://postwoman.io/ or some other framework for our API collection.

maskaravivek avatar Feb 07 '20 19:02 maskaravivek

@maskaravivek Can I work on this? It would help improve my understanding of MediaWiki APIs

GearGit avatar Feb 07 '20 20:02 GearGit

Yes, if you wish to pick this up then you can start by creating a list of APIs with the parameters. We can later take a call to go with either postman or postwoman.

maskaravivek avatar Feb 07 '20 20:02 maskaravivek

Yes, if you wish to pick this up then you can start by creating a list of APIs with the parameters. We can later take a call to go with either postman or postwoman.

The External API section in the documentation of the app contains a list of API used by the app.

Are there any other APIs used which are not mentioned in the Docs? If yes then please do let me know, else I will create a list of API with their respective parameters.

https://github.com/commons-app/apps-android-commons/wiki/External-APIs

GearGit avatar Feb 08 '20 03:02 GearGit

This doc was last updated in 2017 and a lot has changed since then. It would be great if you could play with the app and figure out what all APIs are used based on the logs. You can also look at retrofit interface classes to see the APIs.

Once you come across an API that isn't listed in the doc, we can go ahead and add it there.

@misaochan Is it possible to allow edit access to this particular wiki document to volunteers who are not collaborators?

maskaravivek avatar Feb 08 '20 05:02 maskaravivek

@maskaravivek I could not find such an option unfortunately. :/

misaochan avatar Feb 09 '20 18:02 misaochan

@maskaravivek I am currently documenting API in Google docs. I am left with only few, how would you recommend me sharing the docs?

GearGit avatar Feb 15 '20 03:02 GearGit

You can just share the link here. Thanks

maskaravivek avatar Feb 15 '20 03:02 maskaravivek

@maskaravivek How would you recommend me to print the API in console as they are getting called? It is getting quite difficult to track API.

GearGit avatar Feb 19 '20 05:02 GearGit

You can go to OkHttpConnectionFactory and change the log level to BODY to see the full request-response logs.

maskaravivek avatar Feb 19 '20 05:02 maskaravivek

@GearGit You can now raise a pull request in this PR with whatever APIs that you have documented. It need not be exhaustive. We can keep improving it. :)

https://github.com/commons-app/documentation

maskaravivek avatar Mar 04 '20 22:03 maskaravivek

@GearGit I unassign for now, but if you are you still working on this, please let us know. If no answer, someone else may be assigned to it. Thanks a lot. :-)

nicolas-raoul avatar Aug 20 '24 07:08 nicolas-raoul

This would be a fantastic task for something like Outreachy, IMO. :)

misaochan avatar Sep 21 '24 08:09 misaochan