Skip to content

Commit 2c0a480

Browse files
authored
Automated Spotify Web API update (#66)
1 parent 08e5358 commit 2c0a480

File tree

2 files changed

+65
-4
lines changed

2 files changed

+65
-4
lines changed

spotify-web-api-core/src/main/resources/spotify-web-api.yml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,8 @@ objects:
504504
if not available.
505505
- name: description
506506
type: String
507-
description: A description of the episode.
507+
description: "A description of the episode. HTML tags are stripped away from\
508+
\ this field, use `html_description` field in case HTML tags are needed."
508509
- name: duration_ms
509510
type: Integer
510511
description: The episode length in milliseconds.
@@ -518,6 +519,9 @@ objects:
518519
- name: href
519520
type: String
520521
description: A link to the Web API endpoint providing full details of the episode.
522+
- name: html_description
523+
type: String
524+
description: A description of the episode. This field may contain HTML tags.
521525
- name: id
522526
type: String
523527
description: "The [Spotify ID](https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids)\
@@ -553,6 +557,11 @@ objects:
553557
type: String
554558
description: "The precision with which `release_date` value is known: `\"year\"\
555559
`, `\"month\"`, or `\"day\"`."
560+
- name: restrictions
561+
type: EpisodeRestrictionObject
562+
description: "Included in the response when a content restriction is applied.\
563+
\ See [Restriction Object](https://developer.spotify.com/documentation/web-api/reference/#object-episoderestrictionobject)\
564+
\ for more details."
556565
- name: resume_point
557566
type: ResumePointObject
558567
description: The user's most recent position in the episode. Set if the supplied
@@ -567,6 +576,20 @@ objects:
567576
type: String
568577
description: "The [Spotify URI](https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids)\
569578
\ for the episode."
579+
EpisodeRestrictionObject:
580+
name: EpisodeRestrictionObject
581+
id: object-episoderestrictionobject
582+
link: https://developer.spotify.com/documentation/web-api/reference/#object-episoderestrictionobject
583+
properties:
584+
- name: reason
585+
type: String
586+
description: "The reason for the restriction. Supported values: \n\n- `market`\
587+
\ - The content item is not available in the given market. \n- `product`\
588+
\ - The content item is not available for the user's subscription type. \n\
589+
- `explicit` - The content item is explicit and the user's account is set\
590+
\ to not play explicit content. \n Additional reasons may be added in the\
591+
\ future. **Note**: If you use this field, make sure that your application\
592+
\ safely handles unknown values."
570593
EpisodesObject:
571594
name: EpisodesObject
572595
properties:
@@ -1339,7 +1362,8 @@ objects:
13391362
if not available.
13401363
- name: description
13411364
type: String
1342-
description: A description of the episode.
1365+
description: "A description of the episode. HTML tags are stripped away from\
1366+
\ this field, use `html_description` field in case HTML tags are needed."
13431367
- name: duration_ms
13441368
type: Integer
13451369
description: The episode length in milliseconds.
@@ -1353,6 +1377,9 @@ objects:
13531377
- name: href
13541378
type: String
13551379
description: A link to the Web API endpoint providing full details of the episode.
1380+
- name: html_description
1381+
type: String
1382+
description: A description of the episode. This field may contain HTML tags.
13561383
- name: id
13571384
type: String
13581385
description: "The [Spotify ID](https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids)\
@@ -1388,6 +1415,11 @@ objects:
13881415
type: String
13891416
description: "The precision with which `release_date` value is known: `\"year\"\
13901417
`, `\"month\"`, or `\"day\"`."
1418+
- name: restrictions
1419+
type: EpisodeRestrictionObject
1420+
description: "Included in the response when a content restriction is applied.\
1421+
\ See [Restriction Object](https://developer.spotify.com/documentation/web-api/reference/#object-episoderestrictionobject)\
1422+
\ for more details."
13911423
- name: resume_point
13921424
type: ResumePointObject
13931425
description: The user's most recent position in the episode. Set if the supplied

spotify-web-api-generator-open-api/spotify-web-api-openapi.yml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6186,7 +6186,9 @@ components:
61866186
if not available.
61876187
description:
61886188
type: string
6189-
description: A description of the episode.
6189+
description: "A description of the episode. HTML tags are stripped away\
6190+
\ from this field, use `html_description` field in case HTML tags are\
6191+
\ needed."
61906192
duration_ms:
61916193
type: integer
61926194
description: The episode length in milliseconds.
@@ -6201,6 +6203,9 @@ components:
62016203
type: string
62026204
description: A link to the Web API endpoint providing full details of the
62036205
episode.
6206+
html_description:
6207+
type: string
6208+
description: A description of the episode. This field may contain HTML tags.
62046209
id:
62056210
type: string
62066211
description: "The [Spotify ID](https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids)\
@@ -6241,6 +6246,8 @@ components:
62416246
type: string
62426247
description: "The precision with which `release_date` value is known: `\"\
62436248
year\"`, `\"month\"`, or `\"day\"`."
6249+
restrictions:
6250+
$ref: '#/components/schemas/EpisodeRestrictionObject'
62446251
resume_point:
62456252
$ref: '#/components/schemas/ResumePointObject'
62466253
show:
@@ -6255,6 +6262,21 @@ components:
62556262
externalDocs:
62566263
description: Find more info on the official Spotify Web API Reference
62576264
url: https://developer.spotify.com/documentation/web-api/reference/#object-episodeobject
6265+
EpisodeRestrictionObject:
6266+
type: object
6267+
properties:
6268+
reason:
6269+
type: string
6270+
description: "The reason for the restriction. Supported values: \n\n- `market`\
6271+
\ - The content item is not available in the given market. \n- `product`\
6272+
\ - The content item is not available for the user's subscription type.\
6273+
\ \n- `explicit` - The content item is explicit and the user's account\
6274+
\ is set to not play explicit content. \n Additional reasons may be\
6275+
\ added in the future. **Note**: If you use this field, make sure that\
6276+
\ your application safely handles unknown values."
6277+
externalDocs:
6278+
description: Find more info on the official Spotify Web API Reference
6279+
url: https://developer.spotify.com/documentation/web-api/reference/#object-episoderestrictionobject
62586280
EpisodesObject:
62596281
type: object
62606282
properties:
@@ -7491,7 +7513,9 @@ components:
74917513
if not available.
74927514
description:
74937515
type: string
7494-
description: A description of the episode.
7516+
description: "A description of the episode. HTML tags are stripped away\
7517+
\ from this field, use `html_description` field in case HTML tags are\
7518+
\ needed."
74957519
duration_ms:
74967520
type: integer
74977521
description: The episode length in milliseconds.
@@ -7506,6 +7530,9 @@ components:
75067530
type: string
75077531
description: A link to the Web API endpoint providing full details of the
75087532
episode.
7533+
html_description:
7534+
type: string
7535+
description: A description of the episode. This field may contain HTML tags.
75097536
id:
75107537
type: string
75117538
description: "The [Spotify ID](https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids)\
@@ -7546,6 +7573,8 @@ components:
75467573
type: string
75477574
description: "The precision with which `release_date` value is known: `\"\
75487575
year\"`, `\"month\"`, or `\"day\"`."
7576+
restrictions:
7577+
$ref: '#/components/schemas/EpisodeRestrictionObject'
75497578
resume_point:
75507579
$ref: '#/components/schemas/ResumePointObject'
75517580
type:

0 commit comments

Comments
 (0)