← Ghost.org (Content API) + SWAPI - Star Wars integrations

Get Film with SWAPI - Star Wars API on New Author from Ghost.org (Content API) API

Pipedream makes it easy to connect APIs for SWAPI - Star Wars, Ghost.org (Content API) and 900+ other apps remarkably fast.

Trigger workflow on
New Author from the Ghost.org (Content API) API
Next, do this
Get Film with the SWAPI - Star Wars API
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜
Trusted by 250,000+ developers from startups to Fortune 500 companies:
Trusted by 250,000+ developers from startups to Fortune 500 companies

Developers Pipedream

Getting Started

This integration creates a workflow with a Ghost.org (Content API) trigger and SWAPI - Star Wars action. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Select this integration
  2. Configure the New Author trigger
    1. Connect your Ghost.org (Content API) account
    2. Configure timer
  3. Configure the Get Film action
    1. Connect your SWAPI - Star Wars account
    2. Select a film
  4. Deploy the workflow
  5. Send a test event to validate your setup
  6. Turn on the trigger

Details

This integration uses pre-built, open source components from Pipedream's GitHub repo. These components are developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

Trigger

Description:Emit new event for each new author added on a site.
Version:0.0.2
Key:ghost_org_content_api-new-author

Trigger Code

// eslint-disable-next-line camelcase
const ghost_org_content_api = require("../../ghost_org_content_api.app.js");

module.exports = {
  type: "source",
  key: "ghost_org_content_api-new-author",
  name: "New Author",
  description: "Emit new event for each new author added on a site.",
  version: "0.0.2",
  dedupe: "unique",
  props: {
    ghost_org_content_api,
    db: "$.service.db",
    // eslint-disable-next-line pipedream/props-label,pipedream/props-description
    timer: {
      type: "$.interface.timer",
      default: {
        intervalSeconds: 60 * 15,
      },
    },
  },
  async run() {
    let total = 1;
    let page = 1;

    while (page <= total) {
      let results = await this.ghost_org_content_api.getAuthors(page);
      total = results.data.meta.pagination.pages;
      for (const result of results.data.authors) {
        this.$emit(result, {
          id: result.id,
          summary: result.name,
          ts: Date.now(),
        });
      }
      page++;
    }
  },
};

Trigger Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
Ghost.org (Content API)ghost_org_content_apiappThis component uses the Ghost.org (Content API) app.
N/Adb$.service.dbThis component uses $.service.db to maintain state between component invocations.
timer$.interface.timer

Trigger Authentication

Ghost.org (Content API) uses API keys for authentication. When you connect your Ghost.org (Content API) account, Pipedream securely stores the keys so you can easily authenticate to Ghost.org (Content API) APIs in both code and no-code steps.

The Content API Key can be obtained by creating a new Custom Integration under the Integrations screen in Ghost Admin. There are details on connecting to the API in the Client Library page for Content API.

About Ghost.org (Content API)

Open source publishing platform

Action

Description:
Version:0.0.12
Key:swapi-get-film

Action Code

const swapi = require('../../swapi.app.js')
const axios = require('axios')

module.exports = {
  key: "swapi-get-film",
  name: "Get Film",
  version: "0.0.12",
  type: "action",
  props: {
    swapi,
    film: { propDefinition: [swapi, "film"] },
  },
  async run() {
    return (await axios({
      url: `https://swapi.dev/api/films/${this.film}`
    })).data
  },
}

Action Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI.

LabelPropTypeDescription
SWAPI - Star WarsswapiappThis component uses the SWAPI - Star Wars app.
filmfilmstringSelect a value from the drop down menu.

Action Authentication

The SWAPI - Star Wars API does not require authentication.

About SWAPI - Star Wars

The Star Wars API

More Ways to Connect SWAPI - Star Wars + Ghost.org (Content API)

New Author from the Ghost.org (Content API) API

Emit new event for each new author added on a site.

 
Try it
Find author with the Ghost.org (Content API) API

Find an author. See the docs here.

 
Try it
Get Film with the SWAPI - Star Wars API
 
Try it