Skip to content

Commit

Permalink
Update openapi.json
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 13, 2024
1 parent b8046d5 commit 8abd6b4
Showing 1 changed file with 190 additions and 1 deletion.
191 changes: 190 additions & 1 deletion docs/openapi.v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"openapi" : "3.0.0",
"info" : {
"description" : "Twitter API v2 available endpoints",
"version" : "2.112",
"version" : "2.113",
"title" : "Twitter API v2",
"termsOfService" : "https://developer.twitter.com/en/developer-terms/agreement-and-policy.html",
"contact" : {
Expand Down Expand Up @@ -2238,6 +2238,77 @@
}
}
},
"/2/notes" : {
"get" : {
"security" : [
{
"BearerToken" : [ ]
},
{
"OAuth2UserToken" : [
"list.read",
"tweet.read",
"users.read"
]
},
{
"UserToken" : [ ]
}
],
"tags" : [
"Community Notes"
],
"summary" : "Community Note lookup by Post ID",
"description" : "Returns a variety of information about the Community Noted specified by the requested Post ID.",
"externalDocs" : {
"url" : "https://developer.x.com/en/docs/x-api/community_notes/api-reference/get-community-note"
},
"operationId" : "findNoteByTweetId",
"parameters" : [
{
"name" : "postId",
"in" : "query",
"description" : "A single Post ID.",
"required" : true,
"schema" : {
"$ref" : "#/components/schemas/TweetId"
},
"explode" : false,
"style" : "form"
},
{
"$ref" : "#/components/parameters/NoteFieldsParameter"
}
],
"responses" : {
"200" : {
"description" : "The request has succeeded.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Get2NotesResponse"
}
}
}
},
"default" : {
"description" : "The request has failed.",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Error"
}
},
"application/problem+json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
}
}
}
}
},
"/2/openapi.json" : {
"get" : {
"tags" : [
Expand Down Expand Up @@ -9241,6 +9312,12 @@
}
]
},
"CommunityId" : {
"type" : "string",
"description" : "The unique identifier of this Community.",
"pattern" : "^[0-9]{1,19}$",
"example" : "1146654567674912769"
},
"ComplianceJob" : {
"type" : "object",
"required" : [
Expand Down Expand Up @@ -10566,6 +10643,21 @@
}
}
},
"Get2NotesResponse" : {
"type" : "object",
"properties" : {
"data" : {
"$ref" : "#/components/schemas/Note"
},
"errors" : {
"type" : "array",
"minItems" : 1,
"items" : {
"$ref" : "#/components/schemas/Problem"
}
}
}
},
"Get2SpacesByCreatorIdsResponse" : {
"type" : "object",
"properties" : {
Expand Down Expand Up @@ -12448,6 +12540,64 @@
}
]
},
"Note" : {
"type" : "object",
"description" : "A X Community Note is a note on a Post.",
"required" : [
"id",
"text"
],
"properties" : {
"classification" : {
"$ref" : "#/components/schemas/NoteClassification"
},
"created_at" : {
"type" : "string",
"format" : "date-time"
},
"deleted" : {
"type" : "boolean",
"description" : "Whether the Community Note has been deleted or not."
},
"id" : {
"$ref" : "#/components/schemas/NoteId"
},
"rating_status" : {
"$ref" : "#/components/schemas/NoteRatingStatus"
},
"text" : {
"type" : "string",
"description" : "The text summary in the Community Note."
}
}
},
"NoteClassification" : {
"type" : "string",
"description" : "Community Note classification type.",
"enum" : [
"HarmfullyMisleading",
"MisinformedOrPotentiallyMisleading",
"NotMisleading",
"PotentiallyMisleading"
]
},
"NoteId" : {
"type" : "string",
"description" : "The unique identifier of this Community Note.",
"pattern" : "^[0-9]{1,19}$",
"example" : "1146654567674912769"
},
"NoteRatingStatus" : {
"type" : "string",
"description" : "Community Note rating status.",
"enum" : [
"CurrentlyRatedHelpful",
"CurrentlyRatedNotHelpful",
"InsufficientConsensus",
"MinimumRatingsNotMet",
"NeedsMoreRatings"
]
},
"NoteTweetText" : {
"type" : "string",
"description" : "The note content of the Tweet.",
Expand Down Expand Up @@ -13354,6 +13504,9 @@
"author_id" : {
"$ref" : "#/components/schemas/UserId"
},
"community_id" : {
"$ref" : "#/components/schemas/CommunityId"
},
"context_annotations" : {
"type" : "array",
"minItems" : 1,
Expand Down Expand Up @@ -13737,6 +13890,9 @@
"type" : "string",
"description" : "Card Uri Parameter. This is mutually exclusive from Quote Tweet Id, Poll, Media, and Direct Message Deep Link."
},
"community_id" : {
"$ref" : "#/components/schemas/CommunityId"
},
"direct_message_deep_link" : {
"type" : "string",
"description" : "Link to take the conversation from the public timeline to a private Direct Message."
Expand Down Expand Up @@ -15763,6 +15919,39 @@
"explode" : false,
"style" : "form"
},
"NoteFieldsParameter" : {
"name" : "note.fields",
"in" : "query",
"description" : "A comma separated list of Note fields to display.",
"required" : false,
"schema" : {
"type" : "array",
"description" : "The fields available for a Note object.",
"minItems" : 1,
"uniqueItems" : true,
"items" : {
"type" : "string",
"enum" : [
"classification",
"created_at",
"deleted",
"id",
"rating_status",
"text"
]
},
"example" : [
"classification",
"created_at",
"deleted",
"id",
"rating_status",
"text"
]
},
"explode" : false,
"style" : "form"
},
"PlaceFieldsParameter" : {
"name" : "place.fields",
"in" : "query",
Expand Down

0 comments on commit 8abd6b4

Please sign in to comment.