This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import requests | |
from dotenv import load_dotenv | |
from utils import get_repos,show_repos | |
from time import sleep | |
#load the .env variables | |
load_dotenv() | |
#set the api link | |
GITHUB_URL = os.getenv('GITHUB_URL') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
def get_repos(github_url,username,token): | |
"""[This function is used to list github repositories for an authenticated user.] | |
Args: | |
github_url ([string]): [the github api url] | |
username ([string]): [your github username] | |
token ([string]): [your github personal access token] | |
Returns: | |
[dict]: [a collection of repositories {id:repository_name}] |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.