Projects

Certain services, including IPFS storage and IPNS, require authentication with a projectId to interact with them. The SDK makes it easy to get the projectId needed for the services that call for it.

Create a project

const projectId = await fleekSdk.projects().create({
  name: 'My Project',
});

List projects

const projects = await fleekSdk.projects().list();

This returns a list of projects:

[
  {
    "id": "cldn4lfcy0002lg0835mekajd",
    "name": "fleek"
  },
  {
    "id": "cdawndf4fladfcfa2wnay8s25",
    "name": "My Project"
  }
]

Get project

const project = await fleekSdk.projects().get({
  id: 'clfk15m6p0002l608gvtp9gm5',
});

This returns a the project details:

{
  "id": "clfk15m6p0002l608gvtp9gm5",
  "name": "My Project"
}