From 45003668e92e02c238d6ae64e504bb5f9f6f41fb Mon Sep 17 00:00:00 2001 From: ajaggarcia10 <45190522+ajaggarcia10@users.noreply.github.com> Date: Fri, 3 Apr 2020 14:03:05 -0700 Subject: [PATCH] Finished main.py --- main.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index f2f1db2..fb789fc 100644 --- a/main.py +++ b/main.py @@ -9,12 +9,10 @@ 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. + response = requests.get('https://api.github.com/users/{}/events'.format(username)) + events = json.loads(response.content) - print("COMPLETE THE TODOs") + print(events[0]['created_at'])