1 | 'use strict';
|
2 |
|
3 | var akamai = require('../akamai');
|
4 |
|
5 | var objects = [
|
6 | 'http://www.example.com/somewhere',
|
7 | 'http://www.example.com/cool'
|
8 | ];
|
9 |
|
10 |
|
11 |
|
12 |
|
13 | akamai.purge.staging.uri('myusername@example.com', 'secretpassword', objects).then(function (response) {
|
14 | console.log(response);
|
15 | }).catch(function (err) {
|
16 | console.log(err.toString());
|
17 | console.log(err.body);
|
18 | });
|
19 |
|
20 |
|
21 |
|
22 | akamai.purge('myusername@example.com', 'secretpassword', objects, {
|
23 | type: 'arl',
|
24 | domain: 'staging'
|
25 | }).then(function (response) {
|
26 | console.log(response);
|
27 | }).catch(function (err) {
|
28 | console.log(err.toString());
|
29 | console.log(err.body);
|
30 | });
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 | akamai.remove.production.cpcode('myusername@example.com', 'secretpassword', objects).then(function (response) {
|
37 | console.log(response);
|
38 | }).catch(function (err) {
|
39 | console.log(err.toString());
|
40 | console.log(err.body);
|
41 | });
|
42 |
|
43 |
|
44 |
|
45 | akamai.purge('myusername@example.com', 'secretpassword', objects, {
|
46 | type: 'cpcode',
|
47 | action: 'remove',
|
48 | domain: 'production'
|
49 | }).then(function (response) {
|
50 | console.log(response);
|
51 | }).catch(function (err) {
|
52 | console.log(err.toString());
|
53 | console.log(err.body);
|
54 | });
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 | akamai.invalidate.production.url('myusername@example.com', 'secretpassword', objects).then(function (response) {
|
61 | console.log(response);
|
62 | }).catch(function (err) {
|
63 | console.log(err.toString());
|
64 | console.log(err.body);
|
65 | });
|
66 |
|
67 |
|
68 |
|
69 | akamai.purge('myusername@example.com', 'secretpassword', objects, {
|
70 | type: 'arl',
|
71 | action: 'invalidate',
|
72 | domain: 'production'
|
73 | }).then(function (response) {
|
74 | console.log(response);
|
75 | }).catch(function (err) {
|
76 | console.log(err.toString());
|
77 | console.log(err.body);
|
78 | }); |
\ | No newline at end of file |