tws-tcm
Node.js SDK of TWS (Teambition Web Service) cloud messaging service.
Installation
npm i --save tws-tcm
Usage
'use strict'const TCMClient = ; { const client = host: processenvTCM_HOST appId: processenvAPP_ID appSecrets: processenvAPP_SECRET // HTTP await client await client}consoleerror
Documentation
const TCMClient =
new Client({ appId, appSecret[, host, timeout, cacheStore, rootCert, privateKey, certChain] })
- appId
String
: The ID of your TWS application. - appSecrets:
[]String
: The secret passwords of your TWS application. - host
String
: Host URL of TCM service. - timeout
Number
: Optional, requst timeout in milliseconds, by default is3000
. - rootCert
Buffer
: Optional, the client root certificate. - privateKey
Buffer
: Optional, the client certificate private key. - certChain
Buffer
: Optional, the client certificate cert chain. - maxSockets
Number
: Optional, the client sockets. - time
Boolean
: Optional, enable timing for request. - retryDelay
Number
: Optional, delay time for retry, default to 200 ms. - maxAttempts
Number
: Optional, max attempts for a request, default to 3 times. - retryErrorCodes
[]String
: Optional, error codes that should retry, default to['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN']
.
TCMClient API
/** * Client for TWS (Teambition Web Service) cloud messaging service.. */declare
https://teambition.github.io/tws-tcm/
More:License
tws-tcm
is licensed under the MIT license.
Copyright © 2017-2019 Teambition.