A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pub.dev/documentation/github/latest/browser_helper/../github/GitHub-class.html below:

GitHub class - github library

GitHub class

The Main GitHub Client

Example
  var github = new GitHub(auth: new Authentication.withToken("SomeToken"));
  // Use the Client
Methods
dispose() → void
Disposes of this GitHub Instance. No other methods on this instance should be called after this method is called.
getJSON<S, T>(String path, {int? statusCode, void fail(Response response)?, Map<String, String>? params, JSONConverter<S, T>? convert, String? preview}) Future<T>
Handles Get Requests that respond with JSON path can either be a path like '/repos' or a full url. statusCode is the expected status code. If it is null, it is ignored. If the status code that the response returns is not the status code you provide then the fail function will be called with the HTTP Response. If you don't throw an error or break out somehow, it will go into some error checking that throws exceptions when it finds a 404 or 401. If it doesn't find a general HTTP Status Code for errors, it throws an Unknown Error. headers are HTTP Headers. If it doesn't exist, the 'Accept' and 'Authorization' headers are added. params are query string parameters. convert is a simple function that is passed this GitHub instance and a JSON object. The future will pass the object returned from this function to the then method. The default convert function returns the input object.
handleStatusCode(Response response) → Never
Internal method to handle status codes
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.

inherited

patchJSON<S, T>(String path, {int? statusCode, void fail(Response response)?, Map<String, dynamic>? params, JSONConverter<S, T>? convert, dynamic body, String? preview}) Future<T>
Handles PATCH Requests that respond with JSON
postJSON<S, T>(String path, {int? statusCode, void fail(Response response)?, Map<String, dynamic>? params, JSONConverter<S, T>? convert, dynamic body, String? preview}) Future<T>
Handles Post Requests that respond with JSON
putJSON<S, T>(String path, {int? statusCode, void fail(Response response)?, Map<String, dynamic>? params, JSONConverter<S, T>? convert, dynamic body, String? preview}) Future<T>
Handles PUT Requests that respond with JSON
request(String method, String path, {Map<String, dynamic>? params, dynamic body, int? statusCode, void fail(Response response)?, String? preview}) Future<Response>
Handles Authenticated Requests in an easy to understand way.
requestJson<S, T>(String method, String path, {int? statusCode, void fail(Response response)?, Map<String, dynamic>? params, JSONConverter<S, T?>? convert, dynamic body, String? preview}) Future<T>
toString() String
A string representation of this object.

inherited


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4