Blog (Postex v0.1.7) View Source
For testing only
Link to this section Summary
Functions
Gets a specific post by the id (slug)
Returns a list of all the posts
Returns a list of posts for the page, accepts page as integer or string
Gets a list of all the tags
Number of pages of posts
Returns a list of all the posts with a tag
Returns a map with the tags as keys and the frequency as a value
Link to this section Functions
Specs
fetch_post(binary()) :: {:ok, Postex.Post.t()} | {:error, :not_found}
Specs
get_post(binary()) :: Postex.Post.t() | nil
Gets a specific post by the id (slug)
Specs
list_posts() :: [Postex.Post.t()]
Returns a list of all the posts
Specs
list_posts(pos_integer() | String.t()) :: [Postex.Post.t()]
Returns a list of posts for the page, accepts page as integer or string
Specs
list_tags() :: [binary()]
Gets a list of all the tags
Specs
pages() :: non_neg_integer()
Number of pages of posts
Specs
posts_tagged_with(binary()) :: [Postex.Post.t()]
Returns a list of all the posts with a tag
Specs
tags_with_count() :: %{required(String.t()) => pos_integer()}
Returns a map with the tags as keys and the frequency as a value