Closed ondrae closed 8 years ago
Do a Reddit bot too
It might take some creative (read: complicated) recipe designs but you could probably achieve this using IFTTT.
Honestly, I think this would be easy enough to do via Heroku or maybe AWS lambda (haven’t tried that yet). Not sure it’s worth even bothering to try and be creative with IFTTT, unless you see an obvious way to do it (I don’t, but I’m no expert there).
Also, is http://codeforamerica.org/api/issues/labels/help wanted?per_page=1
actually random? That’s convenient for this use case, but that seems kind of crazy; how do you reliably use the paging features if that’s the case?
If we had an RSS output for everything, then IFTTT would be super easy.
Well, you want a nice, steady once per day tweet, not every time (and only when) there's a new issue, right? So just having RSS won't get you there. Otherwise you could just transform the API into RSS with Yahoo Pipes. On Jan 6, 2015 1:16 PM, "Andrew Hyder" notifications@github.com wrote:
If we had an RSS output for everything, then IFTTT would be super easy.
— Reply to this email directly or view it on GitHub https://github.com/codeforamerica/project-ideas/issues/42#issuecomment-68916756 .
You're correct again, using RSS would Tweet out erratically. Your suggestion is better.
Okay so far I have a Google Apps Script that pulls a random issue from the CFAPI and posts it to twitter. It can be set to run on time intervals or at specific times of day. Here is the example code.
I set it up at @civicissue.
@urbildpunkt PERFECT. Thats a good twitter handle too.
A few notes:
Math.random()
bit.We'll also be adding Twitter handles eventually. We should include the Brigade's handle in the tweet once that is ready.
I was surprised to find the handle available. And yea I just set the timer to make sure the scheduling was working. Instead of setting an interval it would probably be better to just set it to post at a few specific times of the day.
You are right, randomly pulling an issue from a random list of issues is a bit redundant.
Such good work @urbildpunkt I'll start promoting it now. Are you a member of a Brigade?
Thanks! @ondrae I haven't joined a Brigade yet but was looking for a way to start getting involved.
Good way to promote this — have the @codeforamerica Twitter account (re-)tweet some of these at strategic times. cc @Jaime-Alexis
Post a random "help wanted" civic tech issue to Twitter thrice a day.
A general bot would use this url
http://codeforamerica.org/api/issues/labels/help wanted?per_page=1
Make it specific for your Brigade
http://codeforamerica.org/api/issues/labels/help wanted?organization_name=Code for San Francisco&per_page=1
Make one for Code for All or Brigade wide
http://codeforamerica.org/api/issues/labels/help wanted?organization_type=Code for All&per_page=1
Cross posted at https://github.com/codeforamerica/civic-issue-finder/issues/16