Skip to content
Browse files

add getInvalidation and listInvalidations examples

  • Loading branch information...
1 parent 46ca959 commit a7d4708a65752e67ab89760bddc51e2ddb08a5ce @tellnes committed Jul 7, 2012
Showing with 22 additions and 0 deletions.
  1. +10 −0 examples/getInvalidation.js
  2. +12 −0 examples/listInvalidations.js
View
10 examples/getInvalidation.js
@@ -0,0 +1,10 @@
+var cloudfront = require('..')
+ , inspect = require('eyes').inspector({maxLength: -1})
+
+var cf = cloudfront.createClient(process.env.AWS_KEY, process.env.AWS_SECRET)
+
+cf.getInvalidation(process.argv[2], process.argv[3], function(err, dist) {
+ if (err) return inspect(err)
+
+ inspect(dist)
+})
View
12 examples/listInvalidations.js
@@ -0,0 +1,12 @@
+var cloudfront = require('..')
+ , inspect = require('eyes').inspector({maxLength: -1})
+
+var cf = cloudfront.createClient(process.env.AWS_KEY, process.env.AWS_SECRET)
+
+cf.listInvalidations(process.argv[2], function(err, list, info) {
+ if (err) {
+ inspect(err)
+ } else {
+ inspect(list)
+ }
+})

0 comments on commit a7d4708

Please sign in to comment.
Something went wrong with that request. Please try again.