Struct github::client::Client [-] [+] [src]

pub struct Client {
    pub user_agent: String,
    pub base_url: String,
    pub upload_url: String,
}

The Client struct represent the user agent and base URLs. Functions in this library will never mutate a Client object and for th sake of parallel processing, you should try to keep it immutable.

Fields

user_agent

user_agent represents the value given under the User-Agent key as part of the header of each request.

base_url

The base url for non-upload requests.

upload_url

The base url for upload requests.

Methods

impl Client

fn custom(user: &str, base_url: &str, upload_url: &str) -> Client

Construct a Client for a custom domain, other than GitHub.

fn new(user: &str) -> Client

Construct a Client using the default URLs as defined by GitHub.