Note
This module contains functionality that isn’t useful to general users of the github2 package, but it is documented to aid contributors to the package.
Operate on naive datetime.datetime objects, this is the default for backwards compatibility
Set to False for timezone-aware datetime.datetime objects
Timezone used in output from GitHub API, currently defined as America/Los_Angeles in the Olson database
Convert a string to Python datetime.
Parameters: | github_date (str) – date string to parse |
---|
Convert Python datetime to GitHub date string.
Parameters: | datetime (datetime) – datetime object to convert |
---|
Note
Supports naive and timezone-aware datetimes
Convert Python datetime to GitHub date string.
Parameters: | datetime (datetime) – datetime object to convert |
---|
Note
Supports naive and timezone-aware datetimes
Convert Python datetime to GitHub date string.
Parameters: | datetime (str) – datetime object to convert |
---|
Note
Supports naive and timezone-aware datetimes
Decorate to check a function call for authentication.
Sets a requires_auth attribute on functions, for use in introspection.
Parameters: | f (func) – Function to wrap |
---|---|
Raises AuthError: | |
If function called without an authenticated session |
Decorator to mark a function as enhanced by authentication.
Sets a enhanced_by_auth attribute on functions, for use in introspection.
Parameters: | f (func) – Function to wrap |
---|
Utility function to augment BaseDataType docstring.
Parameters: |
---|
Shorten string for use in repr() output.
Parameters: | string (str) – string to operate on |
---|---|
Returns: | string, with maximum length of 20 characters |
Main API binding interface.
Process a single-value response from the API.
If a datatype parameter is given it defines the BaseData-derived class we should build from the provided data
Process a multi-value response from the API.
See : | get_value() |
---|
Make an API request.
Various options are supported if they exist in kwargs: