Fixes building get parameters in request
This commit is contained in:
commit
da8631e5d8
1
.gitignore
vendored
1
.gitignore
vendored
@ -61,6 +61,5 @@ typings/
|
|||||||
.next
|
.next
|
||||||
.idea
|
.idea
|
||||||
|
|
||||||
package-lock.json
|
|
||||||
out/
|
out/
|
||||||
dist/
|
dist/
|
38
.travis.yml
38
.travis.yml
@ -1,15 +1,28 @@
|
|||||||
|
os: linux
|
||||||
language: node_js
|
language: node_js
|
||||||
|
|
||||||
node_js:
|
if: tag IS blank
|
||||||
- "11"
|
|
||||||
- "10"
|
stages:
|
||||||
- "8"
|
- test
|
||||||
|
- gh pages
|
||||||
|
- npm deploy
|
||||||
|
|
||||||
script: npm run test
|
script: npm run test
|
||||||
|
|
||||||
after_success: npm run doc
|
jobs:
|
||||||
|
include:
|
||||||
deploy:
|
- node_js: 8
|
||||||
|
- node_js: 10
|
||||||
|
- node_js: 12
|
||||||
|
- node_js: 13
|
||||||
|
after_success:
|
||||||
|
- npm install -g codecov
|
||||||
|
- npm run report-coverage
|
||||||
|
- stage: gh pages
|
||||||
|
script: skip
|
||||||
|
before_deploy: npm run doc
|
||||||
|
deploy:
|
||||||
provider: pages
|
provider: pages
|
||||||
skip-cleanup: true
|
skip-cleanup: true
|
||||||
github-token: $GITHUB_TOKEN
|
github-token: $GITHUB_TOKEN
|
||||||
@ -17,3 +30,14 @@ deploy:
|
|||||||
local-dir: out
|
local-dir: out
|
||||||
on:
|
on:
|
||||||
branch: master
|
branch: master
|
||||||
|
if: branch = master AND type = push AND fork = false
|
||||||
|
- stage: npm deploy
|
||||||
|
script: skip
|
||||||
|
deploy:
|
||||||
|
provider: npm
|
||||||
|
email: $NPM_EMAIL
|
||||||
|
api_key: $NPM_API_KEY
|
||||||
|
skip-cleanup: true
|
||||||
|
on:
|
||||||
|
branch: master
|
||||||
|
if: branch = master AND type = push AND fork = false
|
||||||
|
@ -48,7 +48,7 @@ export default class Request {
|
|||||||
let path = this._getPath(endpoint);
|
let path = this._getPath(endpoint);
|
||||||
let response = '';
|
let response = '';
|
||||||
|
|
||||||
if (method === 'GET' && data.length > 0) {
|
if (method === 'GET' && Object.keys(data).length > 0) {
|
||||||
path += '?' + querystring.stringify(data);
|
path += '?' + querystring.stringify(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
5351
package-lock.json
generated
Normal file
5351
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -7,11 +7,12 @@
|
|||||||
"Bot",
|
"Bot",
|
||||||
"Chat"
|
"Chat"
|
||||||
],
|
],
|
||||||
"version": "1.0.1",
|
"version": "1.0.3",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"doc": "./node_modules/.bin/jsdoc lib/v1/client.js lib/consts.js -R README.md",
|
"doc": "./node_modules/.bin/jsdoc lib/v1/client.js lib/consts.js -R README.md",
|
||||||
"build": "./node_modules/.bin/rollup -c",
|
"build": "./node_modules/.bin/rollup -c",
|
||||||
"test": "./node_modules/.bin/_mocha --require @babel/register ./tests/."
|
"test": "./node_modules/.bin/nyc ./node_modules/.bin/_mocha --require @babel/register ./tests/.",
|
||||||
|
"report-coverage": "./node_modules/.bin/nyc report --reporter=text-lcov > coverage.lcov && codecov"
|
||||||
},
|
},
|
||||||
"author": "retailCRM",
|
"author": "retailCRM",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@ -30,6 +31,7 @@
|
|||||||
"jsdoc": "^3.5.5",
|
"jsdoc": "^3.5.5",
|
||||||
"mocha": "^5.2.0",
|
"mocha": "^5.2.0",
|
||||||
"nock": "^10.0.6",
|
"nock": "^10.0.6",
|
||||||
|
"nyc": "^15.1.0",
|
||||||
"rollup": "^1.2.2",
|
"rollup": "^1.2.2",
|
||||||
"rollup-plugin-babel": "^4.3.2",
|
"rollup-plugin-babel": "^4.3.2",
|
||||||
"rollup-plugin-node-builtins": "^2.1.2",
|
"rollup-plugin-node-builtins": "^2.1.2",
|
||||||
|
Loading…
Reference in New Issue
Block a user