egirault / googleplay-api

Google Play Unofficial Python API - This project was a PoC and is not maintained anymore. Please feel free to fork it and improve it in any way.
879 stars 373 forks source link

App reviews #13

Closed markostamcar closed 11 years ago

markostamcar commented 11 years ago

Hi! Thanks once more for making this possible. I managed to port it partially to PHP ( https://github.com/splitfeed/android-market-api-php/issues/12#issuecomment-11018762 ) but was wondering where the app reviews data lurks... I don't get it back in the "details" request, however there is an empty "userReview" field there... might be a bug in the PHP protobuf implementation or something else entirely... any pointers appreciated!

egirault commented 11 years ago

Hi! The API was indeed missing support for app reviews. I just added it:

    def reviews(self, packageName, filterByDevice=False, sort=2, nb_results=None, offset=None):
        """Browse reviews.
        packageName is the app unique ID.
        If filterByDevice is True, return only reviews for your device."""
        path = "rev?doc=%s&sort=%d" % (requests.utils.quote(packageName), sort)
        if (nb_results is not None):
            path += "&n=%d" % int(nb_results)
        if (offset is not None):
            path += "&o=%d" % int(offset)
        if(filterByDevice):
            path += "&dfil=1"
        message = self.executeRequestApi2(path)
        return message.payload.reviewResponse

Please update ;)

markostamcar commented 11 years ago

Thank you!

egirault commented 11 years ago

You're welcome!

markostamcar commented 11 years ago

egirault, shame you stopped working on this project :( But I understand you have other things in your life :)