Struct rusty_drone::Client
source · pub struct Client { /* private fields */ }
Implementations
sourceimpl Client
impl Client
sourcepub fn new(auth_token: String, base_url: String) -> Client
pub fn new(auth_token: String, base_url: String) -> Client
Creates a new client for making requests
Arguments
auth_token
- The authorization token provided in your accountbase_url
- The url with no path
Examples
extern crate drone_api;
use rusty_drone::Client;
let drone_client = Client::new(
"randomsupersecrettoken".to_owned(),
"drone.example.org".to_owned()
);
note that there is no trasport in the url
sourcepub fn get_current_user(&self) -> Result<UserInfo, Error>
pub fn get_current_user(&self) -> Result<UserInfo, Error>
Retrieves the user information corresponfing to the provided authorization token.
sourcepub fn get_current_user_repos(&self) -> Result<Vec<Repo>, Error>
pub fn get_current_user_repos(&self) -> Result<Vec<Repo>, Error>
Retrieves the repos registered to the corresponding user.
pub fn get_current_user_feed(&self) -> Result<Vec<FeedElement>, Error>
pub fn get_users(&self) -> Result<Vec<UserInfo>, Error>
pub fn get_repo_info(&self, owner: &String, repo: &String) -> Result<Repo, Error>
pub fn get_build_info(
&self,
owner: &String,
repo: &String,
build: &String
) -> Result<Build, Error>
pub fn get_build_list(
&self,
owner: &String,
repo: &String
) -> Result<Vec<Build>, Error>
pub fn get_registry_info(
&self,
owner: &String,
repo: &String,
registry: &String
) -> Result<RegistryInfo, Error>
pub fn get_registry_list(
&self,
owner: &String,
repo: &String
) -> Result<Vec<RegistryInfo>, Error>
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more