* Returns the API path for a given mode and resolved user ID.
(mode: SyncMode, userId: string)
| 277 | * Returns the API path for a given mode and resolved user ID. |
| 278 | */ |
| 279 | function 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 |