apipost-cli 1.0.8 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/37.index.js +452 -0
- package/dist/841.index.js +6984 -0
- package/dist/action.js +4 -0
- package/dist/apipost-cli/node_modules/@azure/abort-controller/types/3.1/AbortController.d.ts +85 -0
- package/dist/apipost-cli/node_modules/@azure/abort-controller/types/3.1/AbortSignal.d.ts +80 -0
- package/dist/apipost-cli/node_modules/@azure/abort-controller/types/3.1/index.d.ts +3 -0
- package/dist/apipost-cli/node_modules/@azure/core-auth/types/3.1/core-auth.d.ts +229 -0
- package/dist/apipost-cli/node_modules/@azure/core-client/types/3.1/core-client.d.ts +900 -0
- package/dist/apipost-cli/node_modules/@azure/core-paging/types/3.1/core-paging.d.ts +77 -0
- package/dist/apipost-cli/node_modules/@azure/core-paging/types/3.1/samples-dev/getPagedAsyncIteratorSample.d.ts +2 -0
- package/dist/apipost-cli/node_modules/@azure/core-paging/types/3.1/src/getPagedAsyncIterator.d.ts +10 -0
- package/dist/apipost-cli/node_modules/@azure/core-paging/types/3.1/src/index.d.ts +3 -0
- package/dist/apipost-cli/node_modules/@azure/core-paging/types/3.1/src/models.d.ts +69 -0
- package/dist/apipost-cli/node_modules/@azure/core-paging/types/3.1/test/getPagedAsyncIterator.spec.d.ts +2 -0
- package/dist/apipost-cli/node_modules/@azure/core-rest-pipeline/types/3.1/core-rest-pipeline.d.ts +1114 -0
- package/dist/apipost-cli/node_modules/@azure/core-util/types/3.1/core-util.d.ts +112 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/LICENSE +21 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts +20 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/adapters/fs.js +19 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/constants.d.ts +4 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/constants.js +17 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/index.d.ts +12 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/index.js +26 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts +7 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/providers/async.js +104 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts +1 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/providers/common.js +13 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts +5 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/providers/sync.js +54 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/settings.d.ts +20 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/settings.js +24 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/types/index.d.ts +20 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/types/index.js +2 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts +2 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/utils/fs.js +19 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts +2 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/utils/index.js +5 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/package.json +44 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/LICENSE +21 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts +13 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/adapters/fs.js +17 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/index.d.ts +12 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/index.js +26 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/providers/async.d.ts +4 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/providers/async.js +36 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts +3 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/providers/sync.js +23 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/settings.d.ts +16 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/settings.js +16 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/types/index.d.ts +4 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/types/index.js +2 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/package.json +37 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/LICENSE +21 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/index.d.ts +14 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/index.js +34 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/providers/async.d.ts +12 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/providers/async.js +30 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/providers/index.d.ts +4 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/providers/index.js +9 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts +12 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/providers/stream.js +34 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts +10 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/providers/sync.js +14 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/readers/async.d.ts +30 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/readers/async.js +97 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/readers/common.d.ts +7 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/readers/common.js +31 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts +6 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/readers/reader.js +11 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts +15 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/readers/sync.js +59 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/settings.d.ts +30 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/settings.js +26 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/types/index.d.ts +8 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/types/index.js +2 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/package.json +44 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/assert.d.ts +972 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/async_hooks.d.ts +530 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/buffer.d.ts +2351 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/child_process.d.ts +1395 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/cluster.d.ts +410 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/console.d.ts +412 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/constants.d.ts +18 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/crypto.d.ts +3961 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/dgram.d.ts +545 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +191 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/dns/promises.d.ts +414 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/dns.d.ts +668 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/dom-events.d.ts +126 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/events.d.ts +724 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/fs/promises.d.ts +1189 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/fs.d.ts +4043 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/globals.d.ts +303 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/http.d.ts +1724 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/http2.d.ts +2129 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/https.d.ts +441 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/index.d.ts +88 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/inspector.d.ts +2748 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/module.d.ts +116 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/net.d.ts +886 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/os.d.ts +477 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/path.d.ts +191 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/perf_hooks.d.ts +638 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/process.d.ts +1485 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/querystring.d.ts +131 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/readline/promises.d.ts +145 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/readline.d.ts +526 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/repl.d.ts +424 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/stream/promises.d.ts +42 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/stream/web.d.ts +330 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/stream.d.ts +1392 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/test.d.ts +1052 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/timers.d.ts +215 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/tls.d.ts +1119 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/tty.d.ts +205 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/url.d.ts +901 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/util.d.ts +2052 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/v8.d.ts +635 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/vm.d.ts +894 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/wasi.d.ts +152 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/worker_threads.d.ts +693 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
- package/dist/apipost-cli/node_modules/bignumber.js/LICENCE.md +26 -0
- package/dist/apipost-cli/node_modules/bignumber.js/bignumber.d.ts +1831 -0
- package/dist/apipost-cli/node_modules/bignumber.js/bignumber.js +2926 -0
- package/dist/apipost-cli/node_modules/bignumber.js/bignumber.mjs +2889 -0
- package/dist/apipost-cli/node_modules/bignumber.js/doc/API.html +2249 -0
- package/dist/apipost-cli/node_modules/bignumber.js/package.json +50 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/filesystem.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/hwcaps.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_linux_or_android.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_macos_or_iphone.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_arm_linux_or_android.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_mips_linux_or_android.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_ppc_linux.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_freebsd.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_linux_or_android.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_macos.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_windows.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/stack_line_reader.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/string_view.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpufeatures/src/binding.o +0 -0
- package/dist/apipost-cli/node_modules/des.js/lib/des/cbc.js +65 -0
- package/dist/apipost-cli/node_modules/des.js/lib/des/cipher.js +142 -0
- package/dist/apipost-cli/node_modules/des.js/lib/des/des.js +150 -0
- package/dist/apipost-cli/node_modules/des.js/lib/des/ede.js +54 -0
- package/dist/apipost-cli/node_modules/des.js/lib/des/utils.js +256 -0
- package/dist/apipost-cli/node_modules/des.js/lib/des.js +7 -0
- package/dist/apipost-cli/node_modules/des.js/package.json +33 -0
- package/dist/apipost-cli/node_modules/des.js/test/cbc-test.js +73 -0
- package/dist/apipost-cli/node_modules/des.js/test/des-test.js +139 -0
- package/dist/apipost-cli/node_modules/des.js/test/ede-test.js +106 -0
- package/dist/apipost-cli/node_modules/des.js/test/fixtures.js +5 -0
- package/dist/apipost-cli/node_modules/des.js/test/utils-test.js +169 -0
- package/dist/apipost-cli/node_modules/fs.realpath/LICENSE +43 -0
- package/dist/apipost-cli/node_modules/fs.realpath/index.js +66 -0
- package/dist/apipost-cli/node_modules/fs.realpath/old.js +303 -0
- package/dist/apipost-cli/node_modules/fs.realpath/package.json +26 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/LICENSE +21 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/auto.js +3 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/helpers/functionsHaveNames.js +5 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/implementation.js +43 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/index.js +18 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/package.json +80 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/polyfill.js +7 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/shim.js +35 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/test/implementation.js +20 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/test/index.js +23 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/test/shimmed.js +21 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/test/tests.js +60 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/test/uglified.js +17 -0
- package/dist/apipost-cli/node_modules/lodash.camelcase/LICENSE +47 -0
- package/dist/apipost-cli/node_modules/lodash.camelcase/index.js +599 -0
- package/dist/apipost-cli/node_modules/lodash.camelcase/package.json +17 -0
- package/dist/apipost-cli/node_modules/lodash.memoize/LICENSE +47 -0
- package/dist/apipost-cli/node_modules/lodash.memoize/index.js +676 -0
- package/dist/apipost-cli/node_modules/lodash.memoize/package.json +17 -0
- package/dist/apipost-cli/node_modules/lodash.uniq/LICENSE +47 -0
- package/dist/apipost-cli/node_modules/lodash.uniq/index.js +896 -0
- package/dist/apipost-cli/node_modules/lodash.uniq/package.json +17 -0
- package/dist/apipost-cli/node_modules/moment/ts3.1-typings/moment.d.ts +785 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/LICENSE +20 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/Makefile +36 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/oauth-1.0a.d.ts +192 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/oauth-1.0a.js +377 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/package.json +30 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/getParameterString.js +21 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/mocha.opts +4 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/oauth_body_hash.js +141 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/options/consumer.js +14 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/options/last_ampersand.js +55 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/options/multiple_values.js +54 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/options/multiple_values_qs.js +50 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/options/nonce_length.js +44 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/options/parameter_seperator.js +102 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/options/realm.js +51 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/options/signature_method.js +36 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/services/bitbucket.js +88 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/services/flickr.js +196 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/services/openbank.js +61 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/services/twitter.js +183 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/twitter_sample_data.js +94 -0
- package/dist/apipost-cli/node_modules/object.assign/LICENSE +21 -0
- package/dist/apipost-cli/node_modules/object.assign/auto.js +3 -0
- package/dist/apipost-cli/node_modules/object.assign/dist/browser.js +944 -0
- package/dist/apipost-cli/node_modules/object.assign/hasSymbols.js +43 -0
- package/dist/apipost-cli/node_modules/object.assign/implementation.js +46 -0
- package/dist/apipost-cli/node_modules/object.assign/index.js +22 -0
- package/dist/apipost-cli/node_modules/object.assign/package.json +96 -0
- package/dist/apipost-cli/node_modules/object.assign/polyfill.js +55 -0
- package/dist/apipost-cli/node_modules/object.assign/shim.js +14 -0
- package/dist/apipost-cli/node_modules/object.assign/test/implementation.js +19 -0
- package/dist/apipost-cli/node_modules/object.assign/test/index.js +17 -0
- package/dist/apipost-cli/node_modules/object.assign/test/native.js +49 -0
- package/dist/apipost-cli/node_modules/object.assign/test/ses-compat.js +12 -0
- package/dist/apipost-cli/node_modules/object.assign/test/shimmed.js +52 -0
- package/dist/apipost-cli/node_modules/object.assign/test/tests.js +232 -0
- package/dist/apipost-cli/node_modules/object.assign/test.html +18458 -0
- package/dist/apipost-cli/node_modules/promise.series/LICENSE +21 -0
- package/dist/apipost-cli/node_modules/promise.series/index.js +10 -0
- package/dist/apipost-cli/node_modules/promise.series/package.json +34 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/LICENSE +22 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/auto.js +3 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/implementation.js +42 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/index.js +18 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/package.json +100 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/polyfill.js +36 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/shim.js +26 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/test/implementation.js +20 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/test/index.js +17 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/test/shimmed.js +48 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/test/tests.js +143 -0
- package/dist/apipost-cli/node_modules/resolve.exports/dist/index.js +1 -0
- package/dist/apipost-cli/node_modules/resolve.exports/dist/index.mjs +1 -0
- package/dist/apipost-cli/node_modules/resolve.exports/index.d.ts +100 -0
- package/dist/apipost-cli/node_modules/resolve.exports/license +21 -0
- package/dist/apipost-cli/node_modules/resolve.exports/package.json +50 -0
- package/dist/apipost-cli/node_modules/ssh2/lib/protocol/crypto/build/Release/obj.target/sshcrypto/src/binding.o +0 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/LICENSE +21 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/auto.js +3 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/implementation.js +21 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/index.js +23 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/package.json +101 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/polyfill.js +19 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/shim.js +14 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/test/implementation.js +21 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/test/index.js +17 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/test/shimmed.js +36 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/test/tests.js +45 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/LICENSE +21 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/auto.js +3 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/implementation.js +15 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/index.js +23 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/package.json +79 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/polyfill.js +15 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/shim.js +14 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/test/implementation.js +20 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/test/index.js +17 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/test/shimmed.js +36 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/test/tests.js +31 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/LICENSE +21 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/auto.js +3 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/implementation.js +15 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/index.js +23 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/package.json +79 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/polyfill.js +15 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/shim.js +14 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/test/implementation.js +20 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/test/index.js +18 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/test/shimmed.js +36 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/test/tests.js +31 -0
- package/dist/apipost-cli/node_modules/web-streams-polyfill/dist/types/ts3.6/polyfill.d.ts +771 -0
- package/dist/apipost-http-schema.json +129 -0
- package/dist/bridge.js +1010 -0
- package/dist/build/Release/cpufeatures.node +0 -0
- package/dist/esprima.js +3756 -0
- package/dist/events.js +977 -0
- package/dist/index.js +565958 -0
- package/dist/index1.js +26 -0
- package/dist/lib/protocol/crypto/build/Release/sshcrypto.node +0 -0
- package/dist/module.js +34 -0
- package/dist/pagent.exe +0 -0
- package/dist/setup-node-sandbox.js +461 -0
- package/dist/setup-sandbox.js +545 -0
- package/dist/snappy.darwin-arm64.node +0 -0
- package/dist/xdg-open +1066 -0
- package/package.json +13 -4
- package/bin/cli.js +0 -216
- package/bin/template.js +0 -803
- /package/{bin → dist/apipost-cli}/apipost-reports//346/265/213/350/257/225.html" +0 -0
- /package/{bin → dist/apipost-cli}/apipost-reports//346/265/213/350/257/225.json" +0 -0
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
var expect = require('chai').expect;
|
|
2
|
+
var Request = require('request');
|
|
3
|
+
var OAuth = require('../../oauth-1.0a');
|
|
4
|
+
var crypto = require('crypto');
|
|
5
|
+
|
|
6
|
+
describe("Flickr Personal Consumer", function() {
|
|
7
|
+
var oauth;
|
|
8
|
+
|
|
9
|
+
beforeEach(function () {
|
|
10
|
+
if (
|
|
11
|
+
!process.env.FLICKR_CONSUMER_key ||
|
|
12
|
+
!process.env.FLICKR_CONSUMER_SECRET
|
|
13
|
+
) {
|
|
14
|
+
this.skip('Flickr secret not set.');
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
this.timeout(10000);
|
|
19
|
+
|
|
20
|
+
oauth = new OAuth({
|
|
21
|
+
consumer: {
|
|
22
|
+
key: process.env.FLICKR_CONSUMER_key,
|
|
23
|
+
secret: process.env.FLICKR_CONSUMER_SECRET
|
|
24
|
+
},
|
|
25
|
+
signature_method: 'HMAC-SHA1',
|
|
26
|
+
hash_function: function(base_string, key) {
|
|
27
|
+
return crypto.createHmac('sha1', key).update(base_string).digest('base64');
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
describe.skip("#Request Token", function() {
|
|
33
|
+
var request = {
|
|
34
|
+
url: 'http://www.flickr.com/services/oauth/request_token',
|
|
35
|
+
method: 'POST',
|
|
36
|
+
data: {
|
|
37
|
+
oauth_callback: 'http://www.ddo.me'
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
it("should be a valid response", function(done) {
|
|
42
|
+
Request({
|
|
43
|
+
url: request.url,
|
|
44
|
+
method: request.method,
|
|
45
|
+
form: oauth.authorize(request)
|
|
46
|
+
}, function(err, res, body) {
|
|
47
|
+
expect(body).to.be.a('string');
|
|
48
|
+
|
|
49
|
+
body = oauth.deParam(body);
|
|
50
|
+
|
|
51
|
+
expect(body).to.have.property('oauth_callback_confirmed', 'true');
|
|
52
|
+
expect(body).to.have.property('oauth_token');
|
|
53
|
+
expect(body).to.have.property('oauth_token_secret');
|
|
54
|
+
|
|
55
|
+
done();
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
describe.skip("#Request Token by Header", function() {
|
|
61
|
+
var request = {
|
|
62
|
+
url: 'http://www.flickr.com/services/oauth/request_token',
|
|
63
|
+
method: 'POST',
|
|
64
|
+
data: {
|
|
65
|
+
oauth_callback: 'http://www.ddo.me'
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
it("should be a valid response", function(done) {
|
|
70
|
+
Request({
|
|
71
|
+
url: request.url,
|
|
72
|
+
method: request.method,
|
|
73
|
+
form: request.data,
|
|
74
|
+
headers: oauth.toHeader(oauth.authorize(request))
|
|
75
|
+
}, function(err, res, body) {
|
|
76
|
+
expect(body).to.be.a('string');
|
|
77
|
+
|
|
78
|
+
body = oauth.deParam(body);
|
|
79
|
+
|
|
80
|
+
expect(body).to.have.property('oauth_callback_confirmed', 'true');
|
|
81
|
+
expect(body).to.have.property('oauth_token');
|
|
82
|
+
expect(body).to.have.property('oauth_token_secret');
|
|
83
|
+
|
|
84
|
+
console.log(body);
|
|
85
|
+
console.log('http://www.flickr.com/services/oauth/authorize?oauth_token=' + token.key);
|
|
86
|
+
|
|
87
|
+
done();
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
/*
|
|
93
|
+
Need to get token from Request Token
|
|
94
|
+
And oauth_verifier after pass authorize on website
|
|
95
|
+
*/
|
|
96
|
+
describe.skip("#Access Token", function() {
|
|
97
|
+
//this token get from Request Token
|
|
98
|
+
var token = {
|
|
99
|
+
key: 'get from Request Token',
|
|
100
|
+
secret: 'get from Request Token'
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
var request = {
|
|
104
|
+
url: 'http://www.flickr.com/services/oauth/access_token',
|
|
105
|
+
method: 'POST',
|
|
106
|
+
data: {
|
|
107
|
+
oauth_verifier: 'get from Request Token'
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
it("should be a valid response", function(done) {
|
|
112
|
+
Request({
|
|
113
|
+
url: request.url,
|
|
114
|
+
method: request.method,
|
|
115
|
+
form: oauth.authorize(request, token)
|
|
116
|
+
}, function(err, res, body) {
|
|
117
|
+
expect(body).to.be.a('string');
|
|
118
|
+
|
|
119
|
+
body = oauth.deParam(body);
|
|
120
|
+
|
|
121
|
+
expect(body).to.have.property('fullname');
|
|
122
|
+
expect(body).to.have.property('user_nsid');
|
|
123
|
+
expect(body).to.have.property('username');
|
|
124
|
+
expect(body).to.have.property('oauth_token');
|
|
125
|
+
expect(body).to.have.property('oauth_token_secret');
|
|
126
|
+
|
|
127
|
+
token.key = body.oauth_token;
|
|
128
|
+
token.secret = body.oauth_token_secret;
|
|
129
|
+
|
|
130
|
+
done();
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
/*
|
|
136
|
+
Need to get token from Access Token
|
|
137
|
+
*/
|
|
138
|
+
describe("#flickr.test.login", function() {
|
|
139
|
+
var token = {
|
|
140
|
+
key: process.env.FLICKR_TOKEN_PUBLIC,
|
|
141
|
+
secret: process.env.FLICKR_SECRET_SECRET
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
var request = {
|
|
145
|
+
url: 'http://api.flickr.com/services/rest/?method=flickr.test.login',
|
|
146
|
+
method: 'GET',
|
|
147
|
+
data: {
|
|
148
|
+
api_key: token.key,
|
|
149
|
+
format: 'json'
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
it("should be a valid response", function(done) {
|
|
154
|
+
Request({
|
|
155
|
+
url: request.url,
|
|
156
|
+
method: request.method,
|
|
157
|
+
qs: oauth.authorize(request, token)
|
|
158
|
+
}, function(err, res, body) {
|
|
159
|
+
expect(body).to.be.a('string');
|
|
160
|
+
expect(body).to.have.string('jsonFlickrApi');
|
|
161
|
+
done();
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
/*
|
|
167
|
+
Need to get token from Access Token
|
|
168
|
+
*/
|
|
169
|
+
describe("#flickr.test.null", function() {
|
|
170
|
+
var token = {
|
|
171
|
+
key: process.env.FLICKR_TOKEN_PUBLIC,
|
|
172
|
+
secret: process.env.FLICKR_SECRET_SECRET
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
var request = {
|
|
176
|
+
url: 'http://api.flickr.com/services/rest/?method=flickr.test.null',
|
|
177
|
+
method: 'GET',
|
|
178
|
+
data: {
|
|
179
|
+
api_key: token.key,
|
|
180
|
+
format: 'json'
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
it("should be a valid response", function(done) {
|
|
185
|
+
Request({
|
|
186
|
+
url: request.url,
|
|
187
|
+
method: request.method,
|
|
188
|
+
qs: oauth.authorize(request, token)
|
|
189
|
+
}, function(err, res, body) {
|
|
190
|
+
expect(body).to.be.a('string');
|
|
191
|
+
expect(body).to.have.string('jsonFlickrApi');
|
|
192
|
+
done();
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
});
|
|
196
|
+
});
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
var expect = require('chai').expect;
|
|
2
|
+
var Request = require('request');
|
|
3
|
+
var OAuth = require('../../oauth-1.0a');
|
|
4
|
+
var crypto = require('crypto');
|
|
5
|
+
|
|
6
|
+
describe.skip("Openbank Personal Consumer", function() {
|
|
7
|
+
var oauth;
|
|
8
|
+
|
|
9
|
+
beforeEach(function () {
|
|
10
|
+
if (
|
|
11
|
+
!process.env.OPENBANK_CONSUMER_PUBLIC ||
|
|
12
|
+
!process.env.OPENBANK_CONSUMER_SECRET
|
|
13
|
+
) {
|
|
14
|
+
this.skip('Openbank secret not set.');
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
this.timeout(10000);
|
|
19
|
+
|
|
20
|
+
oauth = new OAuth({
|
|
21
|
+
consumer: {
|
|
22
|
+
key: process.env.OPENBANK_CONSUMER_PUBLIC,
|
|
23
|
+
secret: process.env.OPENBANK_CONSUMER_SECRET
|
|
24
|
+
},
|
|
25
|
+
signature_method: 'HMAC-SHA256',
|
|
26
|
+
hash_function: function(base_string, key) {
|
|
27
|
+
return crypto.createHmac('sha256', key).update(base_string).digest('base64');
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
//need to send as header
|
|
33
|
+
describe("#Request Token", function() {
|
|
34
|
+
var request = {
|
|
35
|
+
url: 'https://apisandbox.openbankproject.com/oauth/initiate',
|
|
36
|
+
method: 'POST',
|
|
37
|
+
data: {
|
|
38
|
+
oauth_callback: 'http://www.ddo.me'
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
it("should be a valid response", function(done) {
|
|
43
|
+
Request({
|
|
44
|
+
url: request.url,
|
|
45
|
+
method: request.method,
|
|
46
|
+
form: request.data,
|
|
47
|
+
headers: oauth.toHeader(oauth.authorize(request))
|
|
48
|
+
}, function(err, res, body) {
|
|
49
|
+
expect(body).to.be.a('string');
|
|
50
|
+
|
|
51
|
+
body = oauth.deParam(body);
|
|
52
|
+
|
|
53
|
+
expect(body).to.have.property('oauth_callback_confirmed', 'true');
|
|
54
|
+
expect(body).to.have.property('oauth_token');
|
|
55
|
+
expect(body).to.have.property('oauth_token_secret');
|
|
56
|
+
|
|
57
|
+
done();
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
});
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
var expect = require('chai').expect;
|
|
2
|
+
var Request = require('request');
|
|
3
|
+
var OAuth = require('../../oauth-1.0a');
|
|
4
|
+
var crypto = require('crypto');
|
|
5
|
+
|
|
6
|
+
describe("Twitter Personal Consumer", function() {
|
|
7
|
+
var oauth, token;
|
|
8
|
+
|
|
9
|
+
beforeEach(function () {
|
|
10
|
+
if (
|
|
11
|
+
!process.env.TWITTER_CONSUMER_PUBLIC ||
|
|
12
|
+
!process.env.TWITTER_CONSUMER_SECRET ||
|
|
13
|
+
!process.env.TWITTER_TOKEN_PUBLIC ||
|
|
14
|
+
!process.env.TWITTER_TOKEN_SECRET
|
|
15
|
+
) {
|
|
16
|
+
this.skip('Twitter secret or token not set.');
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
this.timeout(10000);
|
|
21
|
+
|
|
22
|
+
oauth = new OAuth({
|
|
23
|
+
consumer: {
|
|
24
|
+
key: process.env.TWITTER_CONSUMER_PUBLIC,
|
|
25
|
+
secret: process.env.TWITTER_CONSUMER_SECRET
|
|
26
|
+
},
|
|
27
|
+
signature_method: 'HMAC-SHA1',
|
|
28
|
+
hash_function: function(base_string, key) {
|
|
29
|
+
return crypto.createHmac('sha1', key).update(base_string).digest('base64');
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
token = {
|
|
34
|
+
key: process.env.TWITTER_TOKEN_PUBLIC,
|
|
35
|
+
secret: process.env.TWITTER_TOKEN_SECRET
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
describe("#Get user timeline", function() {
|
|
40
|
+
var request = {
|
|
41
|
+
url: 'https://api.twitter.com/1.1/statuses/user_timeline.json',
|
|
42
|
+
method: 'GET'
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
it("should be an array of tweets", function(done) {
|
|
46
|
+
Request({
|
|
47
|
+
url: request.url,
|
|
48
|
+
method: request.method,
|
|
49
|
+
qs: oauth.authorize(request, token),
|
|
50
|
+
json: true
|
|
51
|
+
}, function(err, res, body) {
|
|
52
|
+
expect(err).to.be.a('null');
|
|
53
|
+
expect(body).to.be.an.instanceof(Array);
|
|
54
|
+
done();
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
describe("#Get user timeline limit 5", function() {
|
|
60
|
+
var request = {
|
|
61
|
+
url: 'https://api.twitter.com/1.1/statuses/user_timeline.json',
|
|
62
|
+
method: 'GET',
|
|
63
|
+
data: {
|
|
64
|
+
count: 5
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
it("should be an array of tweets (length 5)", function(done) {
|
|
69
|
+
Request({
|
|
70
|
+
url: request.url,
|
|
71
|
+
method: request.method,
|
|
72
|
+
qs: oauth.authorize(request, token),
|
|
73
|
+
json: true
|
|
74
|
+
}, function(err, res, body) {
|
|
75
|
+
expect(err).to.be.a('null');
|
|
76
|
+
expect(body).to.be.an.instanceof(Array);
|
|
77
|
+
expect(body).to.have.length(5);
|
|
78
|
+
done();
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
describe("#Get user timeline limit 5 by url", function() {
|
|
84
|
+
var request = {
|
|
85
|
+
url: 'https://api.twitter.com/1.1/statuses/user_timeline.json?count=5',
|
|
86
|
+
method: 'GET'
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
it("should be an array of tweets", function(done) {
|
|
90
|
+
Request({
|
|
91
|
+
url: request.url,
|
|
92
|
+
method: request.method,
|
|
93
|
+
qs: oauth.authorize(request, token),
|
|
94
|
+
json: true
|
|
95
|
+
}, function(err, res, body) {
|
|
96
|
+
expect(err).to.be.a('null');
|
|
97
|
+
expect(body).to.be.an.instanceof(Array);
|
|
98
|
+
expect(body).to.have.length(5);
|
|
99
|
+
done();
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
describe("#Get user timeline by header", function() {
|
|
105
|
+
var request = {
|
|
106
|
+
url: 'https://api.twitter.com/1.1/statuses/user_timeline.json',
|
|
107
|
+
method: 'GET'
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
it("should be an array of tweets", function(done) {
|
|
111
|
+
Request({
|
|
112
|
+
url: request.url,
|
|
113
|
+
method: request.method,
|
|
114
|
+
qs: request.data,
|
|
115
|
+
headers: oauth.toHeader(oauth.authorize(request, token)),
|
|
116
|
+
json: true
|
|
117
|
+
}, function(err, res, body) {
|
|
118
|
+
expect(err).to.be.a('null');
|
|
119
|
+
expect(body).to.be.an.instanceof(Array);
|
|
120
|
+
done();
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
describe.skip("#Tweet", function() {
|
|
126
|
+
var text = 'Testing oauth-1.0a';
|
|
127
|
+
|
|
128
|
+
var request = {
|
|
129
|
+
url: 'https://api.twitter.com/1.1/statuses/update.json',
|
|
130
|
+
method: 'POST',
|
|
131
|
+
data: {
|
|
132
|
+
status: text
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
it("should be an success object", function(done) {
|
|
137
|
+
Request({
|
|
138
|
+
url: request.url,
|
|
139
|
+
method: request.method,
|
|
140
|
+
form: oauth.authorize(request, token),
|
|
141
|
+
json: true
|
|
142
|
+
}, function(err, res, body) {
|
|
143
|
+
expect(body).to.have.property('entities');
|
|
144
|
+
expect(body).to.have.property('created_at');
|
|
145
|
+
expect(body).to.have.property('id');
|
|
146
|
+
expect(body).to.have.property('text');
|
|
147
|
+
expect(body.text).to.equal(text);
|
|
148
|
+
expect(body.user).to.be.an('object');
|
|
149
|
+
done();
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
describe.skip("#Tweet by header", function() {
|
|
155
|
+
var text = 'Testing oauth-1.0a';
|
|
156
|
+
|
|
157
|
+
var request = {
|
|
158
|
+
url: 'https://api.twitter.com/1.1/statuses/update.json',
|
|
159
|
+
method: 'POST',
|
|
160
|
+
data: {
|
|
161
|
+
status: text
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
it("should be an success object", function(done) {
|
|
166
|
+
Request({
|
|
167
|
+
url: request.url,
|
|
168
|
+
method: request.method,
|
|
169
|
+
form: request.data,
|
|
170
|
+
headers: oauth.toHeader(oauth.authorize(request, token)),
|
|
171
|
+
json: true
|
|
172
|
+
}, function(err, res, body) {
|
|
173
|
+
expect(body).to.have.property('entities');
|
|
174
|
+
expect(body).to.have.property('created_at');
|
|
175
|
+
expect(body).to.have.property('id');
|
|
176
|
+
expect(body).to.have.property('text');
|
|
177
|
+
expect(body.text).to.equal(text);
|
|
178
|
+
expect(body.user).to.be.an('object');
|
|
179
|
+
done();
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
});
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
var expect = require('chai').expect;
|
|
2
|
+
var OAuth = require('../oauth-1.0a');
|
|
3
|
+
var crypto = require('crypto');
|
|
4
|
+
|
|
5
|
+
describe("Twitter Sample", function() {
|
|
6
|
+
var oauth = new OAuth({
|
|
7
|
+
consumer: {
|
|
8
|
+
key: 'xvz1evFS4wEEPTGEFPHBog',
|
|
9
|
+
secret: 'kAcSOqF21Fu85e7zjz7ZN2U4ZRhfV3WpwPAoE3Z7kBw'
|
|
10
|
+
},
|
|
11
|
+
signature_method: 'HMAC-SHA1',
|
|
12
|
+
hash_function: function(base_string, key) {
|
|
13
|
+
return crypto.createHmac('sha1', key).update(base_string).digest('base64');
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
//overide for testing only !!!
|
|
18
|
+
oauth.getTimeStamp = function() {
|
|
19
|
+
return 1318622958;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
//overide for testing only !!!
|
|
23
|
+
oauth.getNonce = function(length) {
|
|
24
|
+
return 'kYjzVBB8Y0ZFabxSWbWovY3uYSQ2pTgmZeNu2VS4cg';
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
var token = {
|
|
28
|
+
key: '370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb',
|
|
29
|
+
secret: 'LswwdoUaIvS8ltyTt5jkRh4J50vUPVVHtR2YPi5kE'
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
var request = {
|
|
33
|
+
url: 'https://api.twitter.com/1/statuses/update.json?include_entities=true',
|
|
34
|
+
method: 'POST',
|
|
35
|
+
data: {
|
|
36
|
+
status: 'Hello Ladies + Gentlemen, a signed OAuth request!'
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
var oauth_data = {
|
|
41
|
+
oauth_consumer_key: oauth.consumer.key,
|
|
42
|
+
oauth_nonce: oauth.getNonce(),
|
|
43
|
+
oauth_signature_method: oauth.signature_method,
|
|
44
|
+
oauth_timestamp: oauth.getTimeStamp(),
|
|
45
|
+
oauth_version: '1.0',
|
|
46
|
+
oauth_token: token.key
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
describe("#getParameterString", function() {
|
|
50
|
+
it("should be equal to Twitter example", function() {
|
|
51
|
+
expect(oauth.getParameterString(request, oauth_data)).to.equal('include_entities=true&oauth_consumer_key=xvz1evFS4wEEPTGEFPHBog&oauth_nonce=kYjzVBB8Y0ZFabxSWbWovY3uYSQ2pTgmZeNu2VS4cg&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1318622958&oauth_token=370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb&oauth_version=1.0&status=Hello%20Ladies%20%2B%20Gentlemen%2C%20a%20signed%20OAuth%20request%21');
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
describe("#getBaseString", function() {
|
|
56
|
+
it("should be equal to Twitter example", function() {
|
|
57
|
+
expect(oauth.getBaseString(request, oauth_data)).to.equal('POST&https%3A%2F%2Fapi.twitter.com%2F1%2Fstatuses%2Fupdate.json&include_entities%3Dtrue%26oauth_consumer_key%3Dxvz1evFS4wEEPTGEFPHBog%26oauth_nonce%3DkYjzVBB8Y0ZFabxSWbWovY3uYSQ2pTgmZeNu2VS4cg%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1318622958%26oauth_token%3D370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb%26oauth_version%3D1.0%26status%3DHello%2520Ladies%2520%252B%2520Gentlemen%252C%2520a%2520signed%2520OAuth%2520request%2521');
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
describe("#getSigningKey", function() {
|
|
62
|
+
it("should be equal to Twitter example", function() {
|
|
63
|
+
expect(oauth.getSigningKey(token.secret)).to.equal('kAcSOqF21Fu85e7zjz7ZN2U4ZRhfV3WpwPAoE3Z7kBw&LswwdoUaIvS8ltyTt5jkRh4J50vUPVVHtR2YPi5kE');
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
describe("#getSignature", function() {
|
|
68
|
+
it("should be equal to Twitter example", function() {
|
|
69
|
+
expect(oauth.getSignature(request, token.secret, oauth_data)).to.equal('tnnArxj06cWHq44gCs1OSKk/jLY=');
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
describe("#authorize", function() {
|
|
74
|
+
it("should be equal to Twitter example", function() {
|
|
75
|
+
expect(oauth.authorize(request, token)).to.eql({
|
|
76
|
+
oauth_consumer_key: 'xvz1evFS4wEEPTGEFPHBog',
|
|
77
|
+
oauth_nonce: 'kYjzVBB8Y0ZFabxSWbWovY3uYSQ2pTgmZeNu2VS4cg',
|
|
78
|
+
oauth_signature_method: 'HMAC-SHA1',
|
|
79
|
+
oauth_timestamp: 1318622958,
|
|
80
|
+
oauth_version: '1.0',
|
|
81
|
+
oauth_token: '370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb',
|
|
82
|
+
status: 'Hello Ladies + Gentlemen, a signed OAuth request!',
|
|
83
|
+
include_entities: 'true',
|
|
84
|
+
oauth_signature: 'tnnArxj06cWHq44gCs1OSKk/jLY='
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
describe("#toHeader", function() {
|
|
90
|
+
it("should be equal to Twitter example", function() {
|
|
91
|
+
expect(oauth.toHeader(oauth.authorize(request, token))).to.have.property('Authorization', 'OAuth oauth_consumer_key="xvz1evFS4wEEPTGEFPHBog", oauth_nonce="kYjzVBB8Y0ZFabxSWbWovY3uYSQ2pTgmZeNu2VS4cg", oauth_signature="tnnArxj06cWHq44gCs1OSKk%2FjLY%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1318622958", oauth_token="370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb", oauth_version="1.0"');
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2014 Jordan Harband
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|