{"id":28273074,"url":"https://github.com/zesty-io/phastly","last_synced_at":"2025-08-24T19:07:12.503Z","repository":{"id":57322928,"uuid":"64800676","full_name":"zesty-io/phastly","owner":"zesty-io","description":"node.js functional fastly api with promises","archived":false,"fork":false,"pushed_at":"2016-08-15T22:58:36.000Z","size":33,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-21T00:17:15.886Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zesty-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-03T00:04:30.000Z","updated_at":"2016-08-10T14:45:46.000Z","dependencies_parsed_at":"2022-08-25T20:40:15.069Z","dependency_job_id":null,"html_url":"https://github.com/zesty-io/phastly","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/zesty-io/phastly","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zesty-io%2Fphastly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zesty-io%2Fphastly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zesty-io%2Fphastly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zesty-io%2Fphastly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zesty-io","download_url":"https://codeload.github.com/zesty-io/phastly/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zesty-io%2Fphastly/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260457232,"owners_count":23012261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-21T00:17:15.748Z","updated_at":"2025-06-26T00:05:55.569Z","avatar_url":"https://github.com/zesty-io.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# phastly\nfunctional fastly api with promises. A simple, minimal node.js fastly api wrapper. Sends the requests out and gives you back promises which resolve to the parsed object.\n\nThis library seeks to be developer friendly by providing promises and mapping each endpoint to a function for you, hopefully resulting in less time reading documentation: less fat-fingering of URLs, less forgetting http verbs.\n\nFor information on request parameters and response formats, please read: \u003chttps://docs.fastly.com/api/\u003e\n\nCurrently in development and does not immediately seek to cover all endpoints but open to it. Pull requests and feature requests welcome.\n\nTested with node4+\n\n## Style - Why do most functions end in \"P\"?\n\nThis denotes a promise is being returned. It is an opinionated style that I've adopted because unless you are using an IDE with really good type hinting you don't always know when a promise is being returned or not. And unlike other javascript types promises cannot and should not be silently coerced into their resolved value. Functions returning promises are always treated differently so this naming convention makes this behavior obvious.\n\n## Usage\n\nIf set, phastly will automatically use the environment variable `process.env.FASTLY_API_KEY`. Or set/change the key with function `setApiKey()`\n\nThis is a great project for populating env variables from a file: \u003chttps://www.npmjs.com/package/dotenv\u003e\n\n### Promises\n\n```js\nimport * as fastly from 'phastly'\n// or\n// const fastly = require('phastly')\n\nfunction setupP(name) {\n  return fastly.createServiceP(name)\n  .then((service) =\u003e {\n    // use service here\n  })\n}\n```\n\n### Async/Await\n```js\nimport * as fastly from 'phastly'\n\nasync function setupP(name) {\n  let service = await fastly.createServiceP(name)\n\n  const backendData = {\n    name: service.name,\n    address: `foobarbaz.storage.googleapis.com`,\n    hostname: `foobarbaz.storage.googleapis.com`,\n    port: 443,\n  }\n\n  const p1 = fastly.createBackendP(service.id, 1, backendData)\n\n  const domainData = {\n    name: `foobarbaz.global.ssl.fastly.net`,\n    comment: 'generated by my app'\n  }\n\n  const p2 = fastly.createDomainP(service.id, 1, domainData)\n\n  const settingsData = {\n    'general.default_host': `foobarbaz.storage.googleapis.com`\n  }\n\n  const p3 = fastly.updateSettingsP(service.id, 1, settingsData)\n\n  await Promise.all([p1, p2, p3])\n\n  return fastly.activateServiceVersionP(service.id, 1)\n}\n```\n\n## API Reference\nphastly module.\n\n\n* [phastly](#module_phastly)\n    * [.sendP(options)](#module_phastly.sendP) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.purgeP(serviceId, key, [soft])](#module_phastly.purgeP) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.purgeUrlP(url, [soft])](#module_phastly.purgeUrlP) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.purgeAllP(serviceId)](#module_phastly.purgeAllP) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.createBackendP(serviceId, version, data)](#module_phastly.createBackendP) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.deleteBackendP(serviceId, version, name)](#module_phastly.deleteBackendP) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.createServiceP(name)](#module_phastly.createServiceP) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.updateServiceP(params)](#module_phastly.updateServiceP) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.createServiceVersionP(serviceId)](#module_phastly.createServiceVersionP) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.updateServiceVersionP(serviceId, version, data)](#module_phastly.updateServiceVersionP) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.validateServiceVersionP(serviceId, version)](#module_phastly.validateServiceVersionP) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.activateServiceVersionP(serviceId, version)](#module_phastly.activateServiceVersionP) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.deactivateServiceVersionP(serviceId, version)](#module_phastly.deactivateServiceVersionP) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.cloneServiceVersion(serviceId, version)](#module_phastly.cloneServiceVersion) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.lockServiceVersion(serviceId, version)](#module_phastly.lockServiceVersion) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.deleteServiceP(serviceId)](#module_phastly.deleteServiceP) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.renameServiceP(serviceId, newName)](#module_phastly.renameServiceP) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.filterActiveVersion(versions)](#module_phastly.filterActiveVersion) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n    * [.ListServicesP()](#module_phastly.ListServicesP) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.getServiceP(serviceId)](#module_phastly.getServiceP) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.getServiceByNameP(name)](#module_phastly.getServiceByNameP) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.getServiceDetailsP(serviceId)](#module_phastly.getServiceDetailsP) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.getServiceDomainsP(service)](#module_phastly.getServiceDomainsP) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.createDomainP(serviceId, version, data)](#module_phastly.createDomainP) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.checkAllDomainsP(serviceId, version)](#module_phastly.checkAllDomainsP) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.createRequestSettingP(serviceId, version, settings)](#module_phastly.createRequestSettingP) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.updateSettingsP(serviceId, version, settings)](#module_phastly.updateSettingsP) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n    * [.setApiKey(key)](#module_phastly.setApiKey)\n\n\u003ca name=\"module_phastly.sendP\"\u003e\u003c/a\u003e\n\n### phastly.sendP(options) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nWrapper to send a fastly api request. Use this if the endpoint you need hasn't been mapped to a function.\n\n**Kind**: static method of \u003ccode\u003e[phastly](#module_phastly)\u003c/code\u003e  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - resolving to response  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| options | \u003ccode\u003eObject\u003c/code\u003e |  |\n| options.params | \u003ccode\u003eObject\u003c/code\u003e | parameters to upload with encoding: application/x-www-form-urlencoded |\n| options.baseUrl | \u003ccode\u003estring\u003c/code\u003e | fastly api baseUrl (default: 'https://api.fastly.com') |\n| options.endpoint | \u003ccode\u003estring\u003c/code\u003e | fastly api endpoint e.g. 'service/${serviceId}/version/${version}/backend' (default: '') |\n| options.headers | \u003ccode\u003eObject\u003c/code\u003e | add to or overwrite the default headers (default: {'Fastly-Key', Accept}) |\n| options.method | \u003ccode\u003estring\u003c/code\u003e | the http method (default: GET) |\n| options.timeout | \u003ccode\u003enumber\u003c/code\u003e | the connection timeout in ms (default: 5000) |\n\n\u003ca name=\"module_phastly.purgeP\"\u003e\u003c/a\u003e\n\n### phastly.purgeP(serviceId, key, [soft]) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nInstant Purge a particular service of items tagged with a Surrogate Key. Soft Purging sets an object's TTL to 0s, forcing revalidation. For best results, Soft Purging should be used in conjuction with stale_while_revalidate and stale_if_error.\n\n**Kind**: static method of \u003ccode\u003e[phastly](#module_phastly)\u003c/code\u003e  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - resolves to parsed api result object  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| serviceId | \u003ccode\u003estring\u003c/code\u003e |  |  |\n| key | \u003ccode\u003estring\u003c/code\u003e |  |  |\n| [soft] | \u003ccode\u003eBoolean\u003c/code\u003e | \u003ccode\u003efalse\u003c/code\u003e | sets an object's TTL to 0s |\n\n\u003ca name=\"module_phastly.purgeUrlP\"\u003e\u003c/a\u003e\n\n### phastly.purgeUrlP(url, [soft]) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nInstant Purge an individual URL. Soft Purging sets an object's TTL to 0s, forcing revalidation. For best results, Soft Purging should be used in conjuction with stale_while_revalidate and stale_if_error.\n\n**Kind**: static method of \u003ccode\u003e[phastly](#module_phastly)\u003c/code\u003e  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - resolves to parsed api result object  \n\n| Param | Type | Default |\n| --- | --- | --- |\n| url | \u003ccode\u003estring\u003c/code\u003e |  | \n| [soft] | \u003ccode\u003eBoolean\u003c/code\u003e | \u003ccode\u003efalse\u003c/code\u003e | \n\n\u003ca name=\"module_phastly.purgeAllP\"\u003e\u003c/a\u003e\n\n### phastly.purgeAllP(serviceId) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nInstant Purge everything from a service\n\n**Kind**: static method of \u003ccode\u003e[phastly](#module_phastly)\u003c/code\u003e  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - resolves to parsed api result object  \n\n| Param | Type |\n| --- | --- |\n| serviceId | \u003ccode\u003estring\u003c/code\u003e | \n\n\u003ca name=\"module_phastly.createBackendP\"\u003e\u003c/a\u003e\n\n### phastly.createBackendP(serviceId, version, data) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nCreate a backend for a particular service and version\n\n**Kind**: static method of \u003ccode\u003e[phastly](#module_phastly)\u003c/code\u003e  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - resolves to parsed api result object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| serviceId | \u003ccode\u003estring\u003c/code\u003e |  |\n| version | \u003ccode\u003enumber\u003c/code\u003e |  |\n| data | \u003ccode\u003eObject\u003c/code\u003e | keys are backend object keys |\n\n\u003ca name=\"module_phastly.deleteBackendP\"\u003e\u003c/a\u003e\n\n### phastly.deleteBackendP(serviceId, version, name) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nDelete the backend for a particular service and version\n\n**Kind**: static method of \u003ccode\u003e[phastly](#module_phastly)\u003c/code\u003e  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - resolves to parsed api result object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| serviceId | \u003ccode\u003estring\u003c/code\u003e |  |\n| version | \u003ccode\u003enumber\u003c/code\u003e |  |\n| name | \u003ccode\u003estring\u003c/code\u003e | name of backend |\n\n\u003ca name=\"module_phastly.createServiceP\"\u003e\u003c/a\u003e\n\n### phastly.createServiceP(name) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nCreate a service\n\n**Kind**: static method of \u003ccode\u003e[phastly](#module_phastly)\u003c/code\u003e  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - resolves to parsed api result object  \n\n| Param | Type |\n| --- | --- |\n| name | \u003ccode\u003estring\u003c/code\u003e | \n\n\u003ca name=\"module_phastly.updateServiceP\"\u003e\u003c/a\u003e\n\n### phastly.updateServiceP(params) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nUpdate a service\n\n**Kind**: static method of \u003ccode\u003e[phastly](#module_phastly)\u003c/code\u003e  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - resolves to parsed api result object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| params | \u003ccode\u003eObject\u003c/code\u003e | key/values of paramters to update |\n\n\u003ca name=\"module_phastly.createServiceVersionP\"\u003e\u003c/a\u003e\n\n### phastly.createServiceVersionP(serviceId) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nCreate a version for a particular service\n\n**Kind**: static method of \u003ccode\u003e[phastly](#module_phastly)\u003c/code\u003e  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - resolves to parsed api result object  \n\n| Param | Type |\n| --- | --- |\n| serviceId | \u003ccode\u003estring\u003c/code\u003e | \n\n\u003ca name=\"module_phastly.updateServiceVersionP\"\u003e\u003c/a\u003e\n\n### phastly.updateServiceVersionP(serviceId, version, data) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nUpdate a particular version for a particular service.\n\n**Kind**: static method of \u003ccode\u003e[phastly](#module_phastly)\u003c/code\u003e  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - resolves to parsed api result object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| serviceId | \u003ccode\u003estring\u003c/code\u003e |  |\n| version | \u003ccode\u003enumber\u003c/code\u003e |  |\n| data | \u003ccode\u003eObject\u003c/code\u003e | keys are service object keys |\n\n\u003ca name=\"module_phastly.validateServiceVersionP\"\u003e\u003c/a\u003e\n\n### phastly.validateServiceVersionP(serviceId, version) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nValidate the version for a particular service and version\n\n**Kind**: static method of \u003ccode\u003e[phastly](#module_phastly)\u003c/code\u003e  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - resolves to parsed api result object  \n\n| Param | Type |\n| --- | --- |\n| serviceId | \u003ccode\u003estring\u003c/code\u003e | \n| version | \u003ccode\u003enumber\u003c/code\u003e | \n\n\u003ca name=\"module_phastly.activateServiceVersionP\"\u003e\u003c/a\u003e\n\n### phastly.activateServiceVersionP(serviceId, version) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nActivate the current version\n\n**Kind**: static method of \u003ccode\u003e[phastly](#module_phastly)\u003c/code\u003e  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - resolves to parsed api result object  \n\n| Param | Type |\n| --- | --- |\n| serviceId | \u003ccode\u003estring\u003c/code\u003e | \n| version | \u003ccode\u003enumber\u003c/code\u003e | \n\n\u003ca name=\"module_phastly.deactivateServiceVersionP\"\u003e\u003c/a\u003e\n\n### phastly.deactivateServiceVersionP(serviceId, version) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nDeactivate the current version\n\n**Kind**: static method of \u003ccode\u003e[phastly](#module_phastly)\u003c/code\u003e  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - resolves to parsed api result object  \n\n| Param | Type |\n| --- | --- |\n| serviceId | \u003ccode\u003estring\u003c/code\u003e | \n| version | \u003ccode\u003enumber\u003c/code\u003e | \n\n\u003ca name=\"module_phastly.cloneServiceVersion\"\u003e\u003c/a\u003e\n\n### phastly.cloneServiceVersion(serviceId, version) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nClone the current configuration into a new version\n\n**Kind**: static method of \u003ccode\u003e[phastly](#module_phastly)\u003c/code\u003e  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - resolves to parsed api result object  \n\n| Param | Type |\n| --- | --- |\n| serviceId | \u003ccode\u003estring\u003c/code\u003e | \n| version | \u003ccode\u003enumber\u003c/code\u003e | \n\n\u003ca name=\"module_phastly.lockServiceVersion\"\u003e\u003c/a\u003e\n\n### phastly.lockServiceVersion(serviceId, version) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nLocks the specified version\n\n**Kind**: static method of \u003ccode\u003e[phastly](#module_phastly)\u003c/code\u003e  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - resolves to parsed api result object  \n\n| Param | Type |\n| --- | --- |\n| serviceId | \u003ccode\u003estring\u003c/code\u003e | \n| version | \u003ccode\u003enumber\u003c/code\u003e | \n\n\u003ca name=\"module_phastly.deleteServiceP\"\u003e\u003c/a\u003e\n\n### phastly.deleteServiceP(serviceId) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nDelete a service\n\n**Kind**: static method of \u003ccode\u003e[phastly](#module_phastly)\u003c/code\u003e  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - resolves to parsed api result object  \n\n| Param | Type |\n| --- | --- |\n| serviceId | \u003ccode\u003estring\u003c/code\u003e | \n\n\u003ca name=\"module_phastly.renameServiceP\"\u003e\u003c/a\u003e\n\n### phastly.renameServiceP(serviceId, newName) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nRename a service\n\n**Kind**: static method of \u003ccode\u003e[phastly](#module_phastly)\u003c/code\u003e  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - resolves to parsed api result object  \n\n| Param | Type |\n| --- | --- |\n| serviceId | \u003ccode\u003estring\u003c/code\u003e | \n| newName | \u003ccode\u003estring\u003c/code\u003e | \n\n\u003ca name=\"module_phastly.filterActiveVersion\"\u003e\u003c/a\u003e\n\n### phastly.filterActiveVersion(versions) ⇒ \u003ccode\u003eObject\u003c/code\u003e\nhelper function - get active version from a fastly version list\n\n**Kind**: static method of \u003ccode\u003e[phastly](#module_phastly)\u003c/code\u003e  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - version information  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| versions | \u003ccode\u003eArray.\u0026lt;Object\u0026gt;\u003c/code\u003e | of the service |\n\n\u003ca name=\"module_phastly.ListServicesP\"\u003e\u003c/a\u003e\n\n### phastly.ListServicesP() ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nList services\n\n**Kind**: static method of \u003ccode\u003e[phastly](#module_phastly)\u003c/code\u003e  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - resolves to parsed api result object  \n\u003ca name=\"module_phastly.getServiceP\"\u003e\u003c/a\u003e\n\n### phastly.getServiceP(serviceId) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nGet a service by id\n\n**Kind**: static method of \u003ccode\u003e[phastly](#module_phastly)\u003c/code\u003e  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - resolves to parsed api result object  \n\n| Param | Type |\n| --- | --- |\n| serviceId | \u003ccode\u003estring\u003c/code\u003e | \n\n\u003ca name=\"module_phastly.getServiceByNameP\"\u003e\u003c/a\u003e\n\n### phastly.getServiceByNameP(name) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nGet a service by name\n\n**Kind**: static method of \u003ccode\u003e[phastly](#module_phastly)\u003c/code\u003e  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - resolves to parsed api result object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| name | \u003ccode\u003estring\u003c/code\u003e | name of service |\n\n\u003ca name=\"module_phastly.getServiceDetailsP\"\u003e\u003c/a\u003e\n\n### phastly.getServiceDetailsP(serviceId) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nList detailed information on a specified service\n\n**Kind**: static method of \u003ccode\u003e[phastly](#module_phastly)\u003c/code\u003e  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - resolves to parsed api result object  \n\n| Param | Type |\n| --- | --- |\n| serviceId | \u003ccode\u003estring\u003c/code\u003e | \n\n\u003ca name=\"module_phastly.getServiceDomainsP\"\u003e\u003c/a\u003e\n\n### phastly.getServiceDomainsP(service) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nList the domains within a service\n\n**Kind**: static method of \u003ccode\u003e[phastly](#module_phastly)\u003c/code\u003e  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - resolves to deserialized response  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| service | \u003ccode\u003estring\u003c/code\u003e | id |\n\n\u003ca name=\"module_phastly.createDomainP\"\u003e\u003c/a\u003e\n\n### phastly.createDomainP(serviceId, version, data) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nCreate a domain for a particular service and version\n\n**Kind**: static method of \u003ccode\u003e[phastly](#module_phastly)\u003c/code\u003e  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - resolves to parsed api result object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| serviceId | \u003ccode\u003estring\u003c/code\u003e |  |\n| version | \u003ccode\u003enumber\u003c/code\u003e |  |\n| data | \u003ccode\u003eObject\u003c/code\u003e | fastly domain object |\n\n\u003ca name=\"module_phastly.checkAllDomainsP\"\u003e\u003c/a\u003e\n\n### phastly.checkAllDomainsP(serviceId, version) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nCheck all domains' DNS for a particular service and version\n\n**Kind**: static method of \u003ccode\u003e[phastly](#module_phastly)\u003c/code\u003e  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - resolves to parsed api result object  \n\n| Param | Type |\n| --- | --- |\n| serviceId | \u003ccode\u003estring\u003c/code\u003e | \n| version | \u003ccode\u003enumber\u003c/code\u003e | \n\n\u003ca name=\"module_phastly.createRequestSettingP\"\u003e\u003c/a\u003e\n\n### phastly.createRequestSettingP(serviceId, version, settings) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nCreate a new Request Settings object\n\n**Kind**: static method of \u003ccode\u003e[phastly](#module_phastly)\u003c/code\u003e  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| serviceId | \u003ccode\u003estring\u003c/code\u003e |  |\n| version | \u003ccode\u003enumber\u003c/code\u003e |  |\n| settings | \u003ccode\u003eObject\u003c/code\u003e | fastly request settings object: {hash_keys, action, ...} |\n\n\u003ca name=\"module_phastly.updateSettingsP\"\u003e\u003c/a\u003e\n\n### phastly.updateSettingsP(serviceId, version, settings) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nUpdate the settings for a particular service and version\n\n**Kind**: static method of \u003ccode\u003e[phastly](#module_phastly)\u003c/code\u003e  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - resolves to parsed api result object  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| serviceId | \u003ccode\u003estring\u003c/code\u003e |  |\n| version | \u003ccode\u003enumber\u003c/code\u003e |  |\n| settings | \u003ccode\u003eObject\u003c/code\u003e | fastly settings object e.g. {general.default_host, general.default_ttl, ...} |\n\n\u003ca name=\"module_phastly.setApiKey\"\u003e\u003c/a\u003e\n\n### phastly.setApiKey(key)\nset or change the fastly api key\n\n**Kind**: static method of \u003ccode\u003e[phastly](#module_phastly)\u003c/code\u003e  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| key | \u003ccode\u003estring\u003c/code\u003e | your fastly api key |\n\n\n## Documentation\n\nTo update `README.md` make changes in `doc/README.md.hbs` and/or `src/index.js` and run `doc/generate`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzesty-io%2Fphastly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzesty-io%2Fphastly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzesty-io%2Fphastly/lists"}