Skip to content

Instantly share code, notes, and snippets.

@Wooble
Forked from anonymous/gist:7a850da66fb24e619b0a
Last active August 29, 2015 14:24
Show Gist options
  • Save Wooble/7cfbd68d6d73a7eaef41 to your computer and use it in GitHub Desktop.
Save Wooble/7cfbd68d6d73a7eaef41 to your computer and use it in GitHub Desktop.
class Topic(object):
def __init__(self, obj_id, top_name):
self.object_id = obj_id
self.topic_name = top_name
# ...
data = json.loads(connection.getresponse().read())
for result in data['results']:
topicObj = Topic(result['objectId'], result['topic_name'])
print topicObj.object_id
print topicObj.topic_name
topicList.append(topicObj)
return topicList
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment