Project

spooked

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
An experimental unofficial API client for the ghost.org blogging platform
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

⚠️ UNMAINTAINED ⚠️

spooked

An experimental (and very limited!) unofficial Ruby client for the ghost.org / ghost.io blogging platform API.

Gem Version

Usage

Client Options

If not explicitly passed a client, all methods will fall back to Client.default_client. You can set that default client directly or have it auto-constructed from a set of default options:

client_id

Has no default, must be provided.

The Client ID used for Client Authentication. See http://api.ghost.org/docs/client-authentication#client-restrictions for details on how to obtain that information.

client_secret

Has no default, must be provided.

The Client Secret used for Client Authentication. See http://api.ghost.org/docs/client-authentication#client-restrictions for details on how to obtain that information.

connection_builder

Optional

A Faraday connection builder. Defaults to:

->(builder) {
  builder.adapter   Faraday.default_adapter
  builder.request   :url_encoded
  builder.response  :parse_json
}

connection_options

Optional

A Hash of options passed as the second parameter to Faraday::Connection.new.

subdomain

Has no default, optional

For ghost.io hosted ghost instances, set this to your ghost.io subdomain, i.e. the word preceding ghost.io in the URL of your blog's administration interface.

For self-hosted instances, you probably want to keep the subdomain empty and overwrite url_base instead.

url_base

Optional

Defaults to ->(client) { "https://#{client.subdomain}.ghost.io/ghost/api/v0.1" }. You should generally only overwrite this if you self-host your ghost instance.

APIs

  • Posts.list(fields: nil, filter: nil, include: nil, limit: 15, order: "published_at desc", page: 1)

Response format

All responses are returned as a Hash with all keys and values exactly as described in the API Reference Documentation.

Compatibility

So far, this has only been verified to work on Ruby (MRI) 2.3.3. I have no plans to support any Ruby versions below 2.3.

Status

This library is in a very early stage, only supports a very limited subset of the API and further e.g. does not yet feature any automated tests, nor does it significantly transform any API responses, provide convenience helpers, etc.

At the moment, The following APIs are supported: