This module exposes a service for the popular Fivestar rating module. It has two functions: rate and retrieve. To make this API easy to use, I set the entity type to 'node' by default, but you can override it with an added parameter. I also use a rating scale of 1-5 for semantic purposes (the callback translates these values back into Fivestar-friendly values).

http://drupal.org/sandbox/joshberry/1526726

git clone http://git.drupal.org/sandbox/joshberry/1526726.git services_fivestar

This module is specific to Drupal 7. I haven't done any reviews yet, and this is my first module.

Comments

rodrigo panchiniak fernandes’s picture

Status: Needs review » Needs work

Hi joshberry,

The issue lacks your .module file. Also, please add a git clone link to the issue and don't work in a master branch. Please fix that, you can find a description here.

joshberry’s picture

Title: A Service for the Fivestar Module » Created Major Version Branch

Hi Rodrigo,

Thanks for the feedback. I didn't receive an email alert about your message, so I assumed this module was just sitting in a big queue. I created the major version branch. Since I set the major version as the version to be worked from in the edit form, I assume the git clone link is the same (sorry, first time contributor here), and that is:

git clone http://git.drupal.org/sandbox/joshberry/1526726.git services_fivestar

If there's anything I missed, I'll update ASAP, and I'll be checking this thread frequently. Thanks!

Josh

patrickd’s picture

Title: Created Major Version Branch » Services Fivestar

Please keep the issue title same as your module's name

Don't forget to switch back to needs review if your ready

joshberry’s picture

Status: Needs work » Needs review

Thanks. Status updated.

Josh

dabblela’s picture

Status: Needs review » Needs work

Hi! I've done a brief lookover of your module and found some issues:

First and foremost, have you attempted to have this functionality included as part of the Fivestar module? Your module contains less than 5 functions, which is generally below the threshold for review.

Assuming that becomes a non-issue, the rest of my comments are below:

.info File
Your .info file is missing the required "core" and "description" properties. Please see http://drupal.org/node/542202
License
Please remove the LICENSE.txt file. Drupal will add the appropriate version automatically during packaging so your repository should not include it.
Major coding standards / best practice issues
An automated review of your project has found some issues with your code; As coding standards make sure projects are coded in a consistent style we please you to have a look at the report and try to fix them. Anyway, note that issues found are possibly false positives and fixing all issues is not a requirement for getting through the application process.

You can find the results of the automated report at http://ventral.org/pareview/httpgitdrupalorgsandboxjoshberry1526726git.

Lastly, it appears there are still some files in the master branch. Please empty the master branch and push to the repo.

I haven't looked at the code too in depth outside of these formatting issues, but it appears to make sense and would be great functionality to have for Fivestar and Services.

joshberry’s picture

Thanks for the feedback. I'll make these updates in the coming days, but I'll also reach out to the Fivestar people too. Maybe they can include this in an update.

mitchell’s picture

Status: Needs work » Postponed (maintainer needs more info)

This is an awesome contribution, joshberry! Thanks for contributing!!

> Maybe they can include this in an update.
Yes, definitely. This is how services is normally extended. So, please do file an issue there and update us a link.

You may also be interested in this issue, #241453: Services support for Voting API.

klausi’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application.