From 4a2fb1c958c1a9cadfa323e8994086fea1701ffa Mon Sep 17 00:00:00 2001 From: Laura Denney Date: Wed, 9 Dec 2020 22:33:46 -0800 Subject: [PATCH] worked on main.py --- main.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index f2f1db2..20b1361 100644 --- a/main.py +++ b/main.py @@ -7,14 +7,19 @@ # (or another user name) if __name__ == "__main__": - username = sys.argv[1] + #username = sys.argv[1] + response = requests.get('https://api.github.com/users') + user = response.json()[0]['login'] + events = requests.get('https://api.github.com/users/{}/events'.format(user)) + events = events.json() + + time_stamp = events[0]['created_at'] + print(time_stamp) # 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("COMPLETE THE TODOs") + #print(username)