Class: Ghost::ContentAPI
- Inherits:
-
Object
- Object
- Ghost::ContentAPI
- Defined in:
- lib/ghost/content_api.rb
Constant Summary collapse
- RESOURCES =
{ posts: Resources::Content::Posts, pages: Resources::Content::Pages, authors: Resources::Content::Authors, tags: Resources::Content::Tags, settings: Resources::Content::Settings, tiers: Resources::Content::Tiers, newsletters: Resources::Content::Newsletters, offers: Resources::Content::Offers }.freeze
Instance Method Summary collapse
-
#initialize(url:, key:, version: "v5.0") ⇒ ContentAPI
constructor
A new instance of ContentAPI.
Constructor Details
#initialize(url:, key:, version: "v5.0") ⇒ ContentAPI
Returns a new instance of ContentAPI.
16 17 18 19 20 21 |
# File 'lib/ghost/content_api.rb', line 16 def initialize(url:, key:, version: "v5.0") @config = Config.new(url: url, version: version, api_type: "content", key: key) authenticator = Authentication::ContentKey.new(key) @client = Client.new(config: @config, authenticator: authenticator) @resources = {} end |