getstream
Version:
The official low-level GetStream.io client for Node.js and the browser.
26 lines • 1.51 kB
TypeScript
import { StreamClient, ClientOptions, DefaultGenerics } from './client';
/**
* Create StreamClient
* @link https://getstream.io/activity-feeds/docs/node/feeds_getting_started/?language=js#setup
* @method connect
* @param {string} apiKey API key
* @param {string} [apiSecret] API secret (only use this on the server)
* @param {string} [appId] Application identifier
* @param {ClientOptions} [options] - additional options
* @param {string} [options.location] - which data center to use
* @param {boolean} [options.expireTokens=false] - whether to use a JWT timestamp field (i.e. iat)
* @param {string} [options.version] - advanced usage, custom api version
* @param {boolean} [options.keepAlive] - axios keepAlive, default to true
* @param {number} [options.timeout] - axios timeout in Ms, default to 10s
* @return {StreamClient} StreamClient
* @example <caption>Basic usage</caption>
* stream.connect(apiKey, apiSecret);
* @example <caption>or if you want to be able to subscribe and listen</caption>
* stream.connect(apiKey, apiSecret, appId);
* @example <caption>or on Heroku</caption>
* stream.connect(streamURL);
* @example <caption>where streamURL looks like</caption>
* "https://thierry:pass@gestream.io/?app=1"
*/
export declare function connect<StreamFeedGenerics extends DefaultGenerics = DefaultGenerics>(apiKey: string, apiSecret: string | null, appId?: string, options?: ClientOptions): StreamClient<StreamFeedGenerics>;
//# sourceMappingURL=connect.d.ts.map