Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions doc/v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,6 @@ This is a comprehensive guide of all methods available for the Twitter API v2 on
- [Search spaces](#search-spaces)
- [Space buyers](#space-buyers)
- [Space tweets](#space-tweets)
- [Communities](#communities)
- [Community by id](#community-by-id)
- [Search communities](#search-communities)
- [Direct messages (DMs)](#direct-messages-dms)
- [Fetch direct message events (without filter)](#fetch-direct-message-events-without-filter)
- [Fetch direct message events by participant id](#fetch-direct-message-events-by-participant-id)
Expand Down Expand Up @@ -1537,34 +1534,6 @@ const { data: tweets } = await client.v2.spaceTweets('space-id')
// tweets is a TweetV2[]
```

## Communities

### Community by id

Retrieve details of a specific community.

**Method**: `.community(communityId, options?)`

**Endpoint**: `communities/:id`

**Right level**: `Read`

**Returns**: `CommunityV2Result`

### Search communities

Search for communities that match a given query.

**Method**: `.searchCommunities(query, options?)`

**Endpoint**: `communities/search`

**Right level**: `Read`

**Returns**: `CommunitiesV2Result`

The community object includes fields such as `description`, `private`, `member_count`, `moderator_count`, `subscriber_count`, `creator_id` and `rules`.

## Direct messages (DMs)

### Fetch direct message events (without filter)
Expand Down
23 changes: 0 additions & 23 deletions src/types/v2/community.v2.types.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,7 @@
export interface CommunityRuleV2 {
/** Identifier of the rule. */
id: string;
/** Text of the rule. */
text: string;
/** Creation date of the rule. */
created_at?: string;
}

export interface CommunityV2 {
id: string;
name: string;
/** Description of the community. */
description?: string;
/** Identifier of the community creator. */
creator_id?: string;
created_at: string;
/** Indicates if the community is private. */
private?: boolean;
/** Number of members in the community. */
member_count?: number;
/** Number of moderators in the community. */
moderator_count?: number;
/** Number of subscribers of the community. */
subscriber_count?: number;
/** Rules that apply to the community. */
rules?: CommunityRuleV2[];
}

export interface CommunityErrorV2 {
Expand Down
23 changes: 0 additions & 23 deletions test/community.v2.test.ts

This file was deleted.