pub struct Journal<'a> { /* private fields */ }Implementations§
Source§impl<'a> Journal<'a>
impl<'a> Journal<'a>
Sourcepub async fn get_entry(
&self,
day: &str,
) -> Result<GetJournalEntryResponseContent, Error>
pub async fn get_entry( &self, day: &str, ) -> Result<GetJournalEntryResponseContent, Error>
Get journal entry for a day
Sourcepub async fn list_entries(
&self,
params: &ListJournalEntriesParams,
) -> Result<Page<ListJournalEntriesResponseContent>, Error>
pub async fn list_entries( &self, params: &ListJournalEntriesParams, ) -> Result<Page<ListJournalEntriesResponseContent>, Error>
List journal entries newest first. The next page, if any, is a Link header. Pass q to search journal entry content.
Sourcepub async fn update_entry(
&self,
day: &str,
body: &UpdateJournalEntryRequestContent,
) -> Result<UpdateJournalEntryResponseContent, Error>
pub async fn update_entry( &self, day: &str, body: &UpdateJournalEntryRequestContent, ) -> Result<UpdateJournalEntryResponseContent, Error>
Update the journal entry for a day: writes it, creating it if the day has none, and answers the entry as a recording. Empty content removes the entry instead, and HEY then answers 204 with no body — which is not this shape, so send that through the SDK’s own journal wrapper rather than here.
Source§impl Journal<'_>
impl Journal<'_>
Sourcepub async fn get_content(&self, day: &str) -> Result<Option<String>, Error>
pub async fn get_content(&self, day: &str) -> Result<Option<String>, Error>
The rich-text HTML of the day’s journal entry, falling back to its plain text, or
None when the day has no entry. day is YYYY-MM-DD.
The fallback covers an empty content_html as well as a missing one: HEY serves the
key blank on an entry it has no rendered body for, and blank is not the entry.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Journal<'a>
impl<'a> !UnwindSafe for Journal<'a>
impl<'a> Freeze for Journal<'a>
impl<'a> Send for Journal<'a>
impl<'a> Sync for Journal<'a>
impl<'a> Unpin for Journal<'a>
impl<'a> UnsafeUnpin for Journal<'a>
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