- author
- - Wouter Beek
- To be done
- - Type-based JS response.
After DELETE: remove that post from DOM.
After POST: add that post to DOM.
After PUT: update that post in DOM.
- post_process(+Request, ?Kind) is det
- HTTP handler that implements a REST interface for postings.
- Arguments:
-
Kind | - is the type of post, and is one of news or
annotation . |
- post(+Post, +Name:atom, -Value) is semidet
- post(+Post, ?Name:atom, -Value) is nondet
- post(-Post, ?Name:atom, -Value) is nondet
- True if Post have Value for the given attribute.
- Arguments:
-
If | - Post is given, it is either the id of a post or a dict
describing the post. When generated, Post is the (atom)
identifier of the post. |
- post(+Id:atom, +Options)// is det
- Generate HTML for apost. Supported Options:
- orientation(+Orientation:oneof([left,right]))
- Orientation of the post. This is used in binary conversations
to show the different conversation parties.
- standalone(+Standalone:boolean)
- Whether this post is part of multiple posts or not.
- posts(+Kind, +Object, +Ids:list(atom), +Options)//
- Generate HTML for a list of posts and add a link to add new
posts. Options:
- order_by(+Property)
- Order posts by Property. Properties are defined by post/3.
- add_add_link(+Boolean)
- Add link to add new posts. Default is
true
.
- add_post_link(+Kind, +Object)//
- Emit HTML that allows for adding a new post
- find_posts(+Kind, :CheckId, -Ids) is det
- True when Ids is a list of all posts of Kind for which
call(CheckId, Id)
is true.
- fresh(+Id:atom) is semidet
- True if post Id is considered fresh.
- all(+Id:atom) is det
- News filter, returning all objects
- relevance(+Id:atom, -Relevance:between(0.0,1.0)) is det
-
- If Importance is higher, then the dropoff of Relevance is flatter.
- Relevance is 0.0 if
FreshnessLifetime =< Age
.
- Relevance is 1.0 if
Age == 0
.
- user_vote_count(+User, -Up, -Down) is det
- Number of votes issued by this user.
- user_posts(+User, +Kind)//
- Show posts from a specific user of the specified Kind.
- user_post_count(+User, +Kind, -Count) is det
- True when Count is the number of posts of Kind created by User.
Undocumented predicates
The following predicates are exported, but not or incorrectly documented.
- sort_posts(Arg1, Arg2)