thisandagain / fastly

Fastly API client for Node.js
MIT License
70 stars 28 forks source link

fastly for ft.com #5

Closed commuterjoy closed 9 years ago

commuterjoy commented 10 years ago

Hi, thanks for writing this module.

I've expanded a little on the functionality over in my repo for ft.com.

There's also a sister project that shows an example of a deployment process.

I won't submit a pull request because the changes aren't backwards compatible, but very happy to collaborate on any future plans you have for this project.

I've summarised my changes here,

So instead of,

fastly.request('PUT', '/service/' + service + '/version/' + lastVersion + '/clone');

We can do this,

fastly.cloneVersion(n); // returns a promise to clone the given VCL

This also makes is easier to create convenience methods at a later date,

fastly.cloneLatestVersion();
fastly.cloneActiveVersion();
...