From ca3c9929f82a5671012739f44cf6945fa7bbcae6 Mon Sep 17 00:00:00 2001 From: Alexander Boone Date: Sat, 18 Apr 2020 13:22:08 -0700 Subject: [PATCH] initial commit and completion --- main.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/main.py b/main.py index f2f1db2..933bc09 100644 --- a/main.py +++ b/main.py @@ -3,18 +3,10 @@ import requests -# Use Like python githubber.py JASchilz -# (or another user name) - if __name__ == "__main__": + # CLI: python main.py username username = sys.argv[1] + response = requests.get(f"https://api.github.com/users/{username}/events") - # 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(f"The latest GitHub event for {username} occurred at: " + + response.json()[0]['created_at'])