pub struct Like {
pub tweet_id: String,
pub full_text: Option<String>,
pub expanded_url: String,
}Expand description
§Example
use twitter_archive::structs::like::Like;
let json = r#"{
"tweetId": "1697051672621597026",
"fullText": "https://t.co/IaCJlkaweW",
"expandedUrl": "https://twitter.com/i/web/status/1697051672621597026"
}"#;
let data: Like = serde_json::from_str(&json).unwrap();
// De-serialized properties
assert_eq!(data.tweet_id, "1697051672621597026");
assert_eq!(data.full_text.clone().unwrap(), "https://t.co/IaCJlkaweW");
assert_eq!(data.expanded_url, "https://twitter.com/i/web/status/1697051672621597026");
// Re-serialize is equivalent to original data
assert_eq!(serde_json::to_string_pretty(&data).unwrap(), json);Fields§
§tweet_id: String§Example JSON data
{ "tweetId": "1697051672621597026" }full_text: Option<String>Property possibly may not exist if;
- Tweeter deletes account
- Tweeter deletes post
- Tweeter makes posts private
- Tweeter blocks archiving account
§Example JSON data
{ "fullText": "https://t.co/IaCJlkaweW" }expanded_url: String§Example JSON data
{ "expandedUrl": "https://twitter.com/i/web/status/1697051672621597026" }Trait Implementations§
Source§impl<'de> Deserialize<'de> for Like
impl<'de> Deserialize<'de> for Like
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Like
impl RefUnwindSafe for Like
impl Send for Like
impl Sync for Like
impl Unpin for Like
impl UnwindSafe for Like
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more