__ __ __ _ __ _
____ ____ ____/ / ___ / /_ ___ ____ _ ____ ___ / /_ (_) / /_ (_) ____ ____
/ __ \ / __ \ / __ / / _ \ ______ / __/ / _ \ / __ `/ / __ `__ \ / __ \ / / / __/ / / / __ \ / __ \
/ / / // /_/ // /_/ / / __//_____// /_ / __// /_/ / / / / / / / / /_/ / / / / /_ / / / /_/ / / / / /
/_/ /_/ \____/ \__,_/ \___/ \__/ \___/ \__,_/ /_/ /_/ /_/ /_.___/ /_/ \__/ /_/ \____/ /_/ /_/
node sdk for teambition
yarn add teambition
Initialize teambition plugin with the given options.
Teambition(access_token, { host: "", authHost: "", protocol: "" })
Options:
access_token
用户通过Teambition Account授权获取到的token, 用于验证请求是否合法并经过用户授权host
非必需参数, 指定API地址sauthHost
非必需参数, 指定的认证host地址resolveWithFullResponse
非必须参数, 设置为true返回完整response数据retryStrategy@function
重试策略, 详细 https://github.com/FGRibreau/node-request-retrymaxAttempts
最大重试次数,默认 3 次,详细 https://github.com/FGRibreau/node-request-retry
- callback
let accessToken = 'teambition accessToken'
let teambition = new Teambition(accessToken)
let userInfo = await teambition.users().info()
-
- 新增
重试机制
, HTTP StatusCode > 400 时会发起重试,默认为 3 次
- 新增
ISC License
Copyright (c) 2017 Teambition