Skip to content

DoSomethingArchive/gambit-content

Repository files navigation

wercker status codecov

Gambit Content

Gambit Content fetches data from Phoenix and Contentful to provide a Content API for use by Gambit Conversations.

API

All endpoints require either a valid x-gambit-api-key header or apiKey query parameter.

Endpoint Functionality
GET /v1/broadcasts Retrieve broadcasts
GET /v1/broadcasts/:id Retrieve a broadcast
GET /v1/campaigns/:id Retrieve a campaign
GET /v1/contentfulEntries/ Retrieve Contentful entries
GET /v1/contentfulEntries/:id Retrieve a Contentful entry
GET /v1/defaultTopicTriggers Retrieve all additional default topic triggers
GET /v1/topics/:id Retrieve a topic

Development

Gambit Content is built using Express and Redis.

Installation

  • Install Node and Redis
  • Clone this repo, and create a .env file with required variables. See .env.example.
  • Redis should be running.
    • Run redis-cli ping. You should get PONG as a response.
    • If error, make sure you have installed redis using brew and started the service.
  • npm install
  • npm start

Contributing

  • Contributions to this repo must adhere to the steps in wunder.io's Git workflow: Wunderflow.

  • Run npm all-tests to lint code and run automated tests.

License

©2018 DoSomething.org. Gambit Content is free software, and may be redistributed under the terms specified in the LICENSE file. The name and logo for DoSomething.org are trademarks of Do Something, Inc and may not be used without permission.