diff --git a/docs/openapi.v2.json b/docs/openapi.v2.json index e13e606..7571aae 100644 --- a/docs/openapi.v2.json +++ b/docs/openapi.v2.json @@ -2,7 +2,7 @@ "openapi" : "3.0.0", "info" : { "description" : "Twitter API v2 available endpoints", - "version" : "2.113", + "version" : "2.114", "title" : "Twitter API v2", "termsOfService" : "https://developer.twitter.com/en/developer-terms/agreement-and-policy.html", "contact" : { @@ -15,6 +15,179 @@ } }, "paths" : { + "/2/communities/search" : { + "get" : { + "security" : [ + { + "OAuth2UserToken" : [ + "tweet.read", + "users.read" + ] + }, + { + "UserToken" : [ ] + } + ], + "tags" : [ + "Communities" + ], + "summary" : "Search Communities", + "description" : "Returns Communities that match search query", + "externalDocs" : { + "url" : "https://developer.x.com" + }, + "operationId" : "communitiesSearch", + "parameters" : [ + { + "name" : "query", + "in" : "query", + "description" : "Query to search communities.", + "required" : true, + "schema" : { + "type" : "string", + "minLength" : 1, + "maxLength" : 4096, + "example" : "Love" + }, + "style" : "form" + }, + { + "name" : "max_results", + "in" : "query", + "description" : "The maximum number of search results to be returned by a request.", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 10, + "maximum" : 100, + "format" : "int32", + "default" : 10 + }, + "style" : "form" + }, + { + "name" : "next_token", + "in" : "query", + "description" : "This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified.", + "required" : false, + "schema" : { + "$ref" : "#/components/schemas/NextToken" + }, + "style" : "form" + }, + { + "name" : "pagination_token", + "in" : "query", + "description" : "This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should not be modified.", + "required" : false, + "schema" : { + "$ref" : "#/components/schemas/NextToken" + }, + "style" : "form" + }, + { + "$ref" : "#/components/parameters/CommunityFieldsParameter" + } + ], + "responses" : { + "200" : { + "description" : "The request has succeeded.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Get2CommunitiesSearchResponse" + } + } + } + }, + "default" : { + "description" : "The request has failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Error" + } + }, + "application/problem+json" : { + "schema" : { + "$ref" : "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/2/communities/{id}" : { + "get" : { + "security" : [ + { + "BearerToken" : [ ] + }, + { + "OAuth2UserToken" : [ + "list.read", + "tweet.read", + "users.read" + ] + }, + { + "UserToken" : [ ] + } + ], + "tags" : [ + "Communities" + ], + "summary" : "Communities lookup by Community ID.", + "description" : "Returns a Community.", + "externalDocs" : { + "url" : "https://developer.x.com/en/docs/x-api/communities/api-reference/get-communities-id" + }, + "operationId" : "communityIdGet", + "parameters" : [ + { + "name" : "id", + "in" : "path", + "description" : "The ID of the Community.", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/CommunityId" + }, + "style" : "simple" + }, + { + "$ref" : "#/components/parameters/CommunityFieldsParameter" + } + ], + "responses" : { + "200" : { + "description" : "The request has succeeded.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Get2CommunitiesIdResponse" + } + } + } + }, + "default" : { + "description" : "The request has failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Error" + } + }, + "application/problem+json" : { + "schema" : { + "$ref" : "#/components/schemas/Problem" + } + } + } + } + } + } + }, "/2/compliance/jobs" : { "get" : { "security" : [ @@ -209,6 +382,52 @@ } } }, + "/2/connections/all" : { + "delete" : { + "security" : [ + { + "BearerToken" : [ ] + } + ], + "tags" : [ + "Connection" + ], + "summary" : "Force kills all streaming connections of the authenticated application.", + "description" : "Force kills all streaming connections of the authenticated application.", + "externalDocs" : { + "url" : "https://developer.x.com" + }, + "operationId" : "killAllAppConnections", + "parameters" : [ ], + "responses" : { + "200" : { + "description" : "The request has succeeded.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/KillAllConnectionsResponse" + } + } + } + }, + "default" : { + "description" : "The request has failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Error" + } + }, + "application/problem+json" : { + "schema" : { + "$ref" : "#/components/schemas/Problem" + } + } + } + } + } + } + }, "/2/dm_conversations" : { "post" : { "security" : [ @@ -6095,6 +6314,62 @@ } } }, + "/2/users/personalized_trends" : { + "get" : { + "security" : [ + { + "OAuth2UserToken" : [ + "tweet.read", + "users.read" + ] + }, + { + "UserToken" : [ ] + } + ], + "tags" : [ + "Trends" + ], + "summary" : "Get personalized Trends", + "description" : "Returns Personalized trends for the authenticated user", + "externalDocs" : { + "url" : "https://developer.x.com/" + }, + "operationId" : "personalizedTrends", + "parameters" : [ + { + "$ref" : "#/components/parameters/PersonalizedTrendFieldsParameter" + } + ], + "responses" : { + "200" : { + "description" : "The request has succeeded.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Get2UsersPersonalizedTrendsResponse" + } + } + } + }, + "default" : { + "description" : "The request has failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Error" + } + }, + "application/problem+json" : { + "schema" : { + "$ref" : "#/components/schemas/Problem" + } + } + } + } + } + } + }, "/2/users/reposts_of_me" : { "get" : { "security" : [ @@ -9312,6 +9587,27 @@ } ] }, + "Community" : { + "type" : "object", + "description" : "A X Community is a curated group of Posts.", + "required" : [ + "id", + "name" + ], + "properties" : { + "created_at" : { + "type" : "string", + "format" : "date-time" + }, + "id" : { + "$ref" : "#/components/schemas/CommunityId" + }, + "name" : { + "type" : "string", + "description" : "The name of this Community." + } + } + }, "CommunityId" : { "type" : "string", "description" : "The unique identifier of this Community.", @@ -10275,6 +10571,48 @@ } } }, + "Get2CommunitiesIdResponse" : { + "type" : "object", + "properties" : { + "data" : { + "$ref" : "#/components/schemas/Community" + }, + "errors" : { + "type" : "array", + "minItems" : 1, + "items" : { + "$ref" : "#/components/schemas/Problem" + } + } + } + }, + "Get2CommunitiesSearchResponse" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "minItems" : 1, + "items" : { + "$ref" : "#/components/schemas/Community" + } + }, + "errors" : { + "type" : "array", + "minItems" : 1, + "items" : { + "$ref" : "#/components/schemas/Problem" + } + }, + "meta" : { + "type" : "object", + "properties" : { + "next_token" : { + "$ref" : "#/components/schemas/NextToken" + } + } + } + } + }, "Get2ComplianceJobsIdResponse" : { "type" : "object", "properties" : { @@ -11910,6 +12248,25 @@ } } }, + "Get2UsersPersonalizedTrendsResponse" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "array", + "minItems" : 1, + "items" : { + "$ref" : "#/components/schemas/PersonalizedTrend" + } + }, + "errors" : { + "type" : "array", + "minItems" : 1, + "items" : { + "$ref" : "#/components/schemas/Problem" + } + } + } + }, "Get2UsersRepostsOfMeResponse" : { "type" : "object", "properties" : { @@ -12079,6 +12436,26 @@ "pattern" : "^[0-9]{1,19}$", "example" : "1372966999991541762" }, + "KillAllConnectionsResponse" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "killed_connections" : { + "type" : "boolean" + } + } + }, + "errors" : { + "type" : "array", + "minItems" : 1, + "items" : { + "$ref" : "#/components/schemas/Problem" + } + } + } + }, "LikeComplianceSchema" : { "type" : "object", "required" : [ @@ -12657,6 +13034,28 @@ "minLength" : 1, "maxLength" : 19 }, + "PersonalizedTrend" : { + "type" : "object", + "description" : "A trend.", + "properties" : { + "category" : { + "type" : "string", + "description" : "Category of this trend." + }, + "post_count" : { + "type" : "integer", + "description" : "Number of posts pertaining to this trend." + }, + "trend_name" : { + "type" : "string", + "description" : "Name of the trend." + }, + "trending_since" : { + "type" : "string", + "description" : "Time since this is trending." + } + } + }, "Photo" : { "allOf" : [ { @@ -15549,6 +15948,41 @@ } }, "parameters" : { + "CommunityFieldsParameter" : { + "name" : "community.fields", + "in" : "query", + "description" : "A comma separated list of Community fields to display.", + "required" : false, + "schema" : { + "type" : "array", + "description" : "The fields available for a Community object.", + "minItems" : 1, + "uniqueItems" : true, + "items" : { + "type" : "string", + "enum" : [ + "access", + "created_at", + "description", + "id", + "join_policy", + "member_count", + "name" + ] + }, + "example" : [ + "access", + "created_at", + "description", + "id", + "join_policy", + "member_count", + "name" + ] + }, + "explode" : false, + "style" : "form" + }, "ComplianceJobFieldsParameter" : { "name" : "compliance_job.fields", "in" : "query", @@ -15952,6 +16386,35 @@ "explode" : false, "style" : "form" }, + "PersonalizedTrendFieldsParameter" : { + "name" : "personalized_trend.fields", + "in" : "query", + "description" : "A comma separated list of PersonalizedTrend fields to display.", + "required" : false, + "schema" : { + "type" : "array", + "description" : "The fields available for a PersonalizedTrend object.", + "minItems" : 1, + "uniqueItems" : true, + "items" : { + "type" : "string", + "enum" : [ + "category", + "post_count", + "trend_name", + "trending_since" + ] + }, + "example" : [ + "category", + "post_count", + "trend_name", + "trending_since" + ] + }, + "explode" : false, + "style" : "form" + }, "PlaceFieldsParameter" : { "name" : "place.fields", "in" : "query",