Skip to content

Instantly share code, notes, and snippets.

@davidboy
Created June 3, 2012 17:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidboy/2864361 to your computer and use it in GitHub Desktop.
Save davidboy/2864361 to your computer and use it in GitHub Desktop.
Bitesize!
<?php
# This is the address of the page we want to load on the launchpad api.
$addr = "https://api.staging.launchpad.net/1.0/elementary/?ws.op=searchTasks&tags=bitesize&status=Confirmed&status=Triaged";
# Connect to the launchpad api.
$file = fopen($addr, "r") or die('fail');
# Download and decode the json.
$bugs = json_decode(fgets($file))->entries;
# Do something with the bugs!
foreach ($bugs as $bug)
echo $bug->title;
?>
# Stuff like this is why I dislike python.
from launchpadlib.launchpad import Launchpad
# Crazy launchpad api login stuff.
lp = Launchpad.login_anonymously('elementary', 'staging')
# Find all the bitesize bugs for any elementary project.
bugs = lp.distributions['elementary'].searchTasks(
tags="bitesize", status=['Triaged', 'Confirmed'])
# Do something with them!
for bug in bugs:
print(bug.title)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment