If you’d like to interact with data in a Fliplet Data Source using code you will need to do the following three things:

  1. Add the Fliplet Data Sources API to your app
  2. Add a reference to a specific Data Sources to your app
  3. Get the ID of the Data Source so you can use it in your code

We’ll explain more about each one in the sections below.

Add the Fliplet Data Sources API to your app

The Fliplet Data Sources API gives you a series of commands to retrieve, sort, filter and save data. To install the API you need to follow these steps:

  1. Open Fliplet Studio’s Edit screen
  2. Select the Developer Options from the right hand menu
  3. Click the “Include” button in the top right
  4. Select “Libraries”
  5. Type in “fliplet-datasources”
  6. Click the search result to select it
  7. Click “Save”

Full details on the API can be found here.

Add a reference to a specific Data Sources to your app

To access a Data Source you need to ensure that there is a reference to it in your app. You may already have a reference to the Data Source if one of your components already lists it in its settings. But if you’re unsure, you can include it by taking the following steps:

  1. Open Fliplet Studio’s Edit screen
  2. Select the Developer Options from the right hand menu
  3. Click the “Include” button in the top right
  4. Select “Data Sources”
  5. Type the name of the Data Source you want to reference
  6. Click the search result to select it
  7. Click “Save”

Get the ID of the Data Source so you can use it in your code

To refer to a Data Source in your code you will need to use its ID. This is typically a 6-7 digit number. The ID is listed in a few places in Fliplet Studio. You can find it listed in the Data Source manager, but if you’re already in the Developer Options in Fliplet Studio, the fastest way to get the ID is to click the ‘Include’ menu option (see the section above). Make a note of the ID so that you can use it in your code later.