MCPcopy Create free account
hub / github.com/GetStream/stream-js / updateActivities

Method updateActivities

src/client.ts:812–829  ·  view source on GitHub ↗

* Updates all supplied activities on the stream * @link https://getstream.io/activity-feeds/docs/node/adding_activities/?language=js#updating-activities * @param {UpdateActivity []} activities list of activities to update * @return {Promise }

(activities: UpdateActivity<StreamFeedGenerics>[])

Source from the content-addressed store, hash-verified

810 * @return {Promise<APIResponse>}
811 */
812 updateActivities(activities: UpdateActivity<StreamFeedGenerics>[]) {
813 this._throwMissingApiSecret();
814
815 if (!(activities instanceof Array)) {
816 throw new TypeError('The activities argument should be an Array');
817 }
818
819 const token = JWTScopeToken(this.apiSecret as string, 'activities', '*', {
820 feedId: '*',
821 expireTokens: this.expireTokens,
822 });
823
824 return this.post<APIResponse>({
825 url: 'activities/',
826 body: { activities },
827 token,
828 });
829 }
830
831 /**
832 * Updates one activity on the stream

Callers 8

updateActivityMethod · 0.95
client_test.jsFile · 0.80
test.tsFile · 0.80
client_test.jsFile · 0.80
isGoingToThrow1Function · 0.80
isGoingToThrow2Function · 0.80
isGoingToThrow3Function · 0.80
isNotGoingToThrowFunction · 0.80

Calls 3

postMethod · 0.95
JWTScopeTokenFunction · 0.90

Tested by

no test coverage detected