Closed (works as designed)
Project:
Services Voting API
Version:
7.x-1.0-beta1
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Nov 2013 at 07:54 UTC
Updated:
25 Mar 2018 at 12:59 UTC
Jump to comment: Most recent
Comments
Comment #1
tyler.frankenstein commentedWith the latest development snapshot...
To set votes, do a POST to
rest/votingapi/set_votes.json, and send along this JSON, for example:To get results, do a POST to
rest/votingapi/select_votes.json, and send along this JSON, for example:Comment #2
rahulchaurasia3592 commentedI've the same issue and unable to figure out the solution by the above code. Please have a look at my use case -
I've installed Advance Poll module, services voting api on my drupal site. I've created polls on the website using (Add Content-->Advance Poll) and it is showing fine on the website.
My Problem - I want to show those polls(Questions with 4 choices or options) on the android mobile and also want the user to give his vote so that I can send the selected choice back to the server. Once the voting has done, I'll be showing him the voting result. I want to do this using the rest api.
What I've done so far
I've installed rest server module along with the services view module. I've created a view of content-type "Advance Poll" and I've added the Question field and Choice Field. Using this way, I am getting the questions and choices in JSON format using the services views module. So, the polls are showing on the mobile side. I need a way to send the selected choice back to the server.
Any help would be appreciated.
Comment #3
gumdal commentedThank you for this quick documentation! How do I get all votes specific to a user? This is required to show in the UI whether the user has already voted the article or not.