View Source Blog (Postex v0.1.8)
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
@spec fetch_post(binary()) :: {:ok, Postex.Post.t()} | {:error, :not_found}
@spec get_post(binary()) :: Postex.Post.t() | nil
Gets a specific post by the id (slug)
@spec list_posts() :: [Postex.Post.t()]
Returns a list of all the posts
@spec list_posts(pos_integer() | String.t()) :: [Postex.Post.t()]
Returns a list of posts for the page, accepts page as integer or string
@spec list_tags() :: [binary()]
Gets a list of all the tags
@spec pages() :: non_neg_integer()
Number of pages of posts
@spec posts_tagged_with(binary()) :: [Postex.Post.t()]
Returns a list of all the posts with a tag
@spec tags_with_count() :: %{required(String.t()) => pos_integer()}
Returns a map with the tags as keys and the frequency as a value