Skip to content

Instantly share code, notes, and snippets.

@Abhishek9634
Forked from marcin-adamczewski/zumba api
Created December 25, 2017 04:50
Show Gist options
  • Save Abhishek9634/9f0880fda31a671dc81c44f7e3a08fa1 to your computer and use it in GitHub Desktop.
Save Abhishek9634/9f0880fda31a671dc81c44f7e3a08fa1 to your computer and use it in GitHub Desktop.
swagger: "2.0"
info:
version: 1.0.0
title: Zumba's API
description: Documentation about Zumba's API.
contact:
name: Zumba Engineering Team
email: engineering@zumba.com
url: https://tech.zumba.com
host: apiv3.zumba.com
basePath: /
schemes:
- https
consumes:
- application/json
produces:
- application/json
tags:
- name: user
description: User/account Info
- name: membership
description: ZIN Membership Info
- name: dcd
description: Digital Content Deliverable (DCD)
- name: dcd-music
description: DCD - Music
- name: dcd-video
description: DCD - Video
- name: dcd-playlist
description: DCD - Playlist
security:
- OAuth2:
- basic
- user_email
- membership_status
- dcd
securityDefinitions:
OAuth2:
type: oauth2
scopes:
basic: Grants read access to profile info only.
user_email: Grants access to receive user's email.
membership_status: Grants read access to membership info only.
dcd: Grants read/write access to retrieve media content and set user preferences like favorite medias.
flow: accessCode
authorizationUrl: https://www.zumba.com/oauth/authorize
tokenUrl: https://www.zumba.com/oauth/access_token
paths:
/user:
get:
tags:
- user
summary: Retrieve user info
description: Retrieve user info.
security:
- OAuth2:
- basic
responses:
200:
description: OK
schema:
properties:
id:
type: string
description: ID in UUID format.
username:
type: string
email_address:
type: string
description: This field will be empty if the OAuth authorization didn't requested the user_email scope.
avatar_url:
type: string
description: URL with the user's picture/avatar.
first_name:
type: string
last_name:
type: string
pid:
type: string
branch:
type: string
facebook_id:
type: string
facebook_access_token:
type: string
isZIN:
type: boolean
isZES:
type: boolean
isZJ:
type: boolean
isGym:
type: boolean
/user/authenticate:
post:
tags:
- user
summary: Validate/Retrieve OAuth2 token
description: Validate if the username and password are valid and return the OAuth2 token.
consumes:
- application/x-www-form-urlencoded
parameters:
- name: body
in: body
required: true
schema:
required:
- username
- password
- client_id
- client_secret
properties:
username:
type: string
description: The username or email associated with the User's account
password:
type: string
description: User's password.
format: password
client_id:
type: string
description: Partner Client ID.
client_secret:
description: Partner Client Secret.
type: string
scope:
description: List of scopes separated by space
type: string
responses:
200:
description: Access token information to use for OAuth requests
schema:
properties:
access_token:
type: string
description: OAuth Access Token
expires_in:
type: integer
description: Time in seconds that the OAuth access token expires
token_type:
type: string
description: OAuth Token Type
scope:
type: string
description: OAuth scope granted
refresh_token:
type: string
description: OAuth Refresh Token
403:
description: Username/Email and password doesn't match, or requested with invalid or untrusted partner credentials.
/user/login:
post:
tags:
- user
summary: Login via Facebook
description: Login via Facebook id and auth token.
consumes:
- application/x-www-form-urlencoded
parameters:
- name: body
in: body
required: true
schema:
required:
- facebook_id
- facebook_access_token
properties:
facebook_id:
type: string
description: Facebook Id
facebook_access_token:
type: string
description: Facebook Access Token
Partner:
type: object
description: API Partner
properties:
id:
type: string
description: Parter API Client Id
responses:
200:
description: Access token information to use for OAuth requests
schema:
properties:
access_token:
type: string
description: OAuth Access Token
expires_in:
type: integer
description: Time in seconds that the OAuth access token expires
token_type:
type: string
description: OAuth Token Type
scope:
type: string
description: OAuth Scope Granted
refresh_token:
type: string
description: OAuth Refresh Token
400:
description: Unable to login with the given Facebook credentials.
/user/reset_password:
post:
tags:
- user
summary: Forgot password
description: Start the process of forgot password. The user will receive in their email a link to go and reset the password. It can't be resetted by API or other applications other than zumba.com.
consumes:
- application/x-www-form-urlencoded
parameters:
- name: body
in: body
required: true
schema:
properties:
username:
type: string
description: Needs to be defined if email is empty.
email:
type: string
description: Needs to be defined if username is empty.
responses:
200:
description: User located and will be notified on how to proceed to reset the password.
404:
description: Username/Email not found.
/oauth/access_token:
post:
tags:
- user
- oauth
summary: Retrieve OAuth2 token
description: Retrieve a new OAuth token when the old has expired
consumes:
- application/x-www-form-urlencoded
parameters:
- name: body
in: body
required: true
schema:
required:
- client_id
- client_secret
- grant_type
properties:
client_id:
type: string
description: Partner Client ID.
client_secret:
description: Partner Client Secret.
type: string
grant_type:
description: Either "refresh_token" or "authorization_code"
type: string
refresh_token:
description: The refresh token provided when initially authenticated, required if grant_type is "refresh_token"
type: string
code:
description: The authorization code, required if grant_type is "authorization_code"
type: string
redirect_uri:
description: The redirect URI, required if grant_type is "authorization_code"
type: string
responses:
200:
description: Access token information to use for OAuth requests
schema:
properties:
access_token:
type: string
description: OAuth Access Token
expires_in:
type: integer
description: Time in seconds that the OAuth access token expires
token_type:
type: string
description: OAuth Token Type
scope:
type: string
description: OAuth scope granted
403:
description: Invalid access token or refresh token or some other problem retrieving
/membership/status:
get:
tags:
- membership
summary: Get ZIN membership status
description: Return details about the ZIN membership status.
security:
- OAuth2:
- membership_status
responses:
200:
description: Membership information
schema:
properties:
member_valid_until:
type: string
description: Date where the membership expires if not renewed. Format "YYYY-mm-dd"
member_cancelled_on:
type: string
description: Date when the user cancelled the account. Format "YYYY-mm-dd"
user_pid:
type: string
description: User PID. Normally formatted as number
/dcd/featured:
get:
tags:
- dcd
summary: Get DCD featured content
description: |
Return all featured content available for digital distribution. This content varies according to the requested platform.
security:
- OAuth2:
- dcd
parameters:
- name: platform
in: query
description: Platform name. Only option available is "iphone".
required: true
type: string
enum: ["iphone"]
default: iphone
responses:
200:
description: List of featured content.
headers:
Etag:
description: Contains a hash of the content.
type: string
schema:
type: array
items:
$ref: '#/definitions/FeaturedDcd'
304:
description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
default:
description: unexpected error
schema:
$ref: '#/definitions/Error'
/dcd/playlist/default:
get:
tags:
- dcd-playlist
summary: Get default playlist
description: Retrieve the default curated playlist by Zumba. This is the "starting" playlist everyone should start with.
security:
- OAuth2:
- dcd
responses:
200:
description: Retrieve the playlist
headers:
Etag:
description: Contains a hash of the content.
type: string
schema:
$ref: '#/definitions/PlaylistWithSongs'
304:
description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
/dcd/playlist/{id}:
get:
tags:
- dcd-playlist
summary: Get specific playlist
description: Retrieve one curated playlist by Zumba.
security:
- OAuth2:
- dcd
parameters:
- name: id
type: integer
format: int32
minimum: 1
in: path
required: true
description: Playlist ID
responses:
200:
description: Retrieve the playlist
headers:
Etag:
description: Contains a hash of the content.
type: string
schema:
$ref: '#/definitions/PlaylistWithSongs'
304:
description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
404:
description: Playlist does not exists.
/dcd/playlist/clone:
post:
tags:
- dcd-playlist
summary: Clone's specific playlist
description: Clone a curated playlist by Zumba.
security:
- OAuth2:
- dcd
parameters:
- name: id
type: integer
format: int32
minimum: 1
in: body
required: true
description: Playlist ID to clone
responses:
200:
description: Playlist cloned successfully, new user playlist ID returned back.
schema:
properties:
id:
type: integer
description: ID for newly created user playlist
304:
description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
404:
description: Playlist does not exists.
/dcd/playlist/user:
get:
tags:
- dcd-playlist
summary: Get user's playlists
description: Retrieve all of the saved user's playlists
security:
- OAuth2:
- dcd
responses:
200:
description: Retrieve the user's playlists
headers:
Etag:
description: Contains a hash of the content.
type: string
schema:
type: array
items:
$ref: '#/definitions/Playlist'
304:
description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
post:
tags:
- dcd-playlist
summary: Create new user playlist
description: Create a new user playlist
security:
- OAuth2:
- dcd
parameters:
- name: body
in: body
required: true
schema:
required:
- name
- music
properties:
image:
type: string
description: Base 64 encode image data. This represents the album art. Image will be stored remotely, to be referrenced by HTTPS path.
name:
type: string
description: Playlist name.
music:
type: array
description: Array of playlist songs. For each song, do not need to provide the music data, just the reference.
items:
$ref: "#/definitions/PlaylistSong"
responses:
200:
description: User playlist created successfully, new user playlist ID returned back.
schema:
properties:
id:
type: integer
description: ID for newly created user playlist
/dcd/playlist/user/{id}:
get:
tags:
- dcd-playlist
summary: Get specific user playlist
description: Retrieve one specific playlist created by the user
security:
- OAuth2:
- dcd
parameters:
- name: id
type: integer
format: int32
minimum: 1
in: path
required: true
description: User's Playlist ID
responses:
200:
description: Retrieve the playlist
headers:
Etag:
description: Contains a hash of the content.
type: string
schema:
$ref: '#/definitions/PlaylistWithSongs'
304:
description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
404:
description: Playlist does not exist for the user.
post:
tags:
- dcd-playlist
summary: Update user playlist
description: Update user playlist
security:
- OAuth2:
- dcd
parameters:
- name: id
type: integer
format: int32
minimum: 1
in: path
required: true
description: User's Playlist ID to update
- name: body
in: body
required: true
schema:
$ref: "#/definitions/PlaylistWithSongs"
responses:
204:
description: User playlist updated successfully.
400:
description: Error while saving the playlist.
404:
description: Playlist ID not found for user.
delete:
tags:
- dcd-playlist
summary: Remove an entire user playlist
description: Remove an entire user playlist
security:
- OAuth2:
- dcd
parameters:
- name: id
type: integer
format: int32
minimum: 1
in: path
required: true
description: User's Playlist ID to remove
responses:
204:
description: User's playlist removed from system.
404:
description: Playlist ID not found for user.
/dcd/playlist/user/clone:
post:
tags:
- dcd-playlist
summary: Clone's a user's playlist
description: Clone a user's playlist.
security:
- OAuth2:
- dcd
parameters:
- name: id
type: integer
format: int32
minimum: 1
in: body
required: true
description: Playlist ID to clone
responses:
200:
description: Playlist cloned successfully, new user playlist ID returned back.
schema:
properties:
id:
type: integer
description: ID for newly created user playlist
304:
description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
404:
description: Playlist does not exists.
/dcd/music:
get:
tags:
- dcd-music
summary: Get all music
description: This method will only return the list of available songs for the given user.
security:
- OAuth2:
- dcd
responses:
200:
description: Return the list of songs
headers:
Etag:
description: Contains a hash of the content.
type: string
schema:
$ref: '#/definitions/MusicList'
304:
description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
/dcd/music/favorite:
get:
tags:
- dcd-music
summary: Get user's favorited music
description: List all favorited music by the user.
security:
- OAuth2:
- dcd
responses:
200:
description: Favorited music.
headers:
Etag:
description: Contains a hash of the content.
type: string
schema:
$ref: '#/definitions/MusicList'
304:
description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
post:
tags:
- dcd-music
summary: Add a music to user's favorite
description: Add a new music to favorites.
security:
- OAuth2:
- dcd
parameters:
- name: body
in: body
required: true
schema:
required:
- id
properties:
id:
type: integer
format: int32
minimum: 1
description: Music ID
responses:
204:
description: Music added to favorities or was previously added.
/dcd/music/favorite/{music_id}:
delete:
tags:
- dcd-music
summary: Remove a music from user's favorite
description: Remove a music from favorities.
security:
- OAuth2:
- dcd
parameters:
- name: music_id
type: integer
format: int32
minimum: 1
in: path
required: true
description: Music ID
responses:
204:
description: Music removed from favorities or was not part of the favorities before.
/dcd/music/report_play:
post:
tags:
- dcd-music
summary: Report music play
description: Report the user played music.
security:
- OAuth2:
- dcd
parameters:
- name: body
in: body
required: true
schema:
type: array
items:
required:
- music_id
- device_token
- country
- play_time
properties:
music_id:
type: integer
format: int32
minimum: 1
description: Music ID
device_token:
type: string
description: Device unique identifier.
country:
type: string
minLength: 2
maxLength: 2
description: Country ISO 3166-1 code.
play_time:
type: string
format: date-time
description: Date/time in RFC 3339 format.
client_ip:
type: string
description: Client IP address for the play being reported, defaults to requester's IP.
responses:
204:
description: Accepted and stored.
/dcd/music/{id}/assets:
get:
tags:
- dcd-music
summary: Get music assets
description: Retrieve a list of available assets for a given music.
security:
- OAuth2:
- dcd
parameters:
- name: id
type: integer
format: int32
minimum: 1
in: path
required: true
description: Music ID
- name: device_token
in: query
required: true
type: string
description: Device unique identifier.
responses:
200:
description: List of available assets.
schema:
type: array
items:
required:
- quality
- asset_url
properties:
quality:
type: string
enum:
- 128kbps
- 160kbps
- 192kbps
- 256kbps
- 320kbps
asset_url:
type: string
description: Signed URL valid to retrieve the content for a limited period of time.
403:
description: User does not have permissions to retrieve music.
404:
description: Music not found.
/dcd/music/featured:
get:
tags:
- dcd-music
summary: Get DCD featured content for music home page
description: Featured content available for digital distribution for music home page.
security:
- OAuth2:
- dcd
responses:
200:
description: List of featured music category.
headers:
Etag:
description: Contains a hash of the content.
type: string
schema:
type: array
items:
$ref: '#/definitions/FeaturedMusic'
304:
description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
/dcd/music/category:
get:
tags:
- dcd-music
summary: Get all music categories
description: Get a list of all music categories.
security:
- OAuth2:
- dcd
responses:
200:
description: Categories list.
headers:
Etag:
description: Contains a hash of the content.
type: string
schema:
type: array
items:
$ref: '#/definitions/MusicCategory'
304:
description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
/dcd/music/category/{id}:
get:
tags:
- dcd-music
summary: Get specific music category
description: Get details about a specific music category.
security:
- OAuth2:
- dcd
parameters:
- name: id
type: integer
format: int32
minimum: 1
in: path
required: true
description: Music category ID
responses:
200:
description: Music category information.
headers:
Etag:
description: Contains a hash of the content.
type: string
schema:
$ref: '#/definitions/MusicCategoryWithMusic'
304:
description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
/dcd/playlist/featured:
get:
tags:
- dcd-playlist
summary: Get DCD featured content for playlist home page
description: Featured content for playlist home page.
security:
- OAuth2:
- dcd
responses:
200:
description: Banner image and featured playlist info.
headers:
Etag:
description: Contains a hash of the content.
type: string
schema:
type: array
items:
$ref: '#/definitions/FeaturedDcd'
304:
description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
/dcd/video:
get:
tags:
- dcd-video
summary: Get all videos
description: This method will only return the list of available videos for the given user.
security:
- OAuth2:
- dcd
responses:
200:
description: Return the list of videos
headers:
Etag:
description: Contains a hash of the content.
type: string
schema:
$ref: '#/definitions/VideoList'
304:
description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
/dcd/video/favorite:
get:
tags:
- dcd-video
summary: Get user's favorited videos
description: List all favorited videos by the user.
security:
- OAuth2:
- dcd
responses:
200:
description: Favorited videos.
headers:
Etag:
description: Contains a hash of the content.
type: string
schema:
$ref: '#/definitions/VideoList'
304:
description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
post:
tags:
- dcd-video
summary: Add a video to user's favorite
description: Add a new video to favorites.
security:
- OAuth2:
- dcd
parameters:
- name: body
in: body
required: true
schema:
required:
- id
properties:
id:
type: integer
format: int32
minimum: 1
description: Video ID
responses:
204:
description: Video added to favorities or was previously added.
/dcd/video/favorite/{video_id}:
delete:
tags:
- dcd-video
summary: Remove a video from user's favorite
description: Remove a video from favorities.
security:
- OAuth2:
- dcd
parameters:
- name: video_id
type: integer
format: int32
minimum: 1
in: path
required: true
description: Video ID
responses:
204:
description: Video removed from favorities or was not part of the favorities before.
/dcd/video/report_play:
post:
tags:
- dcd-video
summary: Report video play
description: Report the user played video(s).
security:
- OAuth2:
- dcd
parameters:
- name: body
in: body
required: true
schema:
type: array
items:
required:
- video_id
- asset_id
- device_token
- country
- play_time
properties:
video_id:
type: integer
format: int32
minimum: 1
description: Video ID
asset_id:
type: integer
format: int32
minimum: 1
description: Video Asset ID
device_token:
type: string
description: Device unique identifier.
country:
type: string
minLength: 2
maxLength: 2
description: Country ISO 3166-1 code.
play_time:
type: string
format: date-time
description: Date/time in RFC 3339 format.
responses:
204:
description: Accepted and stored.
/dcd/video/featured:
get:
tags:
- dcd-video
summary: Get DCD featured content for video home page
description: Featured content available for digital distribution for video home page.
security:
- OAuth2:
- dcd
responses:
200:
description: List of featured video categories.
headers:
Etag:
description: Contains a hash of the content.
type: string
schema:
type: array
items:
$ref: '#/definitions/FeaturedVideo'
304:
description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
/dcd/video/category:
get:
tags:
- dcd-video
summary: Get all video categories
description: Get a list of all video categories.
security:
- OAuth2:
- dcd
responses:
200:
description: Categories list.
headers:
Etag:
description: Contains a hash of the content.
type: string
schema:
type: array
items:
$ref: '#/definitions/VideoCategory'
304:
description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
/dcd/video/category/{id}:
get:
tags:
- dcd-video
summary: Get specific video category
description: Get details about a specific video category.
security:
- OAuth2:
- dcd
parameters:
- name: id
type: integer
format: int32
minimum: 1
in: path
required: true
description: Video category ID
responses:
200:
description: Video category information.
headers:
Etag:
description: Contains a hash of the content.
type: string
schema:
$ref: '#/definitions/VideoCategoryWithVideos'
304:
description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
/dcd/zin_volume/{id_or_slug}:
get:
tags:
- dcd-video
summary: Retrieve a ZIN Volume details
description: Will contain all the ZIN volume information, including the sections, videos, music, notes, etc.
parameters:
- name: id_or_slug
type: string
description: Category ID (ie, 123) or slug (ie, zin-volume-60).
in: path
required: true
responses:
200:
description: ZIN Volume information.
headers:
Etag:
description: Contains a hash of the content.
type: string
schema:
$ref: '#/definitions/ZinVolume'
304:
description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
/dcd/sound_effect:
get:
tags:
- dcd
summary: Retrieve list of sound effects
description: Will have all the available sound effects, along with an image URL and title.
security:
- OAuth2:
- dcd
responses:
200:
description: Sound effect information
headers:
Etag:
description: Contains a hash of the sound effect contents
type: string
schema:
type: array
items:
$ref: '#/definitions/SoundEffect'
304:
description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
definitions:
IntID:
type: integer
format: int32
minimum: 1
Featured:
required:
- id
- images
- tag
- title
- description
properties:
id:
$ref: '#/definitions/IntID'
images:
type: object
description: Image paths (HTTPS).
properties:
iphone_5:
type: string
iphone_6:
type: string
iphone_6_p:
type: string
tag:
type: string
title:
type: string
description:
type: string
FeaturedDcd:
allOf:
- $ref: '#/definitions/Featured'
- properties:
link:
type: string
FeaturedMusic:
allOf:
- $ref: '#/definitions/Featured'
- properties:
category_id:
$ref: '#/definitions/IntID'
FeaturedVideo:
allOf:
- $ref: '#/definitions/Featured'
- properties:
category_id:
$ref: '#/definitions/IntID'
Playlist:
description: Music Playlist
required:
- id
- name
properties:
id:
$ref: '#/definitions/IntID'
image:
type: string
description: This represents the album art. Either base64 encoded string or the remote image path (HTTPS).
name:
type: string
description: Playlist name.
minLength: 1
maxLength: 22
modified:
type: string
format: date-time
description: Last modified date for Playlist
PlaylistWithSongs:
allOf:
- $ref: '#/definitions/Playlist'
- properties:
songs:
type: array
description: List of Playlist Songs
items:
$ref: '#/definitions/PlaylistSong'
PlaylistSong:
required:
- reference
- order
properties:
reference:
type: string
description: If integer, references Zumba music and music will be included, anything else reference some user specific content and will not have music data.
minLength: 1
maxLength: 255
music:
$ref: '#/definitions/Music'
options:
type: array
description: Options for playlist, like sound effects, etc
items:
$ref: '#/definitions/PlaylistSongOption'
order:
type: integer
description: Order in the playlist, set automatically when creating / updating user playlist
PlaylistSongOption:
description: Sound effect, trim, fade, or other change to playlist song
required:
- option_type
- start
properties:
option_type:
type: string
enum:
- Trim
- Effect
- Break
start:
type: integer
description: Start time in seconds from start of song
value:
type: string
description: Depends on type of song option. Effect will reference what sound effect, trim will reference end time.
Rhythm:
required:
- id
- name
properties:
id:
$ref: '#/definitions/IntID'
name:
type: string
Artist:
required:
- id
- name
properties:
id:
$ref: '#/definitions/IntID'
name:
type: string
Music:
required:
- id
- name
- duration
- rhythm
- artist
- can_stream
- can_download
properties:
id:
$ref: '#/definitions/IntID'
name:
type: string
duration:
type: integer
description: Time in seconds.
keywords:
type: array
items:
type: string
bpm:
type: integer
description: Beats Per Minute.
minimum: 0
rhythm:
$ref: '#/definitions/Rhythm'
artist:
$ref: '#/definitions/Artist'
categories:
type: array
description: Music categories without the children categories.
items:
$ref: '#/definitions/MusicCategory'
can_stream:
type: boolean
default: true
can_download:
type: boolean
default: true
release_date:
type: string
format: date-time
description: Music release date
is_spicy:
type: boolean
default: false
related_videos:
$ref: '#/definitions/VideoList'
choreography_video:
$ref: '#/definitions/Video'
MusicList:
description: List of songs.
type: array
items:
$ref: '#/definitions/Music'
MusicCategory:
description: Music category.
required:
- id
- name
- slug
- type
- thumbnail_url
- images
properties:
id:
$ref: '#/definitions/IntID'
thumbnail_url:
type: string
images:
type: object
description: Image paths (HTTPS).
properties:
iphone_5:
type: string
iphone_6:
type: string
iphone_6_p:
type: string
name:
type: string
description:
type: string
type:
type: string
enum: ["regular", "mega-mix", "zin-volume"]
default: regular
display_order:
type: integer
minimum: 0
children_categories:
type: array
items:
$ref: '#/definitions/MusicCategory'
num_music:
type: integer
minimum: 0
MusicCategoryWithMusic:
allOf:
- $ref: '#/definitions/MusicCategory'
- properties:
music:
$ref: "#/definitions/MusicList"
Video:
properties:
id:
$ref: '#/definitions/IntID'
name:
type: string
description:
type: string
duration:
type: integer
description: Time in seconds.
thumbnail_url:
type: string
keywords:
type: array
items:
type: string
rhythm:
$ref: '#/definitions/Rhythm'
categories:
type: array
description: Video categories without the children categories.
items:
$ref: '#/definitions/VideoCategory'
can_stream:
type: boolean
default: true
can_download:
type: boolean
default: true
release_date:
type: string
format: date-time
description: Music release date
is_spicy:
type: boolean
default: false
related_music:
$ref: '#/definitions/Music'
VideoList:
type: array
items:
$ref: '#/definitions/Video'
VideoCategory:
required:
- id
- name
- slug
- type
- thumbnail_url
- images
properties:
id:
$ref: '#/definitions/IntID'
thumbnail_url:
type: string
images:
type: object
description: Image paths (HTTPS).
properties:
iphone_5:
type: string
iphone_6:
type: string
iphone_6_p:
type: string
name:
type: string
description:
type: string
type:
type: string
enum: ["regular", "zin-volume"]
default: regular
display_order:
type: integer
minimum: 0
children_categories:
type: array
items:
$ref: '#/definitions/MusicCategory'
num_videos:
type: integer
minimum: 0
VideoCategoryWithVideos:
allOf:
- $ref: '#/definitions/VideoCategory'
- properties:
videos:
$ref: "#/definitions/VideoList"
ZinVolume:
required:
- id
properties:
id:
$ref: '#/definitions/IntID'
name:
type: string
slug:
type: string
image:
type: string
description: TBD
description:
type: string
legal_description:
type: string
description: Usually contains information about the licensing and when the user can use on their classes.
video_sections:
type: array
items:
$ref: '#/definitions/VideoCategory'
music_section:
$ref: '#/definitions/MusicCategory'
SoundEffect:
required:
- id
- title
- thumbnail_url
- url
- order
properties:
id:
$ref: '#/definitions/IntID'
title:
type: string
thumbnail_url:
type: string
url:
type: string
description: URL for the wav or mp3 sound file.
order:
type: integer
minimum: 0
description: Display order.
Error:
required:
- code
- message
properties:
code:
type: integer
format: int32
message:
type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment