Skip to content

Commit 7074da2

Browse files
committed
Update documentation with latest OpenAPI spec
1 parent 8211bde commit 7074da2

1 file changed

Lines changed: 9 additions & 159 deletions

File tree

openapi.json

Lines changed: 9 additions & 159 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"openapi" : "3.0.0",
33
"info" : {
44
"description" : "Twitter API v2 available endpoints",
5-
"version" : "2.137",
5+
"version" : "2.138",
66
"title" : "Twitter API v2",
77
"termsOfService" : "https://developer.twitter.com/en/developer-terms/agreement-and-policy.html",
88
"contact" : {
@@ -813,7 +813,7 @@
813813
],
814814
"summary" : "Get DM Events for a DM Conversation",
815815
"description" : "Returns DM Events for a DM Conversation",
816-
"operationId" : "getDmConversationsWithParticipantIdDmEvents",
816+
"operationId" : "getDmEventsByParticipantId",
817817
"parameters" : [
818818
{
819819
"name" : "participant_id",
@@ -3195,143 +3195,6 @@
31953195
}
31963196
}
31973197
}
3198-
},
3199-
"post" : {
3200-
"security" : [
3201-
{
3202-
"OAuth2UserToken" : [
3203-
"media.write"
3204-
]
3205-
},
3206-
{
3207-
"UserToken" : [ ]
3208-
}
3209-
],
3210-
"tags" : [
3211-
"MediaUpload"
3212-
],
3213-
"summary" : "Media Upload",
3214-
"description" : "MediaUpload",
3215-
"externalDocs" : {
3216-
"url" : "https://developer.x.com"
3217-
},
3218-
"operationId" : "uploadMedia",
3219-
"parameters" : [
3220-
{
3221-
"name" : "media_id",
3222-
"in" : "query",
3223-
"description" : "The media id of the targeted media to APPEND/FINALIZE.",
3224-
"required" : false,
3225-
"schema" : {
3226-
"$ref" : "#/components/schemas/MediaId"
3227-
},
3228-
"style" : "form"
3229-
},
3230-
{
3231-
"name" : "total_bytes",
3232-
"in" : "query",
3233-
"description" : "Total number of bytes being uploaded.",
3234-
"required" : false,
3235-
"schema" : {
3236-
"type" : "integer",
3237-
"format" : "int32"
3238-
},
3239-
"style" : "form"
3240-
},
3241-
{
3242-
"name" : "media_type",
3243-
"in" : "query",
3244-
"description" : "The MIME type of the media being uploaded. For example, video/mp4.",
3245-
"required" : false,
3246-
"schema" : {
3247-
"type" : "string"
3248-
},
3249-
"style" : "form"
3250-
},
3251-
{
3252-
"name" : "media_category",
3253-
"in" : "query",
3254-
"description" : "A string enum value which identifies a media use-case. This identifier is used to enforce use-case specific constraints (e.g. file size, video duration) and enable advanced features.",
3255-
"required" : false,
3256-
"schema" : {
3257-
"$ref" : "#/components/schemas/MediaCategory"
3258-
},
3259-
"style" : "form"
3260-
},
3261-
{
3262-
"name" : "additional_owners",
3263-
"in" : "query",
3264-
"description" : "A comma-separated list of user IDs to set as additional owners allowed to use the returned media_id in Tweets or Cards. Up to 100 additional owners may be specified.",
3265-
"required" : false,
3266-
"schema" : {
3267-
"type" : "array",
3268-
"items" : {
3269-
"$ref" : "#/components/schemas/UserId"
3270-
}
3271-
},
3272-
"style" : "form"
3273-
},
3274-
{
3275-
"name" : "command",
3276-
"in" : "query",
3277-
"description" : "The type of command to use.",
3278-
"required" : true,
3279-
"schema" : {
3280-
"$ref" : "#/components/schemas/MediaCommand"
3281-
},
3282-
"style" : "form"
3283-
}
3284-
],
3285-
"requestBody" : {
3286-
"content" : {
3287-
"multipart/form-data" : {
3288-
"schema" : {
3289-
"$ref" : "#/components/schemas/MediaUploadAppendRequest"
3290-
}
3291-
}
3292-
}
3293-
},
3294-
"responses" : {
3295-
"200" : {
3296-
"description" : "The request has succeeded.",
3297-
"content" : {
3298-
"application/json" : {
3299-
"schema" : {
3300-
"$ref" : "#/components/schemas/MediaUploadResponse"
3301-
}
3302-
}
3303-
}
3304-
},
3305-
"202" : {
3306-
"description" : "The request has succeeded.",
3307-
"content" : {
3308-
"application/json" : {
3309-
"schema" : {
3310-
"$ref" : "#/components/schemas/MediaUploadResponse"
3311-
}
3312-
}
3313-
}
3314-
},
3315-
"204" : {
3316-
"description" : "The request has succeeded.",
3317-
"content" : { }
3318-
},
3319-
"default" : {
3320-
"description" : "The request has failed.",
3321-
"content" : {
3322-
"application/json" : {
3323-
"schema" : {
3324-
"$ref" : "#/components/schemas/Error"
3325-
}
3326-
},
3327-
"application/problem+json" : {
3328-
"schema" : {
3329-
"$ref" : "#/components/schemas/Problem"
3330-
}
3331-
}
3332-
}
3333-
}
3334-
}
33353198
}
33363199
},
33373200
"/2/media/upload/initialize" : {
@@ -14883,16 +14746,6 @@
1488314746
],
1488414747
"example" : "TweetVideo"
1488514748
},
14886-
"MediaCommand" : {
14887-
"type" : "string",
14888-
"description" : "The media upload command",
14889-
"enum" : [
14890-
"INIT",
14891-
"APPEND",
14892-
"FINALIZE"
14893-
],
14894-
"example" : "APPEND"
14895-
},
1489614749
"MediaHeight" : {
1489714750
"type" : "integer",
1489814751
"description" : "The height of the media in pixels.",
@@ -14991,7 +14844,7 @@
1499114844
"MediaSegments" : {
1499214845
"type" : "integer",
1499314846
"description" : "An integer value representing the media upload segment.",
14994-
"minimum" : 1,
14847+
"minimum" : 0,
1499514848
"maximum" : 999,
1499614849
"format" : "int32"
1499714850
},
@@ -15034,14 +14887,6 @@
1503414887
"type" : "integer",
1503514888
"description" : "Unix epoch time in seconds after when the upload session expires.",
1503614889
"format" : "int64"
15037-
},
15038-
"total_bytes" : {
15039-
"type" : "integer",
15040-
"description" : "Size of the upload",
15041-
"format" : "int32"
15042-
},
15043-
"total_segments" : {
15044-
"$ref" : "#/components/schemas/MediaSegments"
1504514890
}
1504614891
}
1504714892
},
@@ -15087,13 +14932,18 @@
1508714932
],
1508814933
"example" : "video/mp4"
1508914934
},
14935+
"shared" : {
14936+
"type" : "boolean",
14937+
"description" : "Whether this media is shared or not."
14938+
},
1509014939
"total_bytes" : {
1509114940
"type" : "integer",
1509214941
"description" : "The total size of the media upload in bytes.",
1509314942
"minimum" : 0,
1509414943
"maximum" : 536870912
1509514944
}
15096-
}
14945+
},
14946+
"additionalProperties" : false
1509714947
},
1509814948
"MediaUploadResponse" : {
1509914949
"type" : "object",

0 commit comments

Comments
 (0)