[−][src]Struct wallabag_api::types::Entry
A struct representing an entry from wallabag (a full saved article including all annotations and tags; annotations and tags do not need to be requested separately).
Most fields are controlled by the server. When creating an entry, the server will send a
request to the given url and use the response to populate many of the fields. This response is
what headers
, http_status
, mimetype
, etc. are referring to.
Fields
annotations: Option<Annotations>
Annotation objects for this entry.
content: Option<String>
Content. Should be HTML if present.
created_at: DateTime<Utc>
The timestamp of when the entry was created on the server.
domain_name: Option<String>
The resolved domain name of the url. Could be None if the server couldn't resolve the url.
headers: Option<HashMap<String, String>>
A map of header name -> header value. These appear to be headers from the original source url.
http_status: Option<String>
I'm guessing this is the status the server got when retrieving the content from the url.
id: ID
ID of the entry. Should be an integer. Should also be unique, so can use this directly as the local id if storing the entry in a DB.
is_archived: bool
The archived (or read) status of the entry. These boolean options are sometimes represented as 0 or 1 from the API, which makes parsing in a strongly typed language annoying.
is_public: bool
The public shared status of the entry. If this is true, then there should be a public link
to this exact entry on the server. The link will be based around the value of the uid
field and (TODO: confirm if this can be relied on) formatted as BASE_URL/share/UID.
is_starred: bool
The starred status of the entry.
language: Option<String>
The language of the entry - probably generated by the server from inspecting the response.
mimetype: Option<String>
The mimetype of the entry - probably generated by the server from inspecting the response.
Not sure about the support status for other mimetypes. Observed behaviour suggests that the
server converts everything to HTML - eg. a text/plain mimetype content will be plain text
surrounded by <pre>
tags.
origin_url: Option<String>
Supposedly the original url given will be stored here. If a shortened link is submitted to the server, the short link will be here, but the resolved link will be in URL. Observed behaviour is that this field is never set.
preview_picture: Option<String>
Optional url for an image related to the entry. Eg. for displaying as a background image to the entry tile.
published_at: Option<DateTime<Utc>>
Data about when the entry was published (scraped from the original web page).
published_by: Option<Vec<Option<String>>>
Data about who published the entry (scraped from the original web page).
reading_time: u32
Estimated reading time in minutes. Generated by the server, probably based off your set reading speed or a default.
starred_at: Option<DateTime<Utc>>
Timestamp of when the entry was starred, if it is starred. Unstarring an entry sets this to None.
A list of tag objects associated with this entry.
title: Option<String>
An optional title for the entry.
uid: Option<String>
This will be only set by the server as a unique id to identify the entry if it has been shared. For example if you share via public link on framabag and the uid is FOO, then the public url will be framabag.org/share/FOO
updated_at: DateTime<Utc>
Timestamp when the entry was last updated. This is bumped for any change to any field attached to the entry except for annotations.
TODO: check if entry updates if a tag is globally edited (eg. renamed)
url: Option<String>
Resolved url of the entry. If the origin_url redirected to a different url (eg. via a shortened link), the final url will be stored here.
user_email: String
Email of the user who owns this entry. Currently user_*
fields are redundant since you
can only access entries that belong to you. Entry sharing between users is planned for the
future so this may become relevant soon.
user_id: ID
ID of the user who owns this entry.
user_name: String
username of the user who owns this entry.
Trait Implementations
impl Debug for Entry
[src]
impl<'de> Deserialize<'de> for Entry
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<'_> From<&'_ Entry> for ID
[src]
This is implemented so that an &Entry can be used interchangeably with an ID for some client methods. For convenience.
impl<'_> From<&'_ Entry> for PatchEntry
[src]
Convert an Entry to a set of changes ready for sending to the api.
impl From<Entry> for ID
[src]
This is implemented so that an Entry can be used interchangeably with an ID for some client methods. For convenience.
impl Serialize for Entry
[src]
Auto Trait Implementations
impl RefUnwindSafe for Entry
impl Send for Entry
impl Sync for Entry
impl Unpin for Entry
impl UnwindSafe for Entry
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,