Skip to content

Instantly share code, notes, and snippets.

@ThisIsMissEm
Created March 6, 2021 18:21
Show Gist options
  • Save ThisIsMissEm/682a272fe1bef10c80ae497848cca06b to your computer and use it in GitHub Desktop.
Save ThisIsMissEm/682a272fe1bef10c80ae497848cca06b to your computer and use it in GitHub Desktop.
openapi: 3.0.0
info:
title: tumblr
version: 3.0.0
contact:
name: Tumblr
url: 'https://github.com/tumblr/docs/issues'
description: The official tumblr API
tags:
- name: Blog
description: Related to blogs
- name: User
description: Related to users
servers:
- url: 'https://api.tumblr.com'
paths:
'/v2/blog/{blogIdentifier}/info':
parameters:
- schema:
type: string
name: blogIdentifier
in: path
description: Any blog identifier See the Blog Identifiers for more details.
required: true
get:
summary: Blog Info
tags:
- Blog
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
meta:
$ref: '#/components/schemas/Meta'
response:
type: object
properties:
blog:
$ref: '#/components/schemas/Blog'
'201':
description: Created
operationId: get-v2-blog-blogIdentifier-info
parameters: []
description: 'This method returns general information about the blog, such as the title, number of posts, and other high-level data.'
security:
- API Key: []
'/v2/blog/{blogIdentifier}/avatar':
parameters:
- schema:
type: string
name: blogIdentifier
in: path
required: true
get:
summary: Retrieve a Blog Avatar
tags:
- Blog
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
avatar_url:
type: string
operationId: get-v2-blog-blogIdentifier-avatar
description: You can get a blog's avatar in 64x64 pixels size.
security:
- API Key: []
'/v2/blog/{blogIdentifier}/avatar/{size}':
parameters:
- schema:
type: string
name: blogIdentifier
in: path
required: true
- schema:
type: number
enum:
- 16
- 24
- 30
- 40
- 48
- 64
- 96
- 128
- 512
name: size
required: true
in: path
description: 'The size of the avatar (square, one value for both length and width). Must be one of the values: 16, 24, 30, 40, 48, 64, 96, 128, 512'
get:
summary: Retrieve a Blog Avatar in a given size
tags:
- Blog
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
avatar_url:
type: string
operationId: get-v2-blog-blogIdentifier-avatar-size
description: You can get a blog's avatar in 9 different sizes. The default size is 64x64.
security:
- API Key: []
'/v2/blog/{blogIdentifier}/blocks':
parameters:
- schema:
type: string
name: blogIdentifier
in: path
required: true
get:
summary: Retrieve a Blog Avatar
tags:
- Blog
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
avatar_url:
type: string
operationId: get-v2-blog-blogIdentifier-avatar
description: You can get a blog's avatar in 64x64 pixels size.
security:
- API Key: []
components:
schemas:
Blog:
description: ''
type: object
properties:
title:
type: string
minLength: 1
posts:
type: integer
name:
type: string
minLength: 1
url:
type: string
minLength: 1
updated:
type: integer
description:
type: string
ask:
type: boolean
ask_anon:
type: boolean
likes:
type: integer
is_blocked_from_primary:
type: boolean
avatar:
uniqueItems: true
minItems: 1
type: array
items:
$ref: '#/components/schemas/Avatar'
theme:
$ref: '#/components/schemas/Theme'
timezone:
type: string
timezone_offset:
type: string
required:
- title
- posts
- name
- url
- updated
- description
- ask
- ask_anon
- likes
- is_blocked_from_primary
- avatar
- theme
- timezone
- timezone_offset
Link:
type: object
description: ''
additionalProperties: false
properties:
type:
type: string
minLength: 1
method:
type: string
minLength: 1
href:
type: string
minLength: 1
query_params:
type: object
minProperties: 1
required:
- type
- href
title: Link
Meta:
title: Meta
type: object
properties:
status:
type: integer
msg:
type: string
Avatar:
title: Avatar
type: object
properties:
height:
type: integer
width:
type: integer
url:
type: string
format: uri
Theme:
title: Theme
type: object
properties:
avatar_shape:
type: string
description: 'Either "circle" or "square", this is the shape of the mask over the user''s avatar.'
enum:
- circle
- square
background_color:
type: string
description: The intended hex color used for the blog's background color.
body_font:
type: string
description: The font that the blog has selected as their "body" font.
header_bounds:
type: array
description: 'If the blog''s header should be cropped, this is a comma-separated list of top/right/bottom/left coordinates to use.'
items:
type: integer
header_image:
type: string
description: 'The URL of the blog''s original, full header image. Note that this may be a default Tumblr header image.'
format: uri
header_image_focused:
type: string
description: 'If the blog cropped/repositioned their header image, this will be that version, which should be preferred over the original.'
format: uri
header_image_poster:
type: string
description: 'The URL of a single-frame "poster" version of the blog''s header image, if it''s an animated image. Note that this may be an empty string if no poster could be made or is not needed.'
format: uri
header_image_scaled:
type: string
description: 'If the blog only scaled their header image, this will be that scaled version. Note that this may be a default Tumblr header image in the case that they scaled and repositioned it, in which case, use the _focused version.'
format: uri
header_stretch:
type: boolean
description: Whether or not the blog's header is meant to be stretched to aspect-fill any given space where it's used.
link_color:
type: string
description: The intended hex color of any links in the blog's description.
show_avatar:
type: boolean
description: 'Whether or not the blog''s avatar should be displayed, even if it''s given in the API payload.'
show_description:
type: boolean
description: 'Whether or not the blog''s description should be displayed, even if it''s given in the API payload.'
show_header_image:
type: boolean
description: 'Whether or not the blog''s header image should be displayed, even if it''s given in the API payload.'
show_title:
type: boolean
description: 'Whether or not the blog''s title should be displayed, even if it''s given in the API payload.'
title_color:
type: string
description: The intended hex color of the blog's title.
title_font:
type: string
description: The intended font to use when displaying the blog's title.
title_font_weight:
type: string
description: The intended font weight to use when displaying the blog's title.
securitySchemes:
API Key:
name: api_key
type: apiKey
in: query
description: Your OAuth Consumer Key See Authentication for more details.
security:
- API Key: []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment