Struct github_rs::github::Client [] [src]

pub struct Client { /* fields omitted */ }

Struct used to make calls to the Github API.

Methods

impl Client
[src]

Generate a new Client struct with the access token so that calls can be made to the API using it

Get headers of a Client

Get token of a Client

Change headers of a Client

Change AccessToken of a Client

Create a new Client with more control then the default new method

Trait Implementations

impl Activity for Client
[src]

Request Type:

GET

Endpoint:

/events

Description

Returns a vector of recent Events from the API

Request Type:

GET

Endpoint:

/repos/:owner/:repo/events

Description

Returns a vector of Events from the repo of a given owner

Request Type:

GET

Endpoint:

/repos/:owner/:repo/issues/events

Description

Returns a vector of Events from the issues of a repo of a given owner

Request Type:

GET

Endpoint:

/networks/:owner/:repo/events

Description

Returns a vector of Events from the network of a repo of a given owner

Request Type:

GET

Endpoint:

/orgs/:org/events

Description

Returns a vector of Events from a given organization

Request Type:

GET

Endpoint:

/users/:username/received_events

Description

Returns a vector of Events the username has received. If you are authenticated and use your own username you will see private Events

Request Type:

GET

Endpoint:

/users/:username/received_events/public

Description

Returns a vector of public Events the username has received.

Request Type:

GET

Endpoint:

/users/:username/events

Description

Returns a vector of Events performed by the username. If you are authenticated and use your own username you will see private Events

Request Type:

GET

Endpoint:

/users/:username/events/public

Description

Returns a vector of Events performed by the username. If you are authenticated and use your own username you will see private Events

Request Type:

GET

Endpoint:

/users/:username/events/orgs/:org

Description

Returns a vector of Events from the username's org. You must be authenticated to view this.

impl Debug for Client
[src]

Formats the value using the given formatter.

impl Clone for Client
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl GitData for Client
[src]

Retrieves a specific commit from an owner's repo given the commit hash

Retrieves a specific ref from an owner's repo given the ref

Retrieves multiple refs based on a partial match from an owner's repo given the ref

Retrieves all refs an owner's repo given the co

impl Misc for Client
[src]

Implementation of the Misc trait for the Client

Request Type:

GET

Endpoint:

/meta

Description

Returns a Meta struct which contains information about the Github service

Request Type:

GET

Endpoint:

/rate_limit

Description

Returns a RateLimit struct to allow the user to know how many requests they can still make. Note hiting this endpoint with a request does not count against that limit.

Request Type:

GET

Endpoint:

/gitignore/templates

Description

Returns a vector of the languages that have gitignore templates on Github.

Request Type:

GET

Endpoint:

/gitignore/templates/:lang

Description

Returns a GitIgnore struct that has the string for the gitignore file and the language as part of it.

Request Type:

POST

Endpoint:

/markdown

Description

Returns a rendered version of the Markdown sent to Github as HTML.

Request Type:

POST

Endpoint:

/markdown/raw

Description

Returns a rendered version of the markdown posted to it. This expects the request to not be JSON so right now this function is broken until it can be updated to work properly.

impl Repos for Client
[src]

Implementation of the Repos trait for the Client

Request Type:

POST

Endpoint:

/orgs/:org/repos

Description

Creates a new repo in the specified organization for the authenticated user and returns the new Repos stats

Request Type:

POST

Endpoint:

/user/repos

Description

Creates a new repo for the authenticated user and returns the new Repos stats

impl Users for Client
[src]

Request Type:

GET

Endpoint:

/user

Description

Returns a User Struct for the authenticated user.

Request Type:

GET

Endpoint:

/users/:username

Description

Returns a User Struct for the person whose name is passed into the function

Request Type:

GET

Endpoint:

/users

Description

Returns a vector of Users from the website. This is a paginated request to the endpoint.

Request Type:

GET

Endpoint:

/user/emails

Description

Returns a vector of Emails of the authenticated user. This is a paginated request to the endpoint.

Request Type:

GET

Endpoint:

/users/:username/followers

Description

Returns a vector of Users following the username passed into the function. This is a paginated request to the endpoint.

Request Type:

GET

Endpoint:

/user/followers

Description

Returns a vector of Users followin the authenticated user. This is a paginated request to the endpoint.

Request Type:

GET

Endpoint:

/users/:username/following

Description

Returns a vector of Users that the given username is following. This is a paginated request to the endpoint.

Request Type:

GET

Endpoint:

/user/following

Description

Returns a vector of all Users the authenticated user is following. This is a paginated request to the endpoint.

Request Type:

PATCH

Endpoint:

/user

Description

Returns a User struct of the authenticated user once their data has been updated

Request Type:

POST

Endpoint:

/user/emails

Description

Returns a vector of Emails when they've been added to the user's profile

Request Type:

PUT

Endpoint:

/user/following/:username

Description

Returns true is the user is now following the given username and false otherwise

Request Type:

DELETE

Endpoint:

/user/following/:username

Description

Returns true if the authenticated user unfollowed the username passed in and false otherwise.

Request Type:

GET

Endpoint:

/user/following/:username

Description

Returns true if the authenticated user is following the username passed to the function and false otherwise.

Request Type:

GET

Endpoint:

/users/:username/following/:target_user

Description

Returns true is the username is following the target user and false otherwise.

Request Type:

GET

Endpoint:

/users/:username/keys

Description

Returns a Vector of all SSHKeys from the username specified

Request Type:

GET

Endpoint:

/user/keys

Description

Returns a Vector of all SSHKeys that the authenticate user might have.

Request Type:

GET

Endpoint:

/user/keys/:id

Description

Returns an SSHKey to the user that is specified by id. If it does not exist a None value is returned.

Request Type:

POST

Endpoint:

/user/keys

Description

Creates a new SSH key sending it back if it worked out properly.

Request Type:

DELETE

Endpoint:

/user/keys

Description

Returns a boolean value. True is the ssh key was deleted and false otherwise. The id number of the key is what is used to determine which one to delete.

Request Type:

DELETE

Endpoint:

/user/emails

Description

Returns a boolean value. True if the email(s) were deleted and false otherwise. The email strings must match verbatim for the corresponding email to be deleted.