diff --git a/main.py b/main.py index f2f1db2..95119a8 100644 --- a/main.py +++ b/main.py @@ -8,13 +8,12 @@ if __name__ == "__main__": username = sys.argv[1] + root = 'https://api.github.com' + r = requests.get(root + '/users/{}/events'.format(username)) + events_list = r.json() - # TODO: - # - # 1. Retrieve a list of "events" associated with the given user name - # 2. Print out the time stamp associated with the first event in that list. - print("COMPLETE THE TODOs") + print("User {}: last event at {}".format(username, events_list[0]['created_at']))