View Source GhostContent (ghost_content v0.1.0)
An Elixir client for the Ghost publishing platform's Content API.
Full documentation of the Ghost Content API is available at: https://ghost.org/docs/content-api/
Summary
Functions
Loads a configuration for use in subsequent API calls.
Gets a single author by ID.
Gets a single author by Slug.
Gets a list of authors.
Gets a single page by ID.
Gets a single page by Slug.
Gets a list of pages.
Gets a single post by ID.
Gets a single post by Slug.
Gets a list of posts.
Gets a single tag by ID.
Gets a single tag by Slug.
Gets a list of tags.
Types
Functions
Loads a configuration for use in subsequent API calls.
@spec get_author(config(), String.t(), options() | nil) :: {:ok, %{authors: [GhostContent.Author.t()]}}
Gets a single author by ID.
Accepts the following options:
fields, include
For exact usage, see: https://ghost.org/docs/content-api/#authors
@spec get_author_by_slug(config(), String.t(), options() | nil) :: {:ok, %{authors: [GhostContent.Author.t()]}}
Gets a single author by Slug.
Accepts the following options:
fields, include
For exact usage, see: https://ghost.org/docs/content-api/#authors
@spec get_authors(config(), options() | nil) :: {:ok, %{authors: [GhostContent.Author.t()]}}
Gets a list of authors.
Accepts the following options:
limit, page, filter, order, fields, include
For exact usage, see: https://ghost.org/docs/content-api/#authors
@spec get_page(config(), String.t(), options() | nil) :: {:ok, %{pages: [GhostContent.Post.t()]}}
Gets a single page by ID.
Accepts the following options:
fields, include
For exact usage, see: https://ghost.org/docs/content-api/#pages
@spec get_page_by_slug(config(), String.t(), options() | nil) :: {:ok, %{pages: [GhostContent.Post.t()]}}
Gets a single page by Slug.
Accepts the following options:
fields, include
For exact usage, see: https://ghost.org/docs/content-api/#pages
@spec get_pages(config(), options() | nil) :: {:ok, %{pages: [GhostContent.Post.t()]}}
Gets a list of pages.
Accepts the following options:
limit, page, filter, order, fields, include
For exact usage, see: https://ghost.org/docs/content-api/#pages
@spec get_post(config(), String.t(), options() | nil) :: {:ok, %{posts: [GhostContent.Post.t()]}}
Gets a single post by ID.
Accepts the following options:
fields, include
For exact usage, see: https://ghost.org/docs/content-api/#posts
@spec get_post_by_slug(config(), String.t(), options() | nil) :: {:ok, %{posts: [GhostContent.Post.t()]}}
Gets a single post by Slug.
Accepts the following options:
fields, include
For exact usage, see: https://ghost.org/docs/content-api/#posts
@spec get_posts(config(), options() | nil) :: {:ok, %{meta: meta(), posts: [GhostContent.Post.t()]}}
Gets a list of posts.
Accepts the following options:
limit, page, filter, order, fields, include
For exact usage, see: https://ghost.org/docs/content-api/#posts
@spec get_tag(config(), String.t(), options() | nil) :: {:ok, %{tags: [GhostContent.Tag.t()]}}
Gets a single tag by ID.
Accepts the following options:
fields, include
For exact usage, see: https://ghost.org/docs/content-api/#tags
@spec get_tag_by_slug(config(), String.t(), options() | nil) :: {:ok, %{tags: [GhostContent.Tag.t()]}}
Gets a single tag by Slug.
Accepts the following options:
fields, include
For exact usage, see: https://ghost.org/docs/content-api/#tags
@spec get_tags(config(), options() | nil) :: {:ok, %{tags: [GhostContent.Tag.t()]}}
Gets a list of tags.
Accepts the following options:
limit, page, filter, order, fields, include
For exact usage, see: https://ghost.org/docs/content-api/#tags