wp_mini/field/text_url_field.rs
1use crate::field::{AuthRequiredFields, DefaultableFields};
2use strum_macros::{Display, EnumIter};
3
4/// Represents the sub-fields for a `text_url` object.
5///
6/// This object typically provides expiring URLs for accessing story part content.
7#[derive(Debug, Clone, Copy, Display, EnumIter, PartialEq, Eq)]
8#[strum(serialize_all = "camelCase")]
9pub enum TextUrlField {
10 /// The direct, often temporary, URL to the story part's text content.
11 Text,
12 /// A token that can be used to refresh or obtain a new URL for the text content.
13 #[strum(serialize = "refresh_token")]
14 RefreshToken,
15}
16
17impl AuthRequiredFields for TextUrlField {}
18
19impl DefaultableFields for TextUrlField {
20 fn default_fields() -> Vec<Self> {
21 vec![Self::Text]
22 }
23}