Lists

crm/lists@1.0.1
2 providers

Get All Lists

Get all available contact lists

Input
Page
Result
lists
Next page

1.Choose a provider

2.Use GetLists with mock in your code

npm i @superfaceai/one-sdk
const { SuperfaceClient } = require('@superfaceai/one-sdk');

const sdk = new SuperfaceClient();

async function run() {
  // Load the profile
  const profile = await sdk.getProfile('crm/lists@1.0.1');

  // Use the profile
  const result = await profile
    .getUseCase('GetLists')
    .perform({}, {
      provider: 'mock'
    });

  // Handle the result
  try {
    const data = result.unwrap();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

run();

Structure details

Input (object)

page
Pagination cursor (obtained from `nextPage`).

Example

{}

Result (object)

lists
nextPage
Next page cursor.

Example

{
  "lists": [
    {
      "listId": "foo-bar-1",
      "name": "The first list",
      "length": 42
    }
  ],
  "nextPage": "opaquenextpagetoken"
}

Implementation details

Provider
mock
Use case
GetLists
Author
@superface
Source
Verified