Superface

Manage projects

project-management/projects@1.0.1
1 provider

List Projects

Result
ID of the project.
Name of the project.

1.Choose a provider

2.Use ListProjects with mock in your code

Below instructions are for our Node.js SDK. Use OneService for other languages.
npm i @superfaceai/one-sdk
const { SuperfaceClient } = require('@superfaceai/one-sdk');

// You can manage tokens here: https://superface.ai/insights
const sdk = new SuperfaceClient({ sdkAuthToken: '<< Login to get your token >>' });

async function run() {
  // Load the profile
  const profile = await sdk.getProfile('project-management/projects@1.0.1');

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

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

run();

Structure details

Result (list of objects)

id
ID of the project.
name
Name of the project.

Example

[
  {
    "id": "46ebca75-68af-42a1-916d-b228c2082d4f",
    "name": "Take over the world!"
  }
]

Implementation details

Provider
mock
Use case
ListProjects
Author
@superface
Source
Verified