pub struct Redmine { /* private fields */ }
Expand description

main API client object

Implementations

create a Redmine object

Errors

Currently this can not fail but it returns a Result for future proofing the API

create a Redmine object from the environment variables

REDMINE_API_KEY REDMINE_URL

Errors

This will return an error if the environment variables are missing or the URL can not be parsed

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

Errors

This can return an error if the endpoint returns an error when creating the request body or when the web request fails

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

Errors

This can return an error if the endpoint returns an error when creating the request body, when the web request fails or when the response can not be parsed as a JSON object into the result type

use this to get a single page of a paginated JSON response

Errors

This can return an error if the endpoint returns an error when creating the request body, when the web request fails, when the response can not be parsed as a JSON object, when any of the pagination keys or the value key are missing in the JSON object or when the values can not be parsed as the result type.

use this to get the results for all pages of a paginated JSON response

Errors

This can return an error if the endpoint returns an error when creating the request body, when any of the web requests fails, when the response can not be parsed as a JSON object, when any of the pagination keys or the value key are missing in the JSON object or when the values can not be parsed as the result type.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

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

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

Calls U::from(self).

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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