Expand description
minigh is a thin wrapper around ureq for interacting with the GitHub
REST API that aims to make common operations easier & simpler. Notable
features include:
-
When making a request, you only need to specify the part of the URL after the API base URL.
-
Support for iterating over paginated results
-
Most request methods return decoded JSON.
-
Bring Your Own Schema:
minighdoes not define any types for values returned by the API; that is left up to the user. -
Errors raised for 4xx and 5xx responses include the body of the response in the error value, and this body is included when displaying with
{:#}. -
The
AcceptandX-GitHub-Api-Versionheaders are automatically set to their recommended values. -
Follows GitHub’s recommendations for dealing with rate limits, including waiting between mutating requests and waiting & retrying in response to rate-limit errors
-
Automatic retrying on 5xx errors with exponential backoff
§Logging
minigh uses the log crate to log events. All messages are currently
logged at the DEBUG level.
Structs§
- Client
- A client for the GitHub REST API
- Client
Builder - A builder for
Clientvalues - Method
Convert Error - Error returned when trying to convert an
ureq::http::Methodthat does not exist inMethodto the latter type - Pagination
Iter - An iterator that performs paginated GET requests and yields the returned items.
- Parse
Method Error - Error returned by
Method’sFromStrimplementation - Status
Error - Error returned when the server replies with a 4xx or 5xx status code
Enums§
- Build
Client Error - Error returned when constructing a
Clientfails - Method
- The HTTP methods supported by
minigh - Request
Error - Error returned when an HTTP request fails