This repository has been archived by the owner on Mar 10, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
14a4471
commit ef49e95
Showing
8 changed files
with
102 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
'use strict' | ||
|
||
const promisify = require('promisify-es6') | ||
|
||
const transform = function (res, callback) { | ||
callback(null, { | ||
canceled: res.Canceled === undefined || res.Canceled === true | ||
}) | ||
} | ||
|
||
module.exports = (send) => { | ||
return promisify((args, opts, callback) => { | ||
if (typeof (opts) === 'function') { | ||
callback = opts | ||
opts = {} | ||
} | ||
|
||
send.andTransform({ | ||
path: 'name/pubsub/cancel', | ||
args: args, | ||
qs: opts | ||
}, transform, callback) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
'use strict' | ||
|
||
module.exports = (send) => ({ | ||
cancel: require('./cancel')(send), | ||
state: require('./state')(send), | ||
subs: require('./subs')(send) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
'use strict' | ||
|
||
const promisify = require('promisify-es6') | ||
|
||
const transform = function (res, callback) { | ||
callback(null, { | ||
enabled: res.Enabled | ||
}) | ||
} | ||
|
||
module.exports = (send) => { | ||
return promisify((opts, callback) => { | ||
if (typeof (opts) === 'function') { | ||
callback = opts | ||
opts = {} | ||
} | ||
|
||
send.andTransform({ | ||
path: 'name/pubsub/state', | ||
qs: opts | ||
}, transform, callback) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
'use strict' | ||
|
||
const promisify = require('promisify-es6') | ||
|
||
const transform = function (res, callback) { | ||
callback(null, res.Strings || []) | ||
} | ||
|
||
module.exports = (send) => { | ||
return promisify((opts, callback) => { | ||
if (typeof (opts) === 'function') { | ||
callback = opts | ||
opts = {} | ||
} | ||
|
||
send.andTransform({ | ||
path: 'name/pubsub/subs', | ||
qs: opts | ||
}, transform, callback) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters