pub struct SeriesUpdatesRequest<'a> { /* private fields */ }Expand description
A builder for a series/updates request, returned by
Client::series_updates. Lists the series updated most recently (ordered
by last-updated time), optionally narrowed to a class of series. Finish with
send.
use ferric_fred::UpdatesFilter;
let results = client
.series_updates()
.filter(UpdatesFilter::Macro)
.limit(20)
.send()
.await?;
println!("{} series recently updated", results.count);Implementations§
Source§impl<'a> SeriesUpdatesRequest<'a>
impl<'a> SeriesUpdatesRequest<'a>
Sourcepub fn filter(self, filter: UpdatesFilter) -> Self
pub fn filter(self, filter: UpdatesFilter) -> Self
Narrow the results to a class of series (filter_value); defaults to all.
Sourcepub fn time_window(self, start: NaiveDateTime, end: NaiveDateTime) -> Self
pub fn time_window(self, start: NaiveDateTime, end: NaiveDateTime) -> Self
Limit results to series updated within a time window (start_time /
end_time), down to the minute. FRED requires these as a pair, so this
method takes both bounds at once (ADR-0019).
The times are naive wall-clock in FRED’s own timezone — they are sent as
given (formatted %Y%m%d%H%M), with no timezone conversion and
minute granularity.
Sourcepub fn offset(self, offset: u32) -> Self
pub fn offset(self, offset: u32) -> Self
Number of results to skip from the start (offset), for paging.
Sourcepub async fn send(self) -> Result<SeriesSearchResults>
pub async fn send(self) -> Result<SeriesSearchResults>
Run the request and return the recently-updated series with pagination metadata.
§Errors
Returns an error if the request fails to send, FRED returns a non-success status, or the response body cannot be deserialized.
Trait Implementations§
Source§impl<'a> Clone for SeriesUpdatesRequest<'a>
impl<'a> Clone for SeriesUpdatesRequest<'a>
Source§fn clone(&self) -> SeriesUpdatesRequest<'a>
fn clone(&self) -> SeriesUpdatesRequest<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for SeriesUpdatesRequest<'a>
impl<'a> Debug for SeriesUpdatesRequest<'a>
Source§impl Paginate for SeriesUpdatesRequest<'_>
impl Paginate for SeriesUpdatesRequest<'_>
Source§const MAX_PAGE: u32 = 1000
const MAX_PAGE: u32 = 1000
limit it
honors. 1000 for most lists; 10000 for release dates and vintage dates.Source§type Page = SeriesSearchResults
type Page = SeriesSearchResults
Source§fn requested_limit(&self) -> Option<u32>
fn requested_limit(&self) -> Option<u32>
limit, if set. send_all
treats it as a ceiling on the total number of items returned.Source§fn requested_offset(&self) -> Option<u32>
fn requested_offset(&self) -> Option<u32>
offset, if set — the point
send_all starts paging from.Source§fn with_paging(self, limit: u32, offset: u32) -> Self
fn with_paging(self, limit: u32, offset: u32) -> Self
limit and offset set.Source§fn send_page(self) -> impl Future<Output = Result<Self::Page>> + Send
fn send_page(self) -> impl Future<Output = Result<Self::Page>> + Send
send.