Struct github_gql::client::Github [] [src]

pub struct Github { /* fields omitted */ }

Struct used to make calls to the Github API.

Methods

impl Github
[src]

[src]

Create a new Github client struct. It takes a type that can convert into a String (&str or Vec<u8> for example). As long as the function is given a valid API Token your requests will work.

[src]

Get the currently set Authorization Token

[src]

Change the currently set Authorization Token using a type that can turn into an &str. Must be a valid API Token for requests to work.

[src]

Exposes the inner event loop for those who need access to it. The recommended way to safely access the core would be

let g = Github::new("API KEY");
let core = g.get_core();
// Handle the error here.
let ref mut core_mut = *core.try_borrow_mut()?;
// Do stuff with the core here. This prevents a runtime failure by
// having two mutable borrows to the core at the same time.

This is how other parts of the API are implemented to avoid causing your program to crash unexpectedly. While you could borrow without the Result being handled it's highly recommended you don't unless you know there is no other mutable reference to it.

[src]

[src]

Trait Implementations

impl Clone for Github
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more