Trait Api

Source
pub trait Api: Send + Sync {
    type Container<T: Value>: Container<T>;

Show 67 methods // Required methods fn get( &self, url: Url, ) -> impl Future<Output = Result<(Bytes, StatusCode), Error>> + Send + Sync; fn config(&self) -> &Config; fn config_mut(&mut self) -> &mut Config; fn delete( &self, url: Url, ) -> impl Future<Output = Result<Response, Error>> + Send; fn post<S>( &self, url: Url, msg: S, ) -> impl Future<Output = Result<Response, Error>> + Send + Sync where S: Serialize + Send + Sync; // Provided methods fn get_json_map<T>( &self, url: Url, ) -> impl Future<Output = Result<T, Error>> + Send + Sync where T: Value { ... } fn get_paginated<T>( &self, head_url: Url, ) -> PaginatedStream<'_, Self::Container<T>> where T: 'static + Value + Send + Sync { ... } fn path_to_url(&self, path: impl AsRef<str>) -> Url { ... } fn delete_band_details( &self, id: i32, ) -> impl Future<Output = Result<Response, Error>> + Send { ... } fn delete_satellite_configuration( &self, id: i32, ) -> impl Future<Output = Result<Response, Error>> + Send { ... } fn delete_satellite( &self, id: i32, ) -> impl Future<Output = Result<Response, Error>> + Send { ... } fn delete_override( &self, id: i32, ) -> impl Future<Output = Result<Response, Error>> + Send { ... } fn delete_user( &self, id: i32, ) -> impl Future<Output = Result<Response, Error>> + Send { ... } fn delete_task_request( &self, id: i32, ) -> impl Future<Output = Result<Response, Error>> + Send { ... } fn post_deserialize<S, T>( &self, url: Url, msg: S, ) -> impl Future<Output = Result<T, Error>> + Send + Sync where S: Serialize + Send + Sync, T: Value { ... } fn get_account_by_name( &self, account_name: &str, ) -> impl Future<Output = Result<Self::Container<Account>, Error>> + Send + Sync { ... } fn get_file_by_task_id_and_name( &self, task_id: i32, file_name: &str, ) -> impl Future<Output = Result<Bytes, Error>> + Send + Sync { ... } fn get_account_by_id( &self, account_id: i32, ) -> impl Future<Output = Result<Self::Container<Account>, Error>> + Send + Sync { ... } fn get_accounts(&self) -> PaginatedStream<'_, Self::Container<Account>> { ... } fn get_satellite_bands(&self) -> PaginatedStream<'_, Self::Container<Band>> { ... } fn get_satellite_band_by_id( &self, satellite_band_id: i32, ) -> impl Future<Output = Result<Self::Container<Band>, Error>> + Send + Sync { ... } fn get_satellite_band_by_name( &self, satellite_band_name: &str, ) -> impl Future<Output = Result<Self::Container<Band>, Error>> + Send + Sync { ... } fn get_satellite_bands_by_account_name( &self, account_name: &str, ) -> PaginatedStream<'_, Self::Container<Band>> { ... } fn get_satellite_configurations_by_account_name( &self, account_name: &str, ) -> PaginatedStream<'_, Self::Container<SatelliteConfiguration>> { ... } fn get_satellite_configurations( &self, ) -> PaginatedStream<'_, Self::Container<SatelliteConfiguration>> { ... } fn get_satellite_configuration_by_id( &self, satellite_configuration_id: i32, ) -> impl Future<Output = Result<Self::Container<SatelliteConfiguration>, Error>> + Send + Sync { ... } fn get_satellite_configuration_by_name( &self, satellite_configuration_name: &str, ) -> impl Future<Output = Result<Self::Container<SatelliteConfiguration>, Error>> + Send + Sync { ... } fn get_sites(&self) -> PaginatedStream<'_, Self::Container<Site>> { ... } fn get_site_by_id( &self, id: i32, ) -> impl Future<Output = Result<Self::Container<Site>, Error>> + Send + Sync { ... } fn get_site_by_name( &self, name: impl AsRef<str> + Send + Sync, ) -> impl Future<Output = Result<Self::Container<Site>, Error>> + Send + Sync { ... } fn get_request_by_id( &self, task_request_id: i32, ) -> impl Future<Output = Result<Self::Container<TaskRequest>, Error>> + Send + Sync { ... } fn get_requests(&self) -> PaginatedStream<'_, Self::Container<TaskRequest>> { ... } fn get_requests_by_target_date_between( &self, start: OffsetDateTime, end: OffsetDateTime, ) -> impl Future<Output = Result<Self::Container<Vec<TaskRequest>>, Error>> + Send + Sync { ... } fn get_requests_by_account_and_target_date_between<T>( &self, account_uri: T, start: OffsetDateTime, end: OffsetDateTime, ) -> PaginatedStream<'_, Self::Container<TaskRequest>> where T: AsRef<str> + Send + Sync { ... } fn get_requests_by_account_and_upcoming_today( &self, ) -> PaginatedStream<'_, Self::Container<TaskRequest>> { ... } fn get_requests_by_configuration<T>( &self, configuration_uri: T, ) -> PaginatedStream<'_, Self::Container<TaskRequest>> where T: AsRef<str> + Send + Sync { ... } fn get_requests_by_configuration_and_satellite_names_and_target_date_between<T, I, S>( &self, configuration_uri: T, satellites: I, start: OffsetDateTime, end: OffsetDateTime, ) -> impl Future<Output = Result<Self::Container<Vec<TaskRequest>>, Error>> + Send + Sync where T: AsRef<str> + Send + Sync, I: IntoIterator<Item = S> + Send + Sync, S: AsRef<str> + Send + Sync { ... } fn get_requests_by_configuration_and_target_date_between<T>( &self, configuration_uri: T, start: OffsetDateTime, end: OffsetDateTime, ) -> impl Future<Output = Result<Self::Container<Vec<TaskRequest>>, Error>> + Send + Sync where T: AsRef<str> + Send + Sync { ... } fn get_requests_by_ids<I, S>( &self, ids: I, ) -> impl Future<Output = Result<Self::Container<Vec<TaskRequest>>, Error>> + Send + Sync where I: IntoIterator<Item = S> + Send + Sync, S: AsRef<str> + Send + Sync { ... } fn get_requests_by_overlapping_public( &self, start: OffsetDateTime, end: OffsetDateTime, ) -> PaginatedStream<'_, Self::Container<TaskRequest>> { ... } fn get_requests_by_satellite_name<T>( &self, satellite_name: T, ) -> PaginatedStream<'_, Self::Container<TaskRequest>> where T: AsRef<str> + Send + Sync { ... } fn get_requests_by_satellite_name_and_target_date_between<T>( &self, satellite_name: T, start: OffsetDateTime, end: OffsetDateTime, ) -> impl Future<Output = Result<Self::Container<Vec<TaskRequest>>, Error>> + Send + Sync where T: AsRef<str> + Send + Sync { ... } fn get_requests_by_status<T>( &self, status: T, ) -> Result<PaginatedStream<'_, Self::Container<TaskRequest>>, Error> where T: TryInto<TaskStatusType> + Send + Sync, Error: From<<T as TryInto<TaskStatusType>>::Error> { ... } fn get_requests_by_status_and_account_and_target_date_between<T, U>( &self, status: T, account_uri: U, start: OffsetDateTime, end: OffsetDateTime, ) -> PaginatedStream<'_, Self::Container<TaskRequest>> where T: AsRef<str> + Send + Sync, U: AsRef<str> + Send + Sync { ... } fn get_requests_by_type_and_target_date_between<T>( &self, typ: T, start: OffsetDateTime, end: OffsetDateTime, ) -> impl Future<Output = Result<Self::Container<Vec<TaskRequest>>, Error>> + Send + Sync where T: TryInto<TaskType> + Send + Sync, Error: From<<T as TryInto<TaskType>>::Error> { ... } fn get_requests_passed_today( &self, ) -> impl Future<Output = Result<Self::Container<Vec<TaskRequest>>, Error>> + Send + Sync { ... } fn get_requests_upcoming_today( &self, ) -> impl Future<Output = Result<Self::Container<Vec<TaskRequest>>, Error>> + Send + Sync { ... } fn get_satellites(&self) -> PaginatedStream<'_, Self::Container<Satellite>> { ... } fn get_satellite_by_id( &self, satellite_id: i32, ) -> impl Future<Output = Result<Self::Container<Satellite>, Error>> + Send + Sync { ... } fn get_satellite_by_name( &self, satellite_name: &str, ) -> impl Future<Output = Result<Self::Container<Satellite>, Error>> + Send + Sync { ... } fn get_task_by_id( &self, task_id: i32, ) -> impl Future<Output = Result<Self::Container<Task>, Error>> + Send + Sync { ... } fn get_tasks_by_account_and_pass_overlapping<T>( &self, account_uri: T, start: OffsetDateTime, end: OffsetDateTime, ) -> impl Future<Output = Result<Self::Container<Vec<Task>>, Error>> + Send + Sync where T: AsRef<str> + Send + Sync { ... } fn get_tasks_by_account_and_satellite_and_band_and_pass_overlapping<T, U, V>( &self, account_uri: T, satellite_config_uri: U, band: V, start: OffsetDateTime, end: OffsetDateTime, ) -> impl Future<Output = Result<Self::Container<Vec<Task>>, Error>> + Send + Sync where T: AsRef<str> + Send + Sync, U: AsRef<str> + Send + Sync, V: AsRef<str> + Send + Sync { ... } fn get_tasks_by_account_and_site_configuration_and_band_and_pass_overlapping<T, U, V>( &self, account_uri: T, site_config_uri: U, band: V, start: OffsetDateTime, end: OffsetDateTime, ) -> impl Future<Output = Result<Self::Container<Vec<Task>>, Error>> + Send + Sync where T: AsRef<str> + Send + Sync, U: AsRef<str> + Send + Sync, V: AsRef<str> + Send + Sync { ... } fn get_tasks_by_pass_window( &self, start: OffsetDateTime, end: OffsetDateTime, ) -> impl Future<Output = Result<Self::Container<Vec<Task>>, Error>> + Send + Sync { ... } fn get_tasks_by_pass_overlapping( &self, start: OffsetDateTime, end: OffsetDateTime, ) -> PaginatedStream<'_, Self::Container<Task>> { ... } fn get_tasks_passed_today( &self, ) -> impl Future<Output = Result<Self::Container<Vec<Task>>, Error>> + Send + Sync { ... } fn get_tasks_upcoming_today( &self, ) -> impl Future<Output = Result<Self::Container<Vec<Task>>, Error>> + Send + Sync { ... } fn get_users(&self) -> PaginatedStream<'_, Self::Container<User>> { ... } fn new_band_details(&self) -> BandDetailsBuilder<'_, Self, NoName> where Self: Sized { ... } fn new_satellite_configuration( &self, ) -> SatelliteConfigurationBuilder<'_, Self, NoName> where Self: Sized { ... } fn new_satellite(&self) -> SatelliteBuilder<'_, Self, NoName> where Self: Sized { ... } fn new_override(&self) -> OverrideBuilder<'_, Self, NoName> where Self: Sized { ... } fn new_user(&self) -> UserBuilder<'_, Self, NoAccount> where Self: Sized { ... } fn new_task_request(&self) -> TaskRequestBuilder<'_, Self, NoType> where Self: Sized { ... } fn new_token_by_site_configuration_id( &self, band_id: u32, site_configuration_id: u32, ) -> impl Future<Output = Result<String, Error>> + Send + Sync { ... } fn new_token_by_satellite_id( &self, band_id: u32, satellite_id: u32, ) -> impl Future<Output = Result<String, Error>> + Send + Sync { ... }
}
Expand description

The primary trait for interfacing with the Freedom API

Required Associated Types§

Source

type Container<T: Value>: Container<T>

The Api supports implementors with different so-called “container” types.

For a more detailed description, see the Container trait.

Required Methods§

Source

fn get( &self, url: Url, ) -> impl Future<Output = Result<(Bytes, StatusCode), Error>> + Send + Sync

Creates a get request at the provided absolute URI for the client’s environment, using basic authentication.

Returns the raw binary body, and the status code.

Source

fn config(&self) -> &Config

Returns the freedom configuration for the API

Source

fn config_mut(&mut self) -> &mut Config

Returns a mutable reference to the freedom configuration for the API

Source

fn delete( &self, url: Url, ) -> impl Future<Output = Result<Response, Error>> + Send

Source

fn post<S>( &self, url: Url, msg: S, ) -> impl Future<Output = Result<Response, Error>> + Send + Sync
where S: Serialize + Send + Sync,

Lower level method, not intended for direct use

Provided Methods§

Source

fn get_json_map<T>( &self, url: Url, ) -> impl Future<Output = Result<T, Error>> + Send + Sync
where T: Value,

Creates a get request at the provided absolute URI for the client’s environment, using basic authentication.

The JSON response is then deserialized into the required type, erroring if the deserialization fails, and providing the object if it succeeds.

Source

fn get_paginated<T>( &self, head_url: Url, ) -> PaginatedStream<'_, Self::Container<T>>
where T: 'static + Value + Send + Sync,

Creates a stream of items from a paginated endpoint.

The stream is produced as a collection of Result<T>. This is so that if any one item fails deserialization, it is added to the stream of items as an error rather than causing the entire stream to result in an Error.

§Pinning

For convenience the stream is pinned on the heap via Box::pin. This allows us to treat the returned stream more like any other object, without requiring the end user to manually pin the result on the stack. This comes with a slight performance penalty (it requires an allocation), however this will be negligible given the latency of the responses. For more information on pinning in rust refer to the pinning chapter of the async book.

Source

fn path_to_url(&self, path: impl AsRef<str>) -> Url

Fetch the URL from the given path

§Panics

Panics in the event the URL cannot be constructed from the provided path

Source

fn delete_band_details( &self, id: i32, ) -> impl Future<Output = Result<Response, Error>> + Send

Request to delete the band details object matching the provided id

§Example
let client = Client::from_env()?;

client.delete_task_request(42).await?;
Source

fn delete_satellite_configuration( &self, id: i32, ) -> impl Future<Output = Result<Response, Error>> + Send

Request to delete the satellite configuration matching the provided id

§Example
let client = Client::from_env()?;

client.delete_satellite_configuration(42).await?;
Source

fn delete_satellite( &self, id: i32, ) -> impl Future<Output = Result<Response, Error>> + Send

Request to delete the satellite object matching the provided id

§Example
let client = Client::from_env()?;

client.delete_satellite(42).await?;
Source

fn delete_override( &self, id: i32, ) -> impl Future<Output = Result<Response, Error>> + Send

Request to delete the override matching the provided id

§Example
let client = Client::from_env()?;

client.delete_override(42).await?;
Source

fn delete_user( &self, id: i32, ) -> impl Future<Output = Result<Response, Error>> + Send

Request to delete the user matching the provided id

§Example
let client = Client::from_env()?;

client.delete_user(42).await?;
Source

fn delete_task_request( &self, id: i32, ) -> impl Future<Output = Result<Response, Error>> + Send

Request to delete the user matching the provided id

§Example
let client = Client::from_env()?;

client.delete_task_request(42).await?;
Source

fn post_deserialize<S, T>( &self, url: Url, msg: S, ) -> impl Future<Output = Result<T, Error>> + Send + Sync
where S: Serialize + Send + Sync, T: Value,

Lower level method, not intended for direct use

Source

fn get_account_by_name( &self, account_name: &str, ) -> impl Future<Output = Result<Self::Container<Account>, Error>> + Send + Sync

Produces a single Account matching the provided ID.

See get documentation for more details about the process and return type

§Example
let client = Client::from_env()?;

let account = client.get_account_by_name("ATLAS").await?;
println!("{}", account.name);
Source

fn get_file_by_task_id_and_name( &self, task_id: i32, file_name: &str, ) -> impl Future<Output = Result<Bytes, Error>> + Send + Sync

Produces a single Account matching the provided ID.

See get documentation for more details about the process and return type

§Example
let client = Client::from_env()?;

let data = client.get_file_by_task_id_and_name(42, "data.bin").await?;
Source

fn get_account_by_id( &self, account_id: i32, ) -> impl Future<Output = Result<Self::Container<Account>, Error>> + Send + Sync

Produces a single Account matching the provided ID.

See get documentation for more details about the process and return type

Source

fn get_accounts(&self) -> PaginatedStream<'_, Self::Container<Account>>

Produces a paginated stream of Account objects.

