3.0.0 • Published 11 months ago

rescript-contentful v3.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

rescript-contentful

npm npm

ReScript bindings (FFI) for contentful.js, the JavaScript library for interacting with Contentful's Delivery API.

Installation

Run npm install rescript-contentful contentful, and then update the bs-dependencies key in your rescript.json file to include "rescript-contentful".

Usage

open Contentful

// Create a Contentful client instance
let client = createClient({
  accessToken: "<ACCESS_TOKEN>",
  space: "<SPACE_ID>",
})

// Fetch an entry
// client is piped to the first
// argument of the function
client
->getEntry(id)
->Promise.then(entry => { /* do something */ })

// Fetch an asset
client
->getAsset(id, ())
->Promise.then(asset => { /* do something */ })

See DOCUMENTATION.md for a more detailed outline of the API.

License

MIT Licensed. Full text available in the LICENSE file.

3.0.0

11 months ago

2.0.0

2 years ago

2.0.0-beta.1

3 years ago

1.0.1

3 years ago

1.0.0

4 years ago