Struct redmine_api::api::Redmine
source · [−]pub struct Redmine { /* private fields */ }
Expand description
main API client object
Implementations
create a Redmine object from the environment variables
REDMINE_API_KEY REDMINE_URL
Sets the user id of a user to impersonate in all future API calls
this requires Redmine admin privileges
returns the issue URL for a given issue id
this is mostly for convenience since we are already storing the redmine URL and it works entirely on the client
use this with endpoints that have no response body, e.g. those just deleting a Redmine object
pub fn json_response_body<E, R>(&self, endpoint: &E) -> Result<R, Error> where
E: Endpoint + ReturnsJsonResponse,
R: DeserializeOwned + Debug,
pub fn json_response_body<E, R>(&self, endpoint: &E) -> Result<R, Error> where
E: Endpoint + ReturnsJsonResponse,
R: DeserializeOwned + Debug,
use this with endpoints which return a JSON response but do not support pagination
you can use it with those that support pagination but they will only return the first page
pub fn json_response_body_page<E, R>(
&self,
endpoint: &E,
offset: u64,
limit: u64
) -> Result<ResponsePage<R>, Error> where
E: Endpoint + ReturnsJsonResponse + Pageable,
R: DeserializeOwned + Debug,
pub fn json_response_body_page<E, R>(
&self,
endpoint: &E,
offset: u64,
limit: u64
) -> Result<ResponsePage<R>, Error> where
E: Endpoint + ReturnsJsonResponse + Pageable,
R: DeserializeOwned + Debug,
use this to get a single page of a paginated JSON response
pub fn json_response_body_all_pages<E, R>(
&self,
endpoint: &E
) -> Result<Vec<R>, Error> where
E: Endpoint + ReturnsJsonResponse + Pageable,
R: DeserializeOwned + Debug,
pub fn json_response_body_all_pages<E, R>(
&self,
endpoint: &E
) -> Result<Vec<R>, Error> where
E: Endpoint + ReturnsJsonResponse + Pageable,
R: DeserializeOwned + Debug,
use this to get the results for all pages of a paginated JSON response
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Redmine
impl !UnwindSafe for Redmine
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more