From 3461c009acce4b3bcbf86d3ca26f3b5d2b1d412e Mon Sep 17 00:00:00 2001 From: MikeS-1 <36141900+MikeS-1@users.noreply.github.com> Date: Thu, 13 Jun 2019 16:23:42 -0400 Subject: [PATCH 1/2] github works --- main.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/main.py b/main.py index f2f1db2..30d0617 100644 --- a/main.py +++ b/main.py @@ -3,18 +3,14 @@ import requests -# Use Like python githubber.py JASchilz -# (or another user name) if __name__ == "__main__": - username = sys.argv[1] + username = sys.argv[0] - # 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']) From 499242f96a699a4d80a5cd23402acb85a40ca4b9 Mon Sep 17 00:00:00 2001 From: MikeS-1 <36141900+MikeS-1@users.noreply.github.com> Date: Thu, 13 Jun 2019 16:24:03 -0400 Subject: [PATCH 2/2] Add files via upload --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 30d0617..04213e1 100644 --- a/main.py +++ b/main.py @@ -5,7 +5,7 @@ if __name__ == "__main__": - username = sys.argv[0] + username = sys.argv[1] response = requests.get("https://api.github.com/users/{}/events".format(username)) events = json.loads(response.content)