fixes building get parameters in request
This commit is contained in:
parent
8598c68426
commit
0d680208b1
48
.travis.yml
48
.travis.yml
@ -1,19 +1,39 @@
|
|||||||
|
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
|
||||||
provider: pages
|
- node_js: 10
|
||||||
skip-cleanup: true
|
- node_js: 12
|
||||||
github-token: $GITHUB_TOKEN
|
- node_js: 13
|
||||||
keep-history: true
|
- stage: gh pages
|
||||||
local-dir: out
|
script: skip
|
||||||
on:
|
before_deploy: npm run doc
|
||||||
branch: master
|
deploy:
|
||||||
|
provider: pages
|
||||||
|
skip-cleanup: true
|
||||||
|
github-token: $GITHUB_TOKEN
|
||||||
|
keep-history: true
|
||||||
|
local-dir: out
|
||||||
|
on:
|
||||||
|
branch: master
|
||||||
|
if: branch = master AND type = push AND fork = false
|
||||||
|
- stage: npm deploy
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"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",
|
||||||
|
Loading…
Reference in New Issue
Block a user