From 4a97ac914c271dcc34e258adef33e5116237f042 Mon Sep 17 00:00:00 2001 From: Jason Jenkins Date: Tue, 2 Mar 2021 09:37:31 -0800 Subject: [PATCH] Complete --- main.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/main.py b/main.py index f2f1db2..aa25c10 100644 --- a/main.py +++ b/main.py @@ -5,16 +5,14 @@ # Use Like python githubber.py JASchilz # (or another user name) +# https://api.github.com/ if __name__ == "__main__": username = sys.argv[1] - # 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") - - + response = requests.get("https://api.github.com/users/{}/events".format(username)) + # 2. Print out the time stamp associated with the first event in that list. + events = json.loads(response.content) + print(events[0]['created_at'])