Skip to content

Instantly share code, notes, and snippets.

@elijahbenizzy
Last active August 16, 2023 19:41
Show Gist options
  • Save elijahbenizzy/909d1ef865c0e8c0f0b7db692dce98c1 to your computer and use it in GitHub Desktop.
Save elijahbenizzy/909d1ef865c0e8c0f0b7db692dce98c1 to your computer and use it in GitHub Desktop.
def starcount_url(repositories: List[str]) -> Parallelizable[str]:
"""Generates API URLs for counting stars on a repo. We do this
so we can paginate requests later.
:param repo: The repository name in the format 'organization/repo'
:return: A URL to the GitHub API
"""
for repo in repositories:
yield f"https://api.github.com/repos/{repo}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment