Created
June 3, 2012 17:55
-
-
Save davidboy/2864361 to your computer and use it in GitHub Desktop.
Bitesize!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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; | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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