Trait lexoffice::request::Endpoint[][src]

pub trait Endpoint {
    const ENDPOINT: &'static str;
}

This crate is needed in order to build an URL for a request. It is implemented by all Request variants that allow Requests to the API.

If you want to reach an endpoint https://api.lexoffice.io/foobar you must implement this trait as follows:

use lexoffice::request::{Request, Endpoint};

// Model
struct FooBar {
    // ...
}
impl Endpoint for Request<FooBar> {
    const ENDPOINT: &'static str = "foobar";
}

Associated Constants

const ENDPOINT: &'static str[src]

The endpoint of a request.

Loading content...

Implementors

Loading content...