Generation

generate functionTue, 12 Mar 2024

Call api using token

def call_api(token): import requests url = 'https://api.github.com/repos/<user>/<repo>/commits' headers = {'Authorization': 'token ' + token} response = requests.get(url, headers=headers) return response.json() def get_commits(token): commits = [] for commit in call_api(

Questions about programming?Chat with your personal AI assistant