From a0a9de76f1007b6db31c3c86791ba9676b9cb4ca Mon Sep 17 00:00:00 2001 From: Chase Dullinger Date: Sun, 14 Mar 2021 15:40:56 -0700 Subject: [PATCH] Finishing activity for lesson 6 --- main.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index f2f1db2..18156bf 100644 --- a/main.py +++ b/main.py @@ -9,12 +9,14 @@ if __name__ == "__main__": username = sys.argv[1] + url = "https://api.github.com/users/{}/events".format(username) + + response = requests.get(url) + events = json.loads(response.content) + + print(events[0]['created_at']) + # 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") - - -