android-market-api-php icon indicating copy to clipboard operation
android-market-api-php copied to clipboard

DownloadCount and DownloadCountText

Open ghost opened this issue 14 years ago • 8 comments

DownloadCount always return 0 DownloadCountText always return ">250.000"

Is there a way to show 1 million-5 million is above 250.000? #2

setEntriesCount >10 cause an error? max items are 10?

Thanks, Leslie

ghost avatar Mar 07 '12 14:03 ghost

This project doesn't support the Google Play extended app properties yet. There's a newer .proto file available at https://github.com/egirault/googleplay-api - I'll try to port it to PHP myself.

markostamcar avatar Dec 04 '12 20:12 markostamcar

OK, here's my progress so far:

  • I managed to make googleplay.proto.php from https://github.com/egirault/googleplay-api 's googleplay.proto using https://github.com/stuporglue/protoc-gen-php

  • I can login then make requests to https://android.clients.google.com/fdfe/[API call] and get the protobuffers back

  • There are however some unsupported things in protocolbuffers.inc.php: first, I got the Exception "I've not coded read_uint64 yet", then I commented it out and I got "Unsupported wire_type"

  • When I commented that out as well :) I got the ResponseWrapper object, but it seems to be partially corrupted, for example this value is OK:

    ["imageUrl_:protected"]=> string(89) "https://lh3.ggpht.com/B5iXLcit6N71-dqt8FDn8vhmsKTmLqJlByz98L8UoCV85S_u9haWeUZmYjrOodjFFcU" However this is not (note the garbage before "http"): [0]=> string(93) "*Whttp://lh4.ggpht.com/u9Ur-xOslvqXqQPZm8TsTg6fXCeH9abZQKpdgVLl-JQotgTdc_0zJQusMxRLhtos2gH"

I'll try to find some other (newer) protoc-gen-php branch on github now and get back to you. In any case I'll post my sources here soon.

markostamcar avatar Dec 04 '12 22:12 markostamcar

Trying now with https://github.com/drslump/Protobuf-PHP Edit: It works much better! I'll post my results soon.

OK, here we go - put these 3 files in the same directory:

  • index.php: https://gist.github.com/4210198 (fill in your Google Account info and Android device ID!)
  • GooglePlaySession.php: https://gist.github.com/4210201
  • googleplay.php: https://gist.github.com/4210218

Then get library/DrSlump from https://github.com/drslump/Protobuf-PHP and put it together with them (PHP 5.3+ required!)

One more little fix is needed before you visit index.php: open DrSlump/Protobuf/Codec/Binary.php and put "return null;" before "throw new \RuntimeException('Group is deprecated and not supported');"

DISCLAIMER: This code is ALPHA at best, also the PHP code style is terrible, I just put everything together from different sources and would like to go to bed now :) Here's a little screenshot of the end result: http://shrani.si/f/2g/3G/QM0v2De/result.png

markostamcar avatar Dec 04 '12 22:12 markostamcar

This sounds like a really interesting update, got any more test results @markostamcar? We do have a pull request for new proto that might be solving the same issue, #17, does that look similar?

niklasga avatar Mar 26 '13 07:03 niklasga

Nope, seems the updates are just for "GetAssetRequest/Response". The .proto used above is completely different as it is for the Google Play app store which introduced a lot of new properties. Yours is querying the now-legacy Android Market API used on 1.6-2.1 devices.

markostamcar avatar Mar 26 '13 11:03 markostamcar

Hi @markostamcar - I have made some changes to the proto buffer and the api version headers were sending 1-2 days ago. If you could clean up or assit, i could test and merge your pull request.

vincentkoc avatar Jul 12 '13 14:07 vincentkoc

Any luck @markostamcar

vincentkoc avatar Aug 21 '14 13:08 vincentkoc

Yes, with https://github.com/egirault/googleplay-api ;)

markostamcar avatar Aug 21 '14 13:08 markostamcar