fetch#
Fetch trending repositories and developers using github-trending-api
- gtrending.fetch.fetch_developers(language: str | None = '', since: str | None = 'daily', sponsorable: bool | None = False) List[dict] #
Fetch trending developers on GitHub.
- Parameters:
language (str, optional) – The programming language, eg: python
since (str, optional) – The time range, choose from [daily, weekly, monthly]. Defaults to “daily”.
sponsorable (bool, optional) – Whether to only search for developers with sponsor URLs. Defaults to False.
- Returns:
- A list of dictionaries containing information for each trending
developer found
- Return type:
list(dict)
- Raises:
ValueError – When any of the arguments are invalid
Examples
fetch_developers() fetch_repos(language="python") fetch_repos("C", since="monthly") fetch_repos("python", sponsorable=True)
- gtrending.fetch.fetch_repos(language: str | None = '', spoken_language_code: str | None = '', since: str | None = 'daily') List[dict] #
Fetch trending repositories on GitHub.
- Parameters:
language (str, optional) – Filtering by language, eg: python, common-lisp
spoken_language_code (str, optional) – The spoken language, eg: en for english
since (str, optional) – The time range, choose from: [daily, weekly, monthly]. Defaults to “daily”.
Note
spoken_language_code argument must be the language code (“en” and not “english”). To convert language name to language code, use convert_spoken_language_name_to_code().
Likewise, language argument must be the parameter value (“common-lisp” not “Common Lisp”). To convert the name to param, use convert_language_name_to_param().
- Returns:
- A list of dictionaries containing information for each trending
repository found
- Return type:
list(dict)
- Raises:
ValueError – When any of the arguments are invalid
Examples
fetch_repos() fetch_repos(language="python") fetch_repos("C", "zh", "monthly")