diff --git a/.travis.yml b/.travis.yml index 67e5d4a..64027f7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,19 +1,39 @@ +os: linux language: node_js -node_js: - - "11" - - "10" - - "8" +if: tag IS blank + +stages: + - test + - gh pages + - npm deploy script: npm run test -after_success: npm run doc - -deploy: - provider: pages - skip-cleanup: true - github-token: $GITHUB_TOKEN - keep-history: true - local-dir: out - on: - branch: master \ No newline at end of file +jobs: + include: + - node_js: 8 + - node_js: 10 + - node_js: 12 + - node_js: 13 + - stage: gh pages + script: skip + before_deploy: npm run doc + 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 diff --git a/lib/request.js b/lib/request.js index c37691d..a613c26 100644 --- a/lib/request.js +++ b/lib/request.js @@ -48,7 +48,7 @@ export default class Request { let path = this._getPath(endpoint); let response = ''; - if (method === 'GET' && data.length > 0) { + if (method === 'GET' && Object.keys(data).length > 0) { path += '?' + querystring.stringify(data); } diff --git a/package.json b/package.json index 2143ff7..dcb688c 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "Bot", "Chat" ], - "version": "1.0.1", + "version": "1.0.3", "scripts": { "doc": "./node_modules/.bin/jsdoc lib/v1/client.js lib/consts.js -R README.md", "build": "./node_modules/.bin/rollup -c",