gr::api_traits

Trait RemoteProject

source
pub trait RemoteProject {
    // Required methods
    fn get_project_data(
        &self,
        id: Option<i64>,
        path: Option<&str>,
    ) -> Result<CmdInfo>;
    fn get_project_members(&self) -> Result<CmdInfo>;
    fn get_url(&self, option: BrowseOptions) -> String;
    fn list(&self, args: ProjectListBodyArgs) -> Result<Vec<Project>>;
    fn num_pages(&self, args: ProjectListBodyArgs) -> Result<Option<u32>>;
    fn num_resources(
        &self,
        args: ProjectListBodyArgs,
    ) -> Result<Option<NumberDeltaErr>>;
}

Required Methods§

source

fn get_project_data( &self, id: Option<i64>, path: Option<&str>, ) -> Result<CmdInfo>

Get the project data from the remote API. Implementors will need to pass either an id or a path. The path should be in the format OWNER/PROJECT_NAME

source

fn get_project_members(&self) -> Result<CmdInfo>

source

fn get_url(&self, option: BrowseOptions) -> String

User requests to open a browser using the remote url. It can open the merge/pull requests, pipeline, issues, etc.

source

fn list(&self, args: ProjectListBodyArgs) -> Result<Vec<Project>>

source

fn num_pages(&self, args: ProjectListBodyArgs) -> Result<Option<u32>>

source

fn num_resources( &self, args: ProjectListBodyArgs, ) -> Result<Option<NumberDeltaErr>>

Implementors§

source§

impl<R: HttpRunner<Response = Response>> RemoteProject for Github<R>

source§

impl<R: HttpRunner<Response = Response>> RemoteProject for Gitlab<R>