Struct GitHub

Source
pub struct GitHub(/* private fields */);
Expand description

Asynchronous GitHub API bindings that wraps octorust::Client internally.

§Examples

use gfas_api::GitHub;

let github = GitHub::new(String::from("<TOKEN>"))?;

Implementations§

Source§

impl GitHub

Source

pub fn new(token: String) -> Result<Self, ClientError>

Create a new GitHub API client.

Source

pub async fn explore( &self, user: &str, following: bool, ) -> Result<HashSet<String>, ClientError>

Paginates through the given user profile link and returns discovered followings/followers collected in HashSet.

§Errors

Fails if an error occurs during sending requests.

Methods from Deref<Target = Client>§

Source

pub fn with_host_override<H>(&mut self, host: H) -> &mut Client
where H: ToString,

Override the host for all endpoins in the client.

Source

pub fn remove_host_override(&mut self) -> &mut Client

Disables the global host override for the client.

Source

pub fn get_host_override(&self) -> Option<&str>

Source

pub fn set_credentials<CR>(&mut self, credentials: CR)
where CR: Into<Option<Credentials>>,

Source

pub fn actions(&self) -> Actions

Endpoints to manage GitHub Actions using the REST API.

Source

pub fn activity(&self) -> Activity

Activity APIs provide access to notifications, subscriptions, and timelines.

Source

pub fn apps(&self) -> Apps

Information for integrations and installations.

Source

pub fn billing(&self) -> Billing

Monitor charges and usage from Actions and Packages.

Source

pub fn checks(&self) -> Checks

Rich interactions with checks run by your integrations.

Source

pub fn code_scanning(&self) -> CodeScanning

Retrieve code scanning alerts from a repository.

Source

pub fn codes_of_conduct(&self) -> CodesOfConduct

Insight into codes of conduct for your communities.

Source

pub fn emojis(&self) -> Emojis

List emojis available to use on GitHub.

Source

pub fn enterprise_admin(&self) -> EnterpriseAdmin

Administer a GitHub enterprise.

Source

pub fn gists(&self) -> Gists

View, modify your gists.

Source

pub fn git(&self) -> Git

Raw Git functionality.

Source

pub fn gitignore(&self) -> Gitignore

View gitignore templates.

Source

pub fn interactions(&self) -> Interactions

Owner or admin management of users interactions.

Source

pub fn issues(&self) -> Issues

Interact with GitHub Issues.

Source

pub fn licenses(&self) -> Licenses

View various OSS licenses.

Source

pub fn markdown(&self) -> Markdown

Render Github flavored markdown.

Source

pub fn meta(&self) -> Meta

Endpoints that give information about the API.

Source

pub fn migrations(&self) -> Migrations

Move projects to or from GitHub.

Source

pub fn oauth_authorizations(&self) -> OauthAuthorizations

Manage access of OAuth applications.

Source

pub fn orgs(&self) -> Orgs

Interact with GitHub Orgs.

Source

pub fn packages(&self) -> Packages

Manage packages for authenticated users and organizations.

Source

pub fn projects(&self) -> Projects

Interact with GitHub Projects.

Source

pub fn pulls(&self) -> Pulls

Interact with GitHub Pull Requests.

Source

pub fn rate_limit(&self) -> RateLimit

Check your current rate limit status.

Source

pub fn reactions(&self) -> Reactions

Interact with reactions to various GitHub entities.

Source

pub fn repos(&self) -> Repos

Interact with GitHub Repos.

Source

pub fn scim(&self) -> Scim

Provisioning of GitHub organization membership for SCIM-enabled providers.

Source

pub fn search(&self) -> Search

Look for stuff on GitHub.

Source

pub fn secret_scanning(&self) -> SecretScanning

Retrieve secret scanning alerts from a repository.

Source

pub fn teams(&self) -> Teams

Interact with GitHub Teams.

Source

pub fn users(&self) -> Users

Interact with and view information about users and also current user.

Trait Implementations§

Source§

impl Clone for GitHub

Source§

fn clone(&self) -> GitHub

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Deref for GitHub

Source§

type Target = Client

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl DerefMut for GitHub

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.

Auto Trait Implementations§

§

impl Freeze for GitHub

§

impl !RefUnwindSafe for GitHub

§

impl Send for GitHub

§

impl Sync for GitHub

§

impl Unpin for GitHub

§

impl !UnwindSafe for GitHub

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,