Skip to content

Instantly share code, notes, and snippets.

@johl
Created October 31, 2011 10:15
Show Gist options
  • Save johl/1327231 to your computer and use it in GitHub Desktop.
Save johl/1327231 to your computer and use it in GitHub Desktop.
Letzte Initiativen im LiquidFeedback der Piratenpartei unter Python mit der API abrufen: So einfach geht das!
import requests, json # ggf. requests (http://docs.python-requests.org/en/latest/index.html) installieren mit 'pip install requests'
base_url = "https://lqfb.piratenpartei.de/pp/" # oder einen anderen Basis-URL für eine andere LQFB-Instanz
key = "xxxxxxx" # Zu finden unter https://lqfb.piratenpartei.de/pp/member/developer_settings.html
r = requests.get(base_url + "/api/initiative.html?key=" + key + "&api_engine=json")
initiatives = json.loads(r.content)
print "Letzte Initiativen: "
for initiative in initiatives:
print initiative["name"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment