From da6b95edcfbcbbd9c20566300a42909692851789 Mon Sep 17 00:00:00 2001 From: Alex B <45384811+AB-xdev@users.noreply.github.com> Date: Thu, 19 Oct 2023 08:49:50 +0200 Subject: [PATCH 1/3] Added ``video_stream`` field Parameter is undocumented and not limited (between 6-9k chars server no longer responds) --- openapi/openapi.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/openapi/openapi.yml b/openapi/openapi.yml index ffb2696..996cde0 100644 --- a/openapi/openapi.yml +++ b/openapi/openapi.yml @@ -131,6 +131,12 @@ paths: enum: [ 'Y', 'N' ] maxLength: 1 description: 'Y = session is active, N = session is deactivated and hidden' + - name: video_stream + in: query + schema: + type: string + maxLength: 1024 + description: 'Livestream url (url is not validated!). Undocumented' - name: custom_fields in: query schema: @@ -251,6 +257,12 @@ paths: enum: [ 'Y', 'N' ] maxLength: 1 description: 'Y = session is active, N = session is deactivated and hidden' + - name: video_stream + in: query + schema: + type: string + maxLength: 1024 + description: 'Livestream url (url is not validated!). Undocumented' responses: '200': description: Returned if the request was processed - no matter if it was successful or not; OK when successful; other text-Responses usually indicate an error @@ -777,6 +789,9 @@ components: event_type_sort: type: string description: 'Numeric string' + video_stream: + type: string + description: 'Livestream url (url is not validated!). Undocumented' ExportSpeaker: type: object readOnly: true From bbdc069e21b1404af2243a5095ac37a59943de4c Mon Sep 17 00:00:00 2001 From: AB Date: Thu, 19 Oct 2023 08:53:41 +0200 Subject: [PATCH 2/3] Update code --- .../main/java/software/xdev/Application.java | 4 +- .../software/xdev/sched/api/SessionApi.java | 18 ++++--- .../xdev/sched/model/ExportSession.java | 48 +++++++++++++++++-- 3 files changed, 60 insertions(+), 10 deletions(-) diff --git a/sched-java-client-demo/src/main/java/software/xdev/Application.java b/sched-java-client-demo/src/main/java/software/xdev/Application.java index fe8b864..b624607 100644 --- a/sched-java-client-demo/src/main/java/software/xdev/Application.java +++ b/sched-java-client-demo/src/main/java/software/xdev/Application.java @@ -118,6 +118,7 @@ private static void checkSessionAPI(final CustomApiClient apiClient) null, null, "N", + null, Map.of("extra", "Joppiesauce") ); LOG.info(LOG_RESPONSE, addSessionResponse); @@ -138,7 +139,8 @@ private static void checkSessionAPI(final CustomApiClient apiClient) null, null, null, - "Y" + "Y", + null ); LOG.info(LOG_RESPONSE, modifySessionResponse); diff --git a/sched-java-client/src/generated/java/software/xdev/sched/api/SessionApi.java b/sched-java-client/src/generated/java/software/xdev/sched/api/SessionApi.java index e3d121c..4c672ec 100644 --- a/sched-java-client/src/generated/java/software/xdev/sched/api/SessionApi.java +++ b/sched-java-client/src/generated/java/software/xdev/sched/api/SessionApi.java @@ -71,12 +71,13 @@ public void setApiClient(ApiClient apiClient) { * @param rsvpUrl URL used for Custom Button (optional) * @param ticketMessage Custom ticket upgrade message, displayed when attendee attempts to add the session without the correct ticket (accepts basic HTML) (optional) * @param active Y = session is active, N = session is deactivated and hidden (optional) + * @param videoStream Livestream url (url is not validated!). Undocumented (optional) * @param customFields To add custom named fields, just add your field names and their values (optional) * @return String * @throws ApiException if fails to make API call */ - public String addSession(String sessionKey, String name, String sessionStart, String sessionEnd, String sessionType, String sessionSubtype, String description, URI mediaUrl, String venue, String address, String tags, String seats, URI rsvpUrl, String ticketMessage, String active, Object customFields) throws ApiException { - return this.addSession(sessionKey, name, sessionStart, sessionEnd, sessionType, sessionSubtype, description, mediaUrl, venue, address, tags, seats, rsvpUrl, ticketMessage, active, customFields, Collections.emptyMap()); + public String addSession(String sessionKey, String name, String sessionStart, String sessionEnd, String sessionType, String sessionSubtype, String description, URI mediaUrl, String venue, String address, String tags, String seats, URI rsvpUrl, String ticketMessage, String active, String videoStream, Object customFields) throws ApiException { + return this.addSession(sessionKey, name, sessionStart, sessionEnd, sessionType, sessionSubtype, description, mediaUrl, venue, address, tags, seats, rsvpUrl, ticketMessage, active, videoStream, customFields, Collections.emptyMap()); } @@ -98,12 +99,13 @@ public String addSession(String sessionKey, String name, String sessionStart, St * @param rsvpUrl URL used for Custom Button (optional) * @param ticketMessage Custom ticket upgrade message, displayed when attendee attempts to add the session without the correct ticket (accepts basic HTML) (optional) * @param active Y = session is active, N = session is deactivated and hidden (optional) + * @param videoStream Livestream url (url is not validated!). Undocumented (optional) * @param customFields To add custom named fields, just add your field names and their values (optional) * @param additionalHeaders additionalHeaders for this call * @return String * @throws ApiException if fails to make API call */ - public String addSession(String sessionKey, String name, String sessionStart, String sessionEnd, String sessionType, String sessionSubtype, String description, URI mediaUrl, String venue, String address, String tags, String seats, URI rsvpUrl, String ticketMessage, String active, Object customFields, Map additionalHeaders) throws ApiException { + public String addSession(String sessionKey, String name, String sessionStart, String sessionEnd, String sessionType, String sessionSubtype, String description, URI mediaUrl, String venue, String address, String tags, String seats, URI rsvpUrl, String ticketMessage, String active, String videoStream, Object customFields, Map additionalHeaders) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'sessionKey' is set @@ -157,6 +159,7 @@ public String addSession(String sessionKey, String name, String sessionStart, St localVarQueryParams.addAll(apiClient.parameterToPair("rsvp_url", rsvpUrl)); localVarQueryParams.addAll(apiClient.parameterToPair("ticket_message", ticketMessage)); localVarQueryParams.addAll(apiClient.parameterToPair("active", active)); + localVarQueryParams.addAll(apiClient.parameterToPair("video_stream", videoStream)); localVarQueryParams.addAll(apiClient.parameterToPair("custom_fields", customFields)); localVarHeaderParams.putAll(additionalHeaders); @@ -453,11 +456,12 @@ public List listSessions(Integer since, String format, String status, S * @param rsvpUrl URL used for Custom Button (optional) * @param ticketMessage Custom ticket upgrade message, displayed when attendee attempts to add the session without the correct ticket (accepts basic HTML) (optional) * @param active Y = session is active, N = session is deactivated and hidden (optional) + * @param videoStream Livestream url (url is not validated!). Undocumented (optional) * @return String * @throws ApiException if fails to make API call */ - public String modifySession(String sessionKey, String name, String sessionStart, String sessionEnd, String sessionType, String sessionSubtype, String description, URI mediaUrl, String venue, String address, String tags, String seats, URI rsvpUrl, String ticketMessage, String active) throws ApiException { - return this.modifySession(sessionKey, name, sessionStart, sessionEnd, sessionType, sessionSubtype, description, mediaUrl, venue, address, tags, seats, rsvpUrl, ticketMessage, active, Collections.emptyMap()); + public String modifySession(String sessionKey, String name, String sessionStart, String sessionEnd, String sessionType, String sessionSubtype, String description, URI mediaUrl, String venue, String address, String tags, String seats, URI rsvpUrl, String ticketMessage, String active, String videoStream) throws ApiException { + return this.modifySession(sessionKey, name, sessionStart, sessionEnd, sessionType, sessionSubtype, description, mediaUrl, venue, address, tags, seats, rsvpUrl, ticketMessage, active, videoStream, Collections.emptyMap()); } @@ -479,11 +483,12 @@ public String modifySession(String sessionKey, String name, String sessionStart, * @param rsvpUrl URL used for Custom Button (optional) * @param ticketMessage Custom ticket upgrade message, displayed when attendee attempts to add the session without the correct ticket (accepts basic HTML) (optional) * @param active Y = session is active, N = session is deactivated and hidden (optional) + * @param videoStream Livestream url (url is not validated!). Undocumented (optional) * @param additionalHeaders additionalHeaders for this call * @return String * @throws ApiException if fails to make API call */ - public String modifySession(String sessionKey, String name, String sessionStart, String sessionEnd, String sessionType, String sessionSubtype, String description, URI mediaUrl, String venue, String address, String tags, String seats, URI rsvpUrl, String ticketMessage, String active, Map additionalHeaders) throws ApiException { + public String modifySession(String sessionKey, String name, String sessionStart, String sessionEnd, String sessionType, String sessionSubtype, String description, URI mediaUrl, String venue, String address, String tags, String seats, URI rsvpUrl, String ticketMessage, String active, String videoStream, Map additionalHeaders) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'sessionKey' is set @@ -517,6 +522,7 @@ public String modifySession(String sessionKey, String name, String sessionStart, localVarQueryParams.addAll(apiClient.parameterToPair("rsvp_url", rsvpUrl)); localVarQueryParams.addAll(apiClient.parameterToPair("ticket_message", ticketMessage)); localVarQueryParams.addAll(apiClient.parameterToPair("active", active)); + localVarQueryParams.addAll(apiClient.parameterToPair("video_stream", videoStream)); localVarHeaderParams.putAll(additionalHeaders); diff --git a/sched-java-client/src/generated/java/software/xdev/sched/model/ExportSession.java b/sched-java-client/src/generated/java/software/xdev/sched/model/ExportSession.java index 354f873..fddc78a 100644 --- a/sched-java-client/src/generated/java/software/xdev/sched/model/ExportSession.java +++ b/sched-java-client/src/generated/java/software/xdev/sched/model/ExportSession.java @@ -48,7 +48,8 @@ ExportSession.JSON_PROPERTY_ID, ExportSession.JSON_PROPERTY_VENUE_ID, ExportSession.JSON_PROPERTY_SPEAKERS, - ExportSession.JSON_PROPERTY_EVENT_TYPE_SORT + ExportSession.JSON_PROPERTY_EVENT_TYPE_SORT, + ExportSession.JSON_PROPERTY_VIDEO_STREAM }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ExportSession { @@ -202,6 +203,9 @@ public static InviteOnlyEnum fromValue(String value) { public static final String JSON_PROPERTY_EVENT_TYPE_SORT = "event_type_sort"; private String eventTypeSort; + public static final String JSON_PROPERTY_VIDEO_STREAM = "video_stream"; + private String videoStream; + public ExportSession() { } @@ -602,6 +606,32 @@ public void setEventTypeSort(String eventTypeSort) { this.eventTypeSort = eventTypeSort; } + + public ExportSession videoStream(String videoStream) { + + this.videoStream = videoStream; + return this; + } + + /** + * Livestream url (url is not validated!). Undocumented + * @return videoStream + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VIDEO_STREAM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getVideoStream() { + return videoStream; + } + + + @JsonProperty(JSON_PROPERTY_VIDEO_STREAM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setVideoStream(String videoStream) { + this.videoStream = videoStream; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -625,12 +655,13 @@ public boolean equals(Object o) { Objects.equals(this.id, exportSession.id) && Objects.equals(this.venueId, exportSession.venueId) && Objects.equals(this.speakers, exportSession.speakers) && - Objects.equals(this.eventTypeSort, exportSession.eventTypeSort); + Objects.equals(this.eventTypeSort, exportSession.eventTypeSort) && + Objects.equals(this.videoStream, exportSession.videoStream); } @Override public int hashCode() { - return Objects.hash(eventKey, active, pinned, name, eventStart, eventEnd, eventType, seats, goers, inviteOnly, venue, id, venueId, speakers, eventTypeSort); + return Objects.hash(eventKey, active, pinned, name, eventStart, eventEnd, eventType, seats, goers, inviteOnly, venue, id, venueId, speakers, eventTypeSort, videoStream); } @Override @@ -652,6 +683,7 @@ public String toString() { sb.append(" venueId: ").append(toIndentedString(venueId)).append("\n"); sb.append(" speakers: ").append(toIndentedString(speakers)).append("\n"); sb.append(" eventTypeSort: ").append(toIndentedString(eventTypeSort)).append("\n"); + sb.append(" videoStream: ").append(toIndentedString(videoStream)).append("\n"); sb.append("}"); return sb.toString(); } @@ -849,6 +881,16 @@ public String toUrlQueryString(String prefix) { } } + // add `video_stream` to the URL query string + if (getVideoStream() != null) { + try { + joiner.add(String.format("%svideo_stream%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getVideoStream()), "UTF-8").replaceAll("\\+", "%20"))); + } catch (UnsupportedEncodingException e) { + // Should never happen, UTF-8 is always supported + throw new RuntimeException(e); + } + } + return joiner.toString(); } From 78817ef48cb3de973b6aa5d42f998ea5de25e428 Mon Sep 17 00:00:00 2001 From: AB Date: Thu, 19 Oct 2023 08:55:49 +0200 Subject: [PATCH 3/3] Bump version, add changelog --- CHANGELOG.md | 6 ++++++ pom.xml | 2 +- sched-java-client-demo/pom.xml | 2 +- sched-java-client/pom.xml | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28d57f8..e39e828 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 1.1.0 +* Add undocumented ``video_stream`` field for sessions.
Affected endpoints are: + * ``/session/add`` + * ``/session/mod`` + * ``/session/export`` + # 1.0.2 * Add all available fields to model returned by ``/user/list`` * Updated dependencies diff --git a/pom.xml b/pom.xml index 9b2f0f3..19def94 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.xdev-software sched-java-client-root - 1.0.3-SNAPSHOT + 1.1.0-SNAPSHOT pom diff --git a/sched-java-client-demo/pom.xml b/sched-java-client-demo/pom.xml index 65fe0ff..9257039 100644 --- a/sched-java-client-demo/pom.xml +++ b/sched-java-client-demo/pom.xml @@ -6,7 +6,7 @@ com.xdev-software sched-java-client-demo - 1.0.3-SNAPSHOT + 1.1.0-SNAPSHOT jar 2022 diff --git a/sched-java-client/pom.xml b/sched-java-client/pom.xml index 20b33d0..4778b40 100644 --- a/sched-java-client/pom.xml +++ b/sched-java-client/pom.xml @@ -6,7 +6,7 @@ com.xdev-software sched-java-client - 1.0.3-SNAPSHOT + 1.1.0-SNAPSHOT jar sched-java-client