Skip to content

Commit

Permalink
ADD: Add intraday enum variant for dataset cond
Browse files Browse the repository at this point in the history
  • Loading branch information
threecgreen committed Aug 15, 2024
1 parent e3be819 commit 3bcc2e5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 0.12.1 - TBD

#### Enhancements
- Added `Intraday` variant to `DatasetCondition` in preparation for intraday data being
available from the historical API

## 0.12.0 - 2024-07-30

#### Breaking changes
Expand Down
4 changes: 4 additions & 0 deletions src/historical/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ pub enum DatasetCondition {
Pending,
/// The data is not available.
Missing,
/// The data is available intraday, which may have different licensing.
Intraday,
}

/// The details about a publisher.
Expand Down Expand Up @@ -393,6 +395,7 @@ impl DatasetCondition {
DatasetCondition::Degraded => "degraded",
DatasetCondition::Pending => "pending",
DatasetCondition::Missing => "missing",
DatasetCondition::Intraday => "intraday",
}
}
}
Expand All @@ -406,6 +409,7 @@ impl FromStr for DatasetCondition {
"degraded" => Ok(DatasetCondition::Degraded),
"pending" => Ok(DatasetCondition::Pending),
"missing" => Ok(DatasetCondition::Missing),
"intraday" => Ok(DatasetCondition::Intraday),
_ => Err(crate::Error::internal(format_args!(
"Unabled to convert {s} to DatasetCondition"
))),
Expand Down

0 comments on commit 3bcc2e5

Please sign in to comment.