Services support for Voting API

detour - April 1, 2008 - 19:40
Project:Voting API
Version:6.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work
Issue tags:services integration
Description

I am uploading a stand-alone module (votingapi_service) that provides Services support for the Voting API. This allows external applications to access and modify Voting API data for Drupal objects. For example, a Flash application could implement an interface for voting on nodes.

votingapi_service provides the following methods, which are primarily wrappers to the corresponding Voting API function:

-- setVote: set vote for specified content from a given user
-- unsetVote: remove vote for specified content from a given user
-- getUserVotes: get all votes for specified content from a given user
-- getContentVotes: get all votes for specified content
-- getVotingResults: get results (current average) for specified content

votingapi_service allows only users with permissions of 'access votes' or of 'edit votes' to use these methods.

The Services community prefers packaging services support for non-core modules with the module, rather than including it with Services. Is there interest to include this with future releases of Voting API?

AttachmentSize
votingapi_service-20080401.tar_.gz1.22 KB

#1

moshe weitzman - April 1, 2008 - 22:06
Status:needs review» reviewed & tested by the community

Nice work! I just tested this since I was so excited. No issues at all. THis is RTBC, though it would be nice if you fixed the minor issues below.

Some notes:
- i don't think we usually want license info in the README and .module files. Everything in the drupal.org repository is already GPL v2. See the top level license file. i would also remove the version info. the $Id automatically tracks that.
- 'package = Voting' is more consistent with votingapi itself and fivestar
- code looks small and clean. nice.

Minor: Maintainers generally prefer that you upload 3 attachments instead of one tarball. easier to click on and review within a browser. we also often have scripts that apply patches from URLs and those don't expect (gzipped) tarballs.

#2

youngbuddha - April 14, 2008 - 21:25

Hi,

I am looking for exactly the same functionality, being able to change the ratings of a node using HTTP based method invocation. That way, remote clients can be given a URL for solely the voting submission.

I would really love to see this added to the default Voting API module as a standard feature!

Thanks,

#3

eaton - June 6, 2008 - 00:38

This is unlikely to be added as part of VotingAPI module proper, but perhaps it can be rolled in as a secondary module included in the download. Would it make more sense, though, to included it in Services.module?

#4

opensanta - April 4, 2009 - 02:24
Version:5.x-1.x-dev» 6.x-2.x-dev
Status:reviewed & tested by the community» patch (to be ported)

Very cool issue!

@detour: Could you please port you patch?

@Eaton: After talking to the services module maintainers, they are only willing to include core and views related services. On the other hand, quicksketch indicated he's open to putting services integration in Flag, as per #182071: Expose Flag Service.

#5

opensanta - May 12, 2009 - 00:46
Status:patch (to be ported)» needs work

Marked #182073: Expose Vote up Down Methods via Services as a duplicate of this issue.

#6

cangeceiro - May 28, 2009 - 16:02

it may be worth noting, this module is not compatible with drupal 6.11

#7

eaton - May 28, 2009 - 16:05

Yeah, I've taken a look and it appears to be a Drupal 5 module. I'd like to get it in for the upcoming 'final' release of VAPI 2, but I think i'll need to take another crack at it.

#8

miruoss - August 28, 2009 - 06:54

Hi there

Im very interested in this feature. If there is no way this is included to the VotingAPI module, it would be great to have it as a separate drupal module. Detour, are you gonna make a module out of this?

Cheers,
Michael

 
 

Drupal is a registered trademark of Dries Buytaert.