Skip to content

Instantly share code, notes, and snippets.

@satoshikumano
Created July 22, 2014 11:47
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save satoshikumano/b290a1354a7ff2c0dda3 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8; -*-

import httplib2
import json
import sys
import codecs
import urllib

sys.stdout = codecs.getwriter('utf_8')(sys.stdout)
token='Put your private access token here'
reviewLabel = '5 - Develop (Review)'
encodedLabel = urllib.quote_plus(reviewLabel) 

# list issues in kanban project
h = httplib2.Http(".cache")

url = "https://api.github.com/orgs/KiiCorp/issues?labels="+encodedLabel+"&filter=all"
resp, content = h.request(url, "GET", 
        headers={'authorization':'Bearer ' + token})
respBody = json.loads(content)
for iss in respBody:
    print iss['title']
    print iss['html_url']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment