(Returns Promise)

The fliplet-content package contains helpers to create and manage content using data sources.

When content is created using Fliplet.Content(), a record is stored in the specified data source. This can be used to aggregate all the content being created via different users, screens and apps.

Contents created with Fliplet.Content() can be used to create features such as:

To build these features, create an instance with Fliplet.Content() and use the returned object in the promise resolving function to call the available methods.



Share a page with a URL

This example uses the Fliplet.Communicate.shareURL() API to share the URL once it’s generated. This means the fliplet-communicate dependency also needs to be added.

Fliplet.Content({dataSourceId: 2}).then(function (content) {
    pageId: 3
  }, {
    public: true
    // entry.data.publicSlug returns a slug that can be used for sharing via a http://apps.fliplet.com/r/ URL
    var url = Fliplet.Env.get('appsUrl') + 'r/' + entry.data.publicSlug;
    // Show UI to share the URL

Count number of times a directory entry is tagged

Fliplet.Content({dataSourceId: 2}).then(function (content) {
    content: {
      pageId: 3282,
      dataSourceEntryId: 5234,
    rows; // returns all the data source entries related to the specified content



(Returns Promise)

Create a content entry in the data source. The created entry is passed as the first parameter to the promise resolving function.

.create(content [, options ])


(Returns Promise)

Query for content entries. The result entries are passed as the first parameter to the promise resolving function.

.query([ options ])


(Returns Promise)

Update existing entries with new data.


.update(data, options)


(Returns Promise)

Delete existing entries.


Back to API documentation