MCPcopy Index your code
hub / github.com/simstudioai/sim / listPathForMode

Function listPathForMode

apps/sim/connectors/x/x.ts:279–290  ·  view source on GitHub ↗

* Returns the API path for a given mode and resolved user ID.

(mode: SyncMode, userId: string)

Source from the content-addressed store, hash-verified

277 * Returns the API path for a given mode and resolved user ID.
278 */
279function listPathForMode(mode: SyncMode, userId: string): string {
280 switch (mode) {
281 case 'bookmarks':
282 return `/users/${userId}/bookmarks`
283 case 'likes':
284 return `/users/${userId}/liked_tweets`
285 case 'mentions':
286 return `/users/${userId}/mentions`
287 default:
288 return `/users/${userId}/tweets`
289 }
290}
291
292/**
293 * Builds the query string for the active listing endpoint. `pageSize` is the

Callers 1

x.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected