-
-
Save Wooble/7cfbd68d6d73a7eaef41 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
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