Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Provide the api for reading and pushing Ratings of apps as well as storage of said ratings
Comment | File | Size | Author |
---|---|---|---|
#6 | 1407022-add-voting-3.patch | 5.83 KB | jec006 |
#4 | 1407022-add-voting-2.patch | 5.73 KB | jec006 |
#3 | 1407022-add-voting.patch | 1.6 KB | jec006 |
Comments
Comment #1
e2thex CreditAttribution: e2thex commentedtagging for sprint
Comment #2
jec006 CreditAttribution: jec006 commentedComment #3
jec006 CreditAttribution: jec006 commentedHere's a first attempt - seems to work pretty well
Vote via a call to:
apps/vote/{app machine_name}/{rating (0-5)}
Votes are recorded for each app once per ip - meaning if an ip votes again for an app their initial vote will be overwritten.
Votes are returned from the call in the format:
and is also added to the manifests returned from the server like:
This adds a dependency on voting api
Comment #4
jec006 CreditAttribution: jec006 commentedOops, didn't get the new file
Here's a new patch
Comment #5
jec006 CreditAttribution: jec006 commentedComment #6
jec006 CreditAttribution: jec006 commentedOk, So I've switch the vote_source to be the client id, which should be unique even if things are hosted on the same server.
Here's the new patch
Comment #7
jec006 CreditAttribution: jec006 commentedTODO:
1. Change the voting metric from being 1-5 to being percentage based - this way everything will also work with fivestar
2. Add fivestar fields to apps
Comment #8
jec006 CreditAttribution: jec006 commentedFor easier review and testing - i've put the code (including 1 from #7 but not 2) into the branch 7.x-1.0-voting.
see commit here: http://drupalcode.org/project/appserver.git/commitdiff/c7ef6b655bd480942...
Comment #9
jec006 CreditAttribution: jec006 commentedObvious issue: Tabs instead of spaces.
Will fix.
Comment #10
jec006 CreditAttribution: jec006 commentedFixed tabs issue and pushed to 7.x-1.0-voting
Comment #11
jec006 CreditAttribution: jec006 commentedIt should also be noted that this adds a dependency on voting api - it is in the .info file, but should also be updated on the module page when committed.
Comment #12
febbraro CreditAttribution: febbraro commentedWe did a good amount of testing on this Friday. I think it is good to merge in and iron the rest of the kinks out.
Comment #13
jec006 CreditAttribution: jec006 commentedMerged into 7.x-1.x