const apiInstance = new Fastly.StarApi();
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({ , [star] })
Create star.
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);
});
Name | Type | Description | Notes |
---|---|---|---|
star | Star | [optional] |
deleteServiceStar({ star_id })
Delete star.
const options = {
star_id: "star_id_example", // required
};
apiInstance.deleteServiceStar(options)
.then(() => {
console.log('API called successfully.');
})
.catch((error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
star_id | String | Alphanumeric string identifying a star. |
null (empty response body)
getServiceStar({ star_id })
Show star.
const options = {
star_id: "star_id_example", // required
};
apiInstance.getServiceStar(options)
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
star_id | String | Alphanumeric string identifying a star. |
listServiceStars()
List stars.
apiInstance.listServiceStars()
.then((data) => {
console.log(data, "API called successfully.");
})
.catch((error) => {
console.error(error);
});
This endpoint does not need any parameters.