@@ -619,6 +619,51 @@ def get_public_journal_entries(
619619 )
620620 return BugoutJournalEntries (** result )
621621
622+ def create_public_journal_entry (
623+ self ,
624+ journal_id : Union [str , uuid .UUID ],
625+ title : str ,
626+ content : str ,
627+ tags : List [str ] = [],
628+ context_url : Optional [str ] = None ,
629+ context_id : Optional [str ] = None ,
630+ context_type : Optional [str ] = None ,
631+ ** kwargs : Dict [str , Any ],
632+ ) -> BugoutJournalEntry :
633+ entry_path = f"public/{ journal_id } /entries"
634+ json = {
635+ "title" : title ,
636+ "content" : content ,
637+ "tags" : tags ,
638+ "context_url" : context_url ,
639+ "context_id" : context_id ,
640+ "context_type" : context_type ,
641+ }
642+ headers = {}
643+ if "headers" in kwargs .keys ():
644+ headers .update (kwargs ["headers" ])
645+ result = self ._call (
646+ method = Method .post , path = entry_path , headers = headers , json = json
647+ )
648+ return BugoutJournalEntry (** result )
649+
650+ def touch_public_journal_entry (
651+ self ,
652+ journal_id : Union [str , uuid .UUID ],
653+ entry_id : Union [str , uuid .UUID ],
654+ ** kwargs : Dict [str , Any ],
655+ ) -> List [str ]:
656+ public_journal_path = f"public/{ journal_id } /entries/{ entry_id } "
657+ headers = {}
658+ if "headers" in kwargs .keys ():
659+ headers .update (kwargs ["headers" ])
660+ result = self ._call (
661+ method = Method .put ,
662+ path = public_journal_path ,
663+ headers = headers ,
664+ )
665+ return result
666+
622667 def get_public_journal_entry (
623668 self ,
624669 journal_id : Union [str , uuid .UUID ],
0 commit comments