Comparing version 2.1.0 to 2.2.0
@@ -63,3 +63,4 @@ var request = require('request'); | ||
Fastly.prototype.purge = function (host, url, callback) { | ||
this.request('POST', '/purge/' + host + url, callback); | ||
var params = { '*': url }; | ||
this.request('PURGE', '/', params, callback); | ||
}; | ||
@@ -73,4 +74,7 @@ | ||
Fastly.prototype.softPurge = function (host, url, callback) { | ||
var params = { 'fastly-soft-purge': 1 }; | ||
this.request('POST', '/purge/' + host + url, params, callback); | ||
var params = { | ||
'fastly-soft-purge': 1, | ||
'*': url | ||
}; | ||
this.request('PURGE', '/', params, callback); | ||
}; | ||
@@ -100,2 +104,15 @@ | ||
Fastly.prototype.datacenters = function (callback) { | ||
this.request('GET', '/datacenters', callback); | ||
}; | ||
Fastly.prototype.publicIpList = function (callback) { | ||
this.request('GET', '/public-ip-list', callback); | ||
}; | ||
Fastly.prototype.edgeCheck = function (checkUrl, callback) { | ||
var url = '/content/edge_check?url=' + encodeURIComponent(checkUrl); | ||
this.request('GET', url, callback); | ||
}; | ||
/** | ||
@@ -102,0 +119,0 @@ * Export |
@@ -8,3 +8,4 @@ { | ||
"Benjamin E. Coe", | ||
"Yousef Cisco" | ||
"Yousef Cisco", | ||
"Mark Dorison" | ||
], | ||
@@ -14,3 +15,3 @@ "name": "fastly", | ||
"keywords": "fastly, api, client", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"homepage": "https://github.com/thisandagain/fastly", | ||
@@ -17,0 +18,0 @@ "repository": { |
@@ -56,2 +56,17 @@ ## fastly | ||
</tr> | ||
<tr> | ||
<td>datacenters</td> | ||
<td><pre lang="javascript"><code>fastly.datacenters(callback);</code></pre></td> | ||
<td><a href="https://docs.fastly.com/api/tools#datacenter">Link</a></td> | ||
</tr> | ||
<tr> | ||
<td>publicIpList</td> | ||
<td><pre lang="javascript"><code>fastly.publicIpList(callback);</code></pre></td> | ||
<td><a href="https://docs.fastly.com/api/tools#public_ip_list">Link</a></td> | ||
</tr> | ||
<tr> | ||
<td>edgeCheck</td> | ||
<td><pre lang="javascript"><code>fastly.edgeCheck('url', callback);</code></pre></td> | ||
<td><a href="https://docs.fastly.com/api/tools#content">Link</a></td> | ||
</tr> | ||
</table> | ||
@@ -58,0 +73,0 @@ |
@@ -17,3 +17,6 @@ var test = require('tap').test; | ||
t.type(f.stats, 'function', 'stats method exists'); | ||
t.type(f.datacenters, 'function', 'datacenters method exists'); | ||
t.type(f.publicIpList, 'function', 'publicIpList method exists'); | ||
t.type(f.edgeCheck, 'function', 'edgeCheck method exists'); | ||
t.end(); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9493
121
77