ploneintranet.api.microblog package¶
Submodules¶
ploneintranet.api.microblog.statusupdate module¶
-
ploneintranet.api.microblog.statusupdate.
create
(text=u'', microblog_context=None, thread_id=None, mention_ids=None, tags=None, user=None, userid=None, time=None, content_context=None, action_verb=None)¶ Create a status update (post).
Parameters: - text (Unicode object) – text of the post
- microblog_context (Content object) – Container of the post
- user (user object) – User who should post. By default the current user posts.
- userid (string) – userid of the user who should post.
- time (timezone aware datetime object) – time when the post should happen. By default the current time.
- content_context (content object) – a content referenced we are talking about
- action_verb (string) – indicate event source (posted, created, published)
Returns: Newly created statusupdate
Return type: StatusUpdate object
Note that you can add attachments to statusupdates by calling .add_attachment(filename, data) on the returned StatusUpdate.
-
ploneintranet.api.microblog.statusupdate.
get
(status_id)¶ Get a status update by id.
Parameters: status_id (int) – The id of the status update Returns: The matching StatusUpdate Return type: StatusUpdate
Module contents¶
-
ploneintranet.api.microblog.
events_disable
(request=None)¶ Temporarily disable event-driven statusupdate creation for this request.
Parameters: request (Request) – The request for which events are to be disabled
-
ploneintranet.api.microblog.
events_enable
(request=None)¶ Re-enable event-driven statusupdate creation for this request. This only makes sense if you explicitly disabled statusupdate creation, since it is enabled by default.
Parameters: request (Request) – The request for which events were disabled
-
ploneintranet.api.microblog.
get_microblog
()¶ Get the microblog utility
Returns: microblog utility Return type: object