See get_paginated documentation for more details about the process and return type

Source

fn get_satellite_bands(&self) -> PaginatedStream<'_, Self::Container<Band>>

Produces a paginated stream of Band objects.

See get_paginated documentation for more details about the process and return type

Source

fn get_satellite_band_by_id( &self, satellite_band_id: i32, ) -> impl Future<Output = Result<Self::Container<Band>, Error>> + Send + Sync

Produces a single Band matching the provided ID.

See get documentation for more details about the process and return type

Source

fn get_satellite_band_by_name( &self, satellite_band_name: &str, ) -> impl Future<Output = Result<Self::Container<Band>, Error>> + Send + Sync

Produces a single Band matching the provided name.

See get documentation for more details about the process and return type

Source

fn get_satellite_bands_by_account_name( &self, account_name: &str, ) -> PaginatedStream<'_, Self::Container<Band>>

Produces a paginated stream of Band objects matching the provided account name.

See get_paginated documentation for more details about the process and return type

Source

fn get_satellite_configurations_by_account_name( &self, account_name: &str, ) -> PaginatedStream<'_, Self::Container<SatelliteConfiguration>>

Produces a paginated stream of SatelliteConfiguration objects matching the provided account name.

See get_paginated documentation for more details about the process and return type

Source

fn get_satellite_configurations( &self, ) -> PaginatedStream<'_, Self::Container<SatelliteConfiguration>>

Produces a paginated stream of SatelliteConfiguration objects.

See get_paginated documentation for more details about the process and return type

Source

fn get_satellite_configuration_by_id( &self, satellite_configuration_id: i32, ) -> impl Future<Output = Result<Self::Container<SatelliteConfiguration>, Error>> + Send + Sync

Produces a single satellite configuration matching the provided satellite configuration ID

Source

fn get_satellite_configuration_by_name( &self, satellite_configuration_name: &str, ) -> impl Future<Output = Result<Self::Container<SatelliteConfiguration>, Error>> + Send + Sync

Produces a single satellite configuration matching the provided satellite configuration name

Source

fn get_sites(&self) -> PaginatedStream<'_, Self::Container<Site>>

Produces a paginated stream of Site objects.

See get_paginated documentation for more details about the process and return type

Source

fn get_site_by_id( &self, id: i32, ) -> impl Future<Output = Result<Self::Container<Site>, Error>> + Send + Sync

Produces a single Site object matching the provided ID.

See get documentation for more details about the process and return type

Source

fn get_site_by_name( &self, name: impl AsRef<str> + Send + Sync, ) -> impl Future<Output = Result<Self::Container<Site>, Error>> + Send + Sync

Produces a single Site object matching the provided name.

See get documentation for more details about the process and return type

Source

fn get_request_by_id( &self, task_request_id: i32, ) -> impl Future<Output = Result<Self::Container<TaskRequest>, Error>> + Send + Sync

Produces a single TaskRequest matching the provided ID.

See get documentation for more details about the process and return type

Source

fn get_requests(&self) -> PaginatedStream<'_, Self::Container<TaskRequest>>

Produces a paginated stream of TaskRequest objects.

See get_paginated documentation for more details about the process and return type

Source

fn get_requests_by_target_date_between( &self, start: OffsetDateTime, end: OffsetDateTime, ) -> impl Future<Output = Result<Self::Container<Vec<TaskRequest>>, Error>> + Send + Sync

Produces a vector of TaskRequest items, representing all the task requests matching the target time overlapping with the provided time range.

Source

fn get_requests_by_account_and_target_date_between<T>( &self, account_uri: T, start: OffsetDateTime, end: OffsetDateTime, ) -> PaginatedStream<'_, Self::Container<TaskRequest>>
where T: AsRef<str> + Send + Sync,

Produces a vector of TaskRequest items, representing all the task requests matching the account at the provided URI and whose target time overlaps with the provided time range.

See get_paginated documentation for more details about the process and return type

Source

fn get_requests_by_account_and_upcoming_today( &self, ) -> PaginatedStream<'_, Self::Container<TaskRequest>>

Produces a paginated stream of TaskRequest objects whose account name matches the provided name, and whose pass will occur today.

See get_paginated documentation for more details about the process and return type

Source

fn get_requests_by_configuration<T>( &self, configuration_uri: T, ) -> PaginatedStream<'_, Self::Container<TaskRequest>>
where T: AsRef<str> + Send + Sync,

Produces a paginated stream of TaskRequest objects whose satellite configuration matches that of the configuration at the configuration_uri endpoint.

See get_paginated documentation for more details about the process and return type

§Note

The results are ordered by the creation time of the task request

Source

fn get_requests_by_configuration_and_satellite_names_and_target_date_between<T, I, S>( &self, configuration_uri: T, satellites: I, start: OffsetDateTime, end: OffsetDateTime, ) -> impl Future<Output = Result<Self::Container<Vec<TaskRequest>>, Error>> + Send + Sync
where T: AsRef<str> + Send + Sync, I: IntoIterator<Item = S> + Send + Sync, S: AsRef<str> + Send + Sync,

Produces a vector of TaskRequest items, representing all the task requests which match the provided configuration, whose satellite name matches one of the names provided as part of satellite_name, and which overlaps the provided time range.

See get documentation for more details about the process and return type

Source

fn get_requests_by_configuration_and_target_date_between<T>( &self, configuration_uri: T, start: OffsetDateTime, end: OffsetDateTime, ) -> impl Future<Output = Result<Self::Container<Vec<TaskRequest>>, Error>> + Send + Sync
where T: AsRef<str> + Send + Sync,

Produces a vector of TaskRequest items, representing all the task requests matching the configuration at the provided URI and whose target time overlaps with the provided time range.

See get_paginated documentation for more details about the process and return type

Source

fn get_requests_by_ids<I, S>( &self, ids: I, ) -> impl Future<Output = Result<Self::Container<Vec<TaskRequest>>, Error>> + Send + Sync
where I: IntoIterator<Item = S> + Send + Sync, S: AsRef<str> + Send + Sync,

Produces a vector of TaskRequest items, representing all the task requests whose ID matches one of the IDs provided as part of ids.

See get documentation for more details about the process and return type

Source

fn get_requests_by_overlapping_public( &self, start: OffsetDateTime, end: OffsetDateTime, ) -> PaginatedStream<'_, Self::Container<TaskRequest>>

Produces a paginated stream of TaskRequest objects which are public, and which overlap with the provided time range.

See get_paginated documentation for more details about the process and return type

Source

fn get_requests_by_satellite_name<T>( &self, satellite_name: T, ) -> PaginatedStream<'_, Self::Container<TaskRequest>>
where T: AsRef<str> + Send + Sync,

Produces a paginated stream of TaskRequest objects whose satellite name matches one of the names provided as part of satellite_name.

See get_paginated documentation for more details about the process and return type

Source

fn get_requests_by_satellite_name_and_target_date_between<T>( &self, satellite_name: T, start: OffsetDateTime, end: OffsetDateTime, ) -> impl Future<Output = Result<Self::Container<Vec<TaskRequest>>, Error>> + Send + Sync
where T: AsRef<str> + Send + Sync,

Produces a vector of TaskRequest items, representing all the task requests whose satellite name matches the provided name and whose target time overlaps with the provided time range.

See get documentation for more details about the process and return type

Source

fn get_requests_by_status<T>( &self, status: T, ) -> Result<PaginatedStream<'_, Self::Container<TaskRequest>>, Error>

Produces a paginated stream of TaskRequest objects whose status matches the provided status.

See get_paginated documentation for more details about the process and return type

Source

fn get_requests_by_status_and_account_and_target_date_between<T, U>( &self, status: T, account_uri: U, start: OffsetDateTime, end: OffsetDateTime, ) -> PaginatedStream<'_, Self::Container<TaskRequest>>
where T: AsRef<str> + Send + Sync, U: AsRef<str> + Send + Sync,

Produces a paginated stream of TaskRequest, representing all the task requests which match the provided status, account, and overlap the provided time range.

See get_paginated documentation for more details about the process and return type

Source

fn get_requests_by_type_and_target_date_between<T>( &self, typ: T, start: OffsetDateTime, end: OffsetDateTime, ) -> impl Future<Output = Result<Self::Container<Vec<TaskRequest>>, Error>> + Send + Sync
where T: TryInto<TaskType> + Send + Sync, Error: From<<T as TryInto<TaskType>>::Error>,

Produces a vector of TaskRequest items, representing all the tasks which match the provided type, overlap with the provided time range.

See get documentation for more details about the process and return type

Source

fn get_requests_passed_today( &self, ) -> impl Future<Output = Result<Self::Container<Vec<TaskRequest>>, Error>> + Send + Sync

Produces a vector of TaskRequest items, representing the list of tasks which have already occurred today.

See get documentation for more details about the process and return type

Source

fn get_requests_upcoming_today( &self, ) -> impl Future<Output = Result<Self::Container<Vec<TaskRequest>>, Error>> + Send + Sync

Produces a vector of TaskRequest items, representing the list of tasks which will occur later today.

See get documentation for more details about the process and return type

Source

fn get_satellites(&self) -> PaginatedStream<'_, Self::Container<Satellite>>

Produces a paginated stream of Satellite objects.

See get_paginated documentation for more details about the process and return type

Source

fn get_satellite_by_id( &self, satellite_id: i32, ) -> impl Future<Output = Result<Self::Container<Satellite>, Error>> + Send + Sync

Produces single satellite object matching the provided satellite ID

Source

fn get_satellite_by_name( &self, satellite_name: &str, ) -> impl Future<Output = Result<Self::Container<Satellite>, Error>> + Send + Sync

Produces single satellite object matching the provided satellite name

Source

fn get_task_by_id( &self, task_id: i32, ) -> impl Future<Output = Result<Self::Container<Task>, Error>> + Send + Sync

Produces a single Task matching the provided ID.

See get documentation for more details about the process and return type

Source

fn get_tasks_by_account_and_pass_overlapping<T>( &self, account_uri: T, start: OffsetDateTime, end: OffsetDateTime, ) -> impl Future<Output = Result<Self::Container<Vec<Task>>, Error>> + Send + Sync
where T: AsRef<str> + Send + Sync,

Produces a vector of Task items, representing all the tasks which match the provided account, and intersect with the provided time frame.

See get documentation for more details about the process and return type

Source

fn get_tasks_by_account_and_satellite_and_band_and_pass_overlapping<T, U, V>( &self, account_uri: T, satellite_config_uri: U, band: V, start: OffsetDateTime, end: OffsetDateTime, ) -> impl Future<Output = Result<Self::Container<Vec<Task>>, Error>> + Send + Sync
where T: AsRef<str> + Send + Sync, U: AsRef<str> + Send + Sync, V: AsRef<str> + Send + Sync,

Produces a vector of Task items, representing all the tasks which match the provided account, satellite, band, and intersect with the provided time frame.

See get documentation for more details about the process and return type

Source

fn get_tasks_by_account_and_site_configuration_and_band_and_pass_overlapping<T, U, V>( &self, account_uri: T, site_config_uri: U, band: V, start: OffsetDateTime, end: OffsetDateTime, ) -> impl Future<Output = Result<Self::Container<Vec<Task>>, Error>> + Send + Sync
where T: AsRef<str> + Send + Sync, U: AsRef<str> + Send + Sync, V: AsRef<str> + Send + Sync,

Produces a vector of Task representing all the tasks which match the provided account, site configuration, band, and intersect with the provided time frame.

See get documentation for more details about the process and return type

Source

fn get_tasks_by_pass_window( &self, start: OffsetDateTime, end: OffsetDateTime, ) -> impl Future<Output = Result<Self::Container<Vec<Task>>, Error>> + Send + Sync

Produces a vector of Task items, representing all the tasks contained within the provided time frame.

See get documentation for more details about the process and return type

§Note

This differs from Self::get_tasks_by_pass_overlapping in that it only produces tasks which are wholly contained within the window.

Source

fn get_tasks_by_pass_overlapping( &self, start: OffsetDateTime, end: OffsetDateTime, ) -> PaginatedStream<'_, Self::Container<Task>>

Produces a paginated stream of Task items, representing all the tasks which overlap the provided time frame.

See get documentation for more details about the process and return type

§Note

This differs from Self::get_tasks_by_pass_window in that it also includes tasks which only partially fall within the provided time frame.

Source

fn get_tasks_passed_today( &self, ) -> impl Future<Output = Result<Self::Container<Vec<Task>>, Error>> + Send + Sync

Produces a vector of Task items, representing the list of tasks which have already occurred today.

See get documentation for more details about the process and return type

Source

fn get_tasks_upcoming_today( &self, ) -> impl Future<Output = Result<Self::Container<Vec<Task>>, Error>> + Send + Sync

Produces a vector of Task items, representing the list of tasks which will occur later today.

See get documentation for more details about the process and return type

Source

fn get_users(&self) -> PaginatedStream<'_, Self::Container<User>>

Produces a paginated stream of User objects.

See get_paginated documentation for more details about the process and return type

Source

fn new_band_details(&self) -> BandDetailsBuilder<'_, Self, NoName>
where Self: Sized,

Create a new satellite band object

§Example
let client = Client::from_env()?;

client
    .new_band_details()
    .name("My Satellite Band")
    .band_type(BandType::Receive)
    .frequency(8096.0)
    .default_band_width(1.45)
    .io_hardware(IoHardware::Modem)
    .send()
    .await?;
Source

fn new_satellite_configuration( &self, ) -> SatelliteConfigurationBuilder<'_, Self, NoName>
where Self: Sized,

Create a new satellite configuration

§Example
let client = Client::from_env()?;

client
    .new_satellite_configuration()
    .name("My Satellite Configuration")
    .band_ids([1, 2, 3]) // List of band IDs to associate with config
    .send()
    .await?;
Source

fn new_satellite(&self) -> SatelliteBuilder<'_, Self, NoName>
where Self: Sized,

Create a new satellite

§Example
let client = Client::from_env()?;

client
    .new_satellite()
    .name("My Satellite")
    .satellite_configuration_id(42)
    .norad_id(3600)
    .description("A test satellite")
    .send()
    .await?;
Source

fn new_override(&self) -> OverrideBuilder<'_, Self, NoName>
where Self: Sized,

Create a new override

§Example
let client = Client::from_env()?;

client
    .new_override()
    .name("downconverter.gain override for sat 1 on config 2")
    .satellite_id(1)
    .satellite_configuration_id(2)
    .add_property("site.hardware.modem.ttc.rx.demodulator.bitrate", 8096_u32)
    .add_property("site.hardware.modem.ttc.tx.modulator.bitrate", 8096_u32)
    .send()
    .await?;
Source

fn new_user(&self) -> UserBuilder<'_, Self, NoAccount>
where Self: Sized,

Create a new user

§Example
let client = Client::from_env()?;

client
    .new_user()
    .account_id(1)
    .first_name("Han")
    .last_name("Solo")
    .email("flyingsolo@gmail.com")
    .send()
    .await?;
Source

fn new_task_request(&self) -> TaskRequestBuilder<'_, Self, NoType>
where Self: Sized,

Create a new task request

§Example
let client = Client::from_env()?;

client
    .new_task_request()
    .test_task("my_test_file.bin")
    .target_time_utc(OffsetDateTime::now_utc() + Duration::from_secs(15 * 60))
    .task_duration(120)
    .satellite_id(1016)
    .site_id(27)
    .site_configuration_id(47)
    .band_ids([2017, 2019])
    .send()
    .await?;
Source

fn new_token_by_site_configuration_id( &self, band_id: u32, site_configuration_id: u32, ) -> impl Future<Output = Result<String, Error>> + Send + Sync

Fetch an FPS token for the provided band ID and site configuration ID

§Example
const BAND_ID: u32 = 42;
const SITE_CONFIG_ID: u32 = 201;

let client = Client::from_env()?;

let token = client.new_token_by_site_configuration_id(BAND_ID, SITE_CONFIG_ID).await?;
// Submit token to FPS ...
println!("{:?}", token);
Source

fn new_token_by_satellite_id( &self, band_id: u32, satellite_id: u32, ) -> impl Future<Output = Result<String, Error>> + Send + Sync

Fetch an FPS token for the provided band ID and satellite ID

§Example
const BAND_ID: u32 = 42;
const SATELLITE_ID: u32 = 101;

let client = Client::from_env()?;

let token = client.new_token_by_satellite_id(BAND_ID, SATELLITE_ID).await?;
// Submit token to FPS ...
println!("{:?}", token);

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§