Skip to content

Commit 7d6eda8

Browse files
authored
docs: document quote and hide reply (#612)
1 parent edf581c commit 7d6eda8

File tree

2 files changed

+82
-7
lines changed

2 files changed

+82
-7
lines changed

doc/v1.md

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,14 @@ For streaming API, see [Streaming part](./streaming.md).
2525
* [By user id](#by-user-id-1)
2626
* [By username](#by-username-1)
2727
* [Post and retrieve tweets](#post-and-retrieve-tweets)
28-
* [Create a tweet](#create-a-tweet)
29-
* [Reply to a tweet](#reply-to-a-tweet)
30-
* [Post a thread of tweets](#post-a-thread-of-tweets)
31-
* [Delete a tweet](#delete-a-tweet)
32-
* [Embed a tweet](#embed-a-tweet)
33-
* [Get a single tweet](#get-a-single-tweet)
34-
* [Get multiple tweets](#get-multiple-tweets)
28+
* [Create a tweet](#create-a-tweet)
29+
* [Reply to a tweet](#reply-to-a-tweet)
30+
* [Quote a tweet](#quote-a-tweet)
31+
* [Post a thread of tweets](#post-a-thread-of-tweets)
32+
* [Delete a tweet](#delete-a-tweet)
33+
* [Embed a tweet](#embed-a-tweet)
34+
* [Get a single tweet](#get-a-single-tweet)
35+
* [Get multiple tweets](#get-multiple-tweets)
3536
* [Users](#users)
3637
* [Get single user](#get-single-user)
3738
* [Get a bunch of users](#get-a-bunch-of-users)
@@ -334,6 +335,30 @@ await client.v1.reply(
334335
);
335336
```
336337

338+
### Quote a tweet
339+
340+
Quote another tweet with additional text.
341+
342+
**Method**: `.quote()`
343+
344+
**Endpoint**: `statuses/update.json`
345+
346+
**Right level**: `Read-write`
347+
348+
**Arguments**:
349+
- `status: string` – text of the quoting tweet.
350+
- `quotingStatusId: string` – ID of the tweet to quote.
351+
- `payload?: SendTweetV1Params` – optional parameters (media, etc.).
352+
353+
**Returns**: `TweetV1`
354+
355+
**Example**
356+
```ts
357+
// Quote tweet ID 123456 with additional text
358+
const quoted = await client.v1.quote('Awesome article!', '123456');
359+
console.log(quoted.id_str);
360+
```
361+
337362
### Post a thread of tweets
338363

339364
Post multiple tweets at one time.

doc/v2.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,15 @@ This is a comprehensive guide of all methods available for the Twitter API v2 on
2828
- [Tweets](#tweets)
2929
- [Create a tweet](#create-a-tweet)
3030
- [Reply to a tweet](#reply-to-a-tweet)
31+
- [Quote a tweet](#quote-a-tweet)
3132
- [Post a thread of tweets](#post-a-thread-of-tweets)
3233
- [Delete a tweet](#delete-a-tweet)
3334
- [Get a Single tweet](#get-a-single-tweet)
3435
- [Lookup for tweets](#lookup-for-tweets)
3536
- [Get users that liked a specific tweet](#get-users-that-liked-a-specific-tweet)
3637
- [Like a tweet](#like-a-tweet)
3738
- [Unlike a tweet](#unlike-a-tweet)
39+
- [Hide/unhide a reply](#hideunhide-a-reply)
3840
- [Get tweet counts for a search (recent tweet only)](#get-tweet-counts-for-a-search-recent-tweet-only)
3941
- [Get tweet counts for a search (full archive)](#get-tweet-counts-for-a-search-full-archive)
4042
- [Get users that retweeted a specific tweet](#get-users-that-retweeted-a-specific-tweet)
@@ -289,6 +291,30 @@ await client.v2.reply(
289291
);
290292
```
291293

294+
### Quote a tweet
295+
296+
Quote an existing tweet with additional text.
297+
298+
**Method**: `.quote()`
299+
300+
**Endpoint**: `tweets (POST)`
301+
302+
**Right level**: `Read-write`
303+
304+
**Arguments**:
305+
- `status: string` – text of the quoting tweet.
306+
- `quotedTweetId: string` – ID of the tweet to quote.
307+
- `payload?: SendTweetV2Params` – optional additional parameters (e.g., media, geolocation).
308+
309+
**Returns**: `TweetV2PostTweetResult`
310+
311+
**Example**
312+
```ts
313+
// Quote tweet ID 1456789 with some text
314+
const result = await client.v2.quote('Check this out!', '1456789');
315+
console.log(result.data.id);
316+
```
317+
292318
### Post a thread of tweets
293319

294320
Post multiple tweets at one time.
@@ -449,6 +475,30 @@ Remove a like of a single tweet.
449475
await client.v2.unlike('12', '20');
450476
```
451477

478+
### Hide/unhide a reply
479+
480+
Hide or unhide a specific reply to one of your tweets.
481+
482+
**Method**: `.hideReply()`
483+
484+
**Endpoint**: `tweets/:id/hidden (PUT)`
485+
486+
**Right level**: `Read-write`
487+
488+
**Arguments**:
489+
- `tweetId: string` – ID of the reply to hide or unhide.
490+
- `makeHidden: boolean` – true to hide, false to unhide.
491+
492+
**Returns**: `TweetV2HideReplyResult`
493+
494+
**Example**
495+
```ts
496+
// Hide a reply
497+
await client.v2.hideReply('1234567890', true);
498+
// Unhide the same reply
499+
await client.v2.hideReply('1234567890', false);
500+
```
501+
452502
### Get tweet counts for a search (recent tweet only)
453503

454504
**Method**: `.tweetCountRecent()`

0 commit comments

Comments
 (0)