module loghelper.github_api

Inheritance diagram of pyquickhelper.loghelper.github_api

Short summary

module pyquickhelper.loghelper.github_api

Calls github API.

source on GitHub

Classes

class

truncated documentation

GitHubApiException

Exception raised when a call to github rest api failed.

Functions

function

truncated documentation

call_github_api

Calls GitHub REST API.

Methods

method

truncated documentation

__init__

Merges everything into a string.

Documentation

Calls github API.

source on GitHub

exception pyquickhelper.loghelper.github_api.GitHubApiException(response, url, **kwargs)[source]

Bases: Exception

Exception raised when a call to github rest api failed.

source on GitHub

Merges everything into a string.

source on GitHub

__init__(response, url, **kwargs)[source]

Merges everything into a string.

source on GitHub

pyquickhelper.loghelper.github_api.call_github_api(owner, repo, ask, auth=None, headers=None)[source]

Calls GitHub REST API.

Parameters:
  • owner – owner of the project

  • auth – tuple (user, password)

  • repo – repository name

  • ask – query (see below)

  • header – dictionary

Returns:

json

Example for ask:

  • commits

  • downloads

  • forks

  • issues

  • pulls

  • stats/code_frequency - Needs authentification

  • stats/commit_activity - Needs authentification

  • stats/punch_card - Needs authentification

  • traffic/popular/referrers - Must have push access to repository

  • traffic/popular/paths - Must have push access to repository

  • traffic/views - Must have push access to repository

  • traffic/clones - Must have push access to repository

GitHub limits the number of requets per hour: Rate Limiting.

source on GitHub