Skip to content

Latest commit

 

History

History
154 lines (106 loc) · 2.85 KB

StarApi.md

File metadata and controls

154 lines (106 loc) · 2.85 KB

Fastly.StarApi

const apiInstance = new Fastly.StarApi();

Methods

Note

All URIs are relative to https://api.fastly.com

Method HTTP request Description
createServiceStar POST /stars Create a star
deleteServiceStar DELETE /stars/{star_id} Delete a star
getServiceStar GET /stars/{star_id} Get a star
listServiceStars GET /stars List stars

createServiceStar

createServiceStar({ , [star] })

Create star.

Example

const options = {
  star: {"data":{"type":"star","relationships":{"user":{"data":{"type":"user","id":"6c7kAlo4vACNchGOdQxP37"}},"service":{"data":{"type":"service","id":"SU1Z0isxPaozGVKXdv0eY"}}}}},
};

apiInstance.createServiceStar(options)
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
star Star [optional]

Return type

StarResponse

deleteServiceStar

deleteServiceStar({ star_id })

Delete star.

Example

const options = {
  star_id: "star_id_example", // required
};

apiInstance.deleteServiceStar(options)
  .then(() => {
    console.log('API called successfully.');
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
star_id String Alphanumeric string identifying a star.

Return type

null (empty response body)

getServiceStar

getServiceStar({ star_id })

Show star.

Example

const options = {
  star_id: "star_id_example", // required
};

apiInstance.getServiceStar(options)
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
star_id String Alphanumeric string identifying a star.

Return type

StarResponse

listServiceStars

listServiceStars()

List stars.

Example

apiInstance.listServiceStars()
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

This endpoint does not need any parameters.

Return type

Pagination

[Back to top] [Back to API list] [Back to README]