Manage projects

project-management/projects@1.0.1
Supported by 1 provider
A

List Projects

Result
ID of the project.
Name of the project.

1.Choose a provider

2.Use ListProjects 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('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