I'm fairly certain that my use case doesn't apply here for this module, but I wondered if anyone could just confirm that and push me in the right direction:
I have a ton of nodes that include latitude and longitude.
I'd like to add fields to these nodes for Congressional district/party/etc. using Lat and Long. (Long story short - ultimately, I want to be able to display this data on maps and sort by congressional district, party, etc). So...the Sunlight Congress API can do this with the legislators.allForLatLong call:
http://services.sunlightlabs.com/docs/congressapi/legislators.allForLatL...
Is there any way that this module can accomplish this? Or will I need to set up a rule and a php call + tokens or something?
From how I understand it, this module interfaces with your user list, not your nodes.
Comments
Comment #1
dalinIt does indeed interface with your users and not your nodes. However, since you want to sort by CD, you will have to store the data in the DB rather than calling the API via JS at runtime. So I think you would be best to use rules to call cd_sunlight's internal API when the nodes are saved.
See
http://drupalcode.org/project/cd_sunlight.git/blob/refs/heads/7.x-1.x:/c...
You'll need to do something like:
Comment #2
paulgemini commentedNice - that's very helpful. Rules seems like the way to go.
It would be awesome if there was a bulk update feature with Sunlight API (outside of users). Maybe once I get the rule working I can export that into a Feature...