From 46810ad85e6d5d94a888004e48f7bfd20a7d166a Mon Sep 17 00:00:00 2001 From: al_headstrong Date: Tue, 17 Nov 2020 14:15:32 -0800 Subject: [PATCH] Inital commit. --- main.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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']))