Created
February 3, 2014 14:42
-
-
Save andybak/8784990 to your computer and use it in GitHub Desktop.
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
# Requires https://github.com/andybak/codebase-python-api-client.git | |
import csv | |
from codebase.client import CodeBaseAPI | |
codebase = CodeBaseAPI(username='account name/user name', apikey='your key here', project='project name') | |
tickets = [codebase.ticket(ticket_id=x) for x in range(1,151)] | |
f = open('tickets.csv', 'wb') | |
tickets = [x['ticket'] for x in tickets if x.get('ticket')] | |
keys = tickets[0].keys() | |
dict_writer = csv.DictWriter(f, keys) | |
dict_writer.writer.writerow(keys) | |
dict_writer.writerows(t) | |
f.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I hardcoded in the range of ticket ID's on line 7. Need to figure out how to get that from the API