xebia-functional / nine-cards-v2

An Open Source Android Launcher built with Scala on Android
http://www.9cards.io/
Other
183 stars 20 forks source link

Complete information from Google Play unofficial API #509

Closed diesalbla closed 8 years ago

diesalbla commented 8 years ago

The goal of this ticket is to extend the implementation, contained in the object GoogleApiItemParser, to provide all the information needed for the answers of the endpoint created in ticket #507:

Note that this ticket is only concerned with the AppCard object created in ticket #507.

diesalbla commented 8 years ago

After several tries by @franciscodr, @javipacheco, and me, it was found out that the unofficial API seems to be no longer working. Until the API is up again, or a similar API is published, this ticket is suspended.

diesalbla commented 8 years ago

The method has been found to access to the unofficial API. These tickets are no longer blocked.

diesalbla commented 8 years ago

The instructions for the QA are as follows:

Once you have this settings in place, you should compile and run the application. For all of the tests, we use the

  1. Test an existing, free app.

When running the following request:

 curl -H "X-Google-Play-Token: <your_token>"\
               -H "X-Android-ID: <your_android_id>"\
               -H "X-Android-Market-Localization: en-US"\
              "http://localhost:8081/googleplay/cards/com.google.android.youtube"

the response should be 200 OK, and the body should show the information of the app youtube. This should correspond to the info from the Google Play webpage. Check that the value of free is true.

  1. Test a non-existing app

Running a request like the previous one, but with the url "http://localhost:8081/googleplay/cards/not.existing.app", the response should be 404 NotFound, and the body should show the name of the package.

  1. Test an existing, non-free app:

When running a request like the first one, but with the URL "http://localhost:8081/googleplay/cards/com.mojang.minecraftpe", the answer should be 200 OK and the body should show the info of the app, corresponding to the google play web page. Check that the free field is false.

  1. Tests without headers.

Running the original request, without the X-Android-Market-Localization, should give the same result. Running the original request, but without the headers X-Android-ID or X-Google-Play-Token, should give the response status 401 Unauthorized.

franciscodr commented 8 years ago

After testing several examples, everything works fine. Good job!

javipacheco commented 8 years ago

Please, add link to PR

diesalbla commented 8 years ago

Here is the Pull Request that solves this issue.