diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2bcd23e..8e6aebc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+# 1.1.0
+* Added new endpoint:
+ * ``/view/SpeakerEmails`` (undocumented)
+
# 1.0.1
* Shrunk generated code a bit
* Updated openapi generator
diff --git a/README.md b/README.md
index 620ba54..611abcd 100644
--- a/README.md
+++ b/README.md
@@ -8,10 +8,18 @@ Java client for the [Sessionize API](https://sessionize.com/playbook/api)
This client [is generated](./sessionize-java-client/pom.xml) from an [``openapi.yml``](./openapi/openapi.yml) using [OpenAPI Generator](https://openapi-generator.tech/).
-Currently this client supports the following endpoints of the Sessionize API ``v2``:
-* ``/view/All``
-* ``/view/Speakers``
-* ``/view/Sessions``
+#### API Support Status
+
+Supported endpoints
+
+Sessionize API ``v2``:
+* ``view``
+ * All ✔️
+ * Speakers ✔️
+ * SpeakerEmails ✔️ (undocumented endpoint)
+ * Sessions ✔️
+
+
## Installation
[Installation guide for the latest release](https://github.com/xdev-software/sessionize-java-client/releases/latest#Installation)
diff --git a/openapi/openapi.yml b/openapi/openapi.yml
index 0df97ac..4bca7c9 100644
--- a/openapi/openapi.yml
+++ b/openapi/openapi.yml
@@ -58,6 +58,35 @@ paths:
items:
$ref: '#/components/schemas/Speaker'
deprecated: false
+ /api/v2/{endpointId}/view/SpeakersEmails:
+ get:
+ tags:
+ - "speakers"
+ operationId: getAllSpeakersEmails
+ description: 'Undocumented endpoint for retrieving the speakers with emails'
+ parameters:
+ - name: endpointId
+ in: path
+ required: true
+ schema:
+ type: string
+ example: jl4ktls0
+ - name: s
+ in: query
+ required: true
+ schema:
+ type: string
+ description: 'Special key that is only available/retrievable for unlocked admins (Contacting Sessionize-Support is required)'
+ responses:
+ '200':
+ description: Returned if the request is successful
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/SpeakerWithEmail'
+ deprecated: false
/api/v2/{endpointId}/view/Sessions:
get:
tags:
@@ -341,7 +370,7 @@ components:
required:
- id
- name
- BaseSpeaker:
+ BaseSpeakerEssential:
type: object
readOnly: true
properties:
@@ -352,34 +381,41 @@ components:
type: string
lastName:
type: string
- bio:
- type: string
- nullable: true
- tagLine:
- type: string
- nullable: true
- profilePicture:
- type: string
- format: uri
- nullable: true
- isTopSpeaker:
- type: boolean
- links:
- type: array
- items:
- $ref: '#/components/schemas/Link'
- fullName:
- type: string
- # categoryItems - Always empty; ignored
- # questionAnswers - Always empty; ignored
required:
- firstName
- - fullName
- id
- - isTopSpeaker
- lastName
- - links
- - tagLine
+ BaseSpeaker:
+ allOf:
+ - $ref: '#/components/schemas/BaseSpeakerEssential'
+ - type: object
+ readOnly: true
+ properties:
+ bio:
+ type: string
+ nullable: true
+ tagLine:
+ type: string
+ nullable: true
+ profilePicture:
+ type: string
+ format: uri
+ nullable: true
+ isTopSpeaker:
+ type: boolean
+ links:
+ type: array
+ items:
+ $ref: '#/components/schemas/Link'
+ fullName:
+ type: string
+ # categoryItems - Always empty; ignored
+ # questionAnswers - Always empty; ignored
+ required:
+ - fullName
+ - isTopSpeaker
+ - links
+ - tagLine
Speaker:
allOf:
- $ref: '#/components/schemas/BaseSpeaker'
@@ -404,6 +440,17 @@ components:
type: integer # All Endpoint
required:
- sessions
+ SpeakerWithEmail:
+ allOf:
+ - $ref: '#/components/schemas/BaseSpeakerEssential'
+ - type: object
+ readOnly: true
+ properties:
+ email:
+ type: string
+ format: email
+ required:
+ - email
SpeakerMinimal:
type: object
readOnly: true
diff --git a/pom.xml b/pom.xml
index da8a0f9..2677bd0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
com.xdev-software
sessionize-java-client-root
- 1.0.2-SNAPSHOT
+ 1.1.0-SNAPSHOT
pom
diff --git a/sessionize-java-client-demo/pom.xml b/sessionize-java-client-demo/pom.xml
index 4dd6325..71f55cf 100644
--- a/sessionize-java-client-demo/pom.xml
+++ b/sessionize-java-client-demo/pom.xml
@@ -6,7 +6,7 @@
com.xdev-software
sessionize-java-client-demo
- 1.0.2-SNAPSHOT
+ 1.1.0-SNAPSHOT
jar
2023
diff --git a/sessionize-java-client/pom.xml b/sessionize-java-client/pom.xml
index 9ff47fc..fbdefca 100644
--- a/sessionize-java-client/pom.xml
+++ b/sessionize-java-client/pom.xml
@@ -6,7 +6,7 @@
com.xdev-software
sessionize-java-client
- 1.0.2-SNAPSHOT
+ 1.1.0-SNAPSHOT
jar
sessionize-java-client
diff --git a/sessionize-java-client/src/generated/java/software/xdev/sessionize/api/SpeakersApi.java b/sessionize-java-client/src/generated/java/software/xdev/sessionize/api/SpeakersApi.java
index c3009c2..720a4dd 100644
--- a/sessionize-java-client/src/generated/java/software/xdev/sessionize/api/SpeakersApi.java
+++ b/sessionize-java-client/src/generated/java/software/xdev/sessionize/api/SpeakersApi.java
@@ -20,6 +20,7 @@
import software.xdev.sessionize.client.Pair;
import software.xdev.sessionize.model.Speaker;
+import software.xdev.sessionize.model.SpeakerWithEmail;
import java.util.ArrayList;
@@ -126,4 +127,87 @@ public List getAllSpeakers(String endpointId, Map addit
);
}
+ /**
+ *
+ * Undocumented endpoint for retrieving the speakers with emails
+ * @param endpointId (required)
+ * @param s Special key that is only available/retrievable for unlocked admins (Contacting Sessionize-Support is required) (required)
+ * @return List<SpeakerWithEmail>
+ * @throws ApiException if fails to make API call
+ */
+ public List getAllSpeakersEmails(String endpointId, String s) throws ApiException {
+ return this.getAllSpeakersEmails(endpointId, s, Collections.emptyMap());
+ }
+
+
+ /**
+ *
+ * Undocumented endpoint for retrieving the speakers with emails
+ * @param endpointId (required)
+ * @param s Special key that is only available/retrievable for unlocked admins (Contacting Sessionize-Support is required) (required)
+ * @param additionalHeaders additionalHeaders for this call
+ * @return List<SpeakerWithEmail>
+ * @throws ApiException if fails to make API call
+ */
+ public List getAllSpeakersEmails(String endpointId, String s, Map additionalHeaders) throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'endpointId' is set
+ if (endpointId == null) {
+ throw new ApiException(400, "Missing the required parameter 'endpointId' when calling getAllSpeakersEmails");
+ }
+
+ // verify the required parameter 's' is set
+ if (s == null) {
+ throw new ApiException(400, "Missing the required parameter 's' when calling getAllSpeakersEmails");
+ }
+
+ // create path and map variables
+ String localVarPath = "/api/v2/{endpointId}/view/SpeakersEmails"
+ .replaceAll("\\{" + "endpointId" + "\\}", apiClient.escapeString(endpointId.toString()));
+
+ StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
+ String localVarQueryParameterBaseName;
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ localVarQueryParams.addAll(apiClient.parameterToPair("s", s));
+
+ localVarHeaderParams.putAll(additionalHeaders);
+
+
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ String[] localVarAuthNames = new String[] { };
+
+ TypeReference> localVarReturnType = new TypeReference>() {};
+ return apiClient.invokeAPI(
+ localVarPath,
+ "GET",
+ localVarQueryParams,
+ localVarCollectionQueryParams,
+ localVarQueryStringJoiner.toString(),
+ localVarPostBody,
+ localVarHeaderParams,
+ localVarCookieParams,
+ localVarFormParams,
+ localVarAccept,
+ localVarContentType,
+ localVarAuthNames,
+ localVarReturnType
+ );
+ }
+
}
diff --git a/sessionize-java-client/src/generated/java/software/xdev/sessionize/model/BaseSpeakerEssential.java b/sessionize-java-client/src/generated/java/software/xdev/sessionize/model/BaseSpeakerEssential.java
new file mode 100644
index 0000000..babae7d
--- /dev/null
+++ b/sessionize-java-client/src/generated/java/software/xdev/sessionize/model/BaseSpeakerEssential.java
@@ -0,0 +1,236 @@
+/*
+ * Sessionize JSON-REST API
+ * Sessionize JSON-REST API documentation by XDEV Software
+ *
+ * The version of the OpenAPI document: 2.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package software.xdev.sessionize.model;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.util.UUID;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.StringJoiner;
+
+/**
+ * BaseSpeakerEssential
+ */
+@JsonPropertyOrder({
+ BaseSpeakerEssential.JSON_PROPERTY_ID,
+ BaseSpeakerEssential.JSON_PROPERTY_FIRST_NAME,
+ BaseSpeakerEssential.JSON_PROPERTY_LAST_NAME
+})
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class BaseSpeakerEssential {
+ public static final String JSON_PROPERTY_ID = "id";
+ private UUID id;
+
+ public static final String JSON_PROPERTY_FIRST_NAME = "firstName";
+ private String firstName;
+
+ public static final String JSON_PROPERTY_LAST_NAME = "lastName";
+ private String lastName;
+
+ public BaseSpeakerEssential() {
+ }
+
+ public BaseSpeakerEssential id(UUID id) {
+
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get id
+ * @return id
+ **/
+ @jakarta.annotation.Nonnull
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+
+ public UUID getId() {
+ return id;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public void setId(UUID id) {
+ this.id = id;
+ }
+
+
+ public BaseSpeakerEssential firstName(String firstName) {
+
+ this.firstName = firstName;
+ return this;
+ }
+
+ /**
+ * Get firstName
+ * @return firstName
+ **/
+ @jakarta.annotation.Nonnull
+ @JsonProperty(JSON_PROPERTY_FIRST_NAME)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_FIRST_NAME)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+
+ public BaseSpeakerEssential lastName(String lastName) {
+
+ this.lastName = lastName;
+ return this;
+ }
+
+ /**
+ * Get lastName
+ * @return lastName
+ **/
+ @jakarta.annotation.Nonnull
+ @JsonProperty(JSON_PROPERTY_LAST_NAME)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+
+ public String getLastName() {
+ return lastName;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_LAST_NAME)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ BaseSpeakerEssential baseSpeakerEssential = (BaseSpeakerEssential) o;
+ return Objects.equals(this.id, baseSpeakerEssential.id) &&
+ Objects.equals(this.firstName, baseSpeakerEssential.firstName) &&
+ Objects.equals(this.lastName, baseSpeakerEssential.lastName);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, firstName, lastName);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class BaseSpeakerEssential {\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n");
+ sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ /**
+ * Convert the instance into URL query string.
+ *
+ * @return URL query string
+ */
+ public String toUrlQueryString() {
+ return toUrlQueryString(null);
+ }
+
+ /**
+ * Convert the instance into URL query string.
+ *
+ * @param prefix prefix of the query string
+ * @return URL query string
+ */
+ public String toUrlQueryString(String prefix) {
+ String suffix = "";
+ String containerSuffix = "";
+ String containerPrefix = "";
+ if (prefix == null) {
+ // style=form, explode=true, e.g. /pet?name=cat&type=manx
+ prefix = "";
+ } else {
+ // deepObject style e.g. /pet?id[name]=cat&id[type]=manx
+ prefix = prefix + "[";
+ suffix = "]";
+ containerSuffix = "]";
+ containerPrefix = "[";
+ }
+
+ StringJoiner joiner = new StringJoiner("&");
+
+ // add `id` to the URL query string
+ if (getId() != null) {
+ try {
+ joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), "UTF-8").replaceAll("\\+", "%20")));
+ } catch (UnsupportedEncodingException e) {
+ // Should never happen, UTF-8 is always supported
+ throw new RuntimeException(e);
+ }
+ }
+
+ // add `firstName` to the URL query string
+ if (getFirstName() != null) {
+ try {
+ joiner.add(String.format("%sfirstName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getFirstName()), "UTF-8").replaceAll("\\+", "%20")));
+ } catch (UnsupportedEncodingException e) {
+ // Should never happen, UTF-8 is always supported
+ throw new RuntimeException(e);
+ }
+ }
+
+ // add `lastName` to the URL query string
+ if (getLastName() != null) {
+ try {
+ joiner.add(String.format("%slastName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getLastName()), "UTF-8").replaceAll("\\+", "%20")));
+ } catch (UnsupportedEncodingException e) {
+ // Should never happen, UTF-8 is always supported
+ throw new RuntimeException(e);
+ }
+ }
+
+ return joiner.toString();
+ }
+
+}
+
diff --git a/sessionize-java-client/src/generated/java/software/xdev/sessionize/model/SpeakerWithEmail.java b/sessionize-java-client/src/generated/java/software/xdev/sessionize/model/SpeakerWithEmail.java
new file mode 100644
index 0000000..1ba9f14
--- /dev/null
+++ b/sessionize-java-client/src/generated/java/software/xdev/sessionize/model/SpeakerWithEmail.java
@@ -0,0 +1,278 @@
+/*
+ * Sessionize JSON-REST API
+ * Sessionize JSON-REST API documentation by XDEV Software
+ *
+ * The version of the OpenAPI document: 2.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package software.xdev.sessionize.model;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.util.UUID;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.StringJoiner;
+
+/**
+ * SpeakerWithEmail
+ */
+@JsonPropertyOrder({
+ SpeakerWithEmail.JSON_PROPERTY_ID,
+ SpeakerWithEmail.JSON_PROPERTY_FIRST_NAME,
+ SpeakerWithEmail.JSON_PROPERTY_LAST_NAME,
+ SpeakerWithEmail.JSON_PROPERTY_EMAIL
+})
+@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class SpeakerWithEmail {
+ public static final String JSON_PROPERTY_ID = "id";
+ private UUID id;
+
+ public static final String JSON_PROPERTY_FIRST_NAME = "firstName";
+ private String firstName;
+
+ public static final String JSON_PROPERTY_LAST_NAME = "lastName";
+ private String lastName;
+
+ public static final String JSON_PROPERTY_EMAIL = "email";
+ private String email;
+
+ public SpeakerWithEmail() {
+ }
+
+ public SpeakerWithEmail id(UUID id) {
+
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get id
+ * @return id
+ **/
+ @jakarta.annotation.Nonnull
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+
+ public UUID getId() {
+ return id;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public void setId(UUID id) {
+ this.id = id;
+ }
+
+
+ public SpeakerWithEmail firstName(String firstName) {
+
+ this.firstName = firstName;
+ return this;
+ }
+
+ /**
+ * Get firstName
+ * @return firstName
+ **/
+ @jakarta.annotation.Nonnull
+ @JsonProperty(JSON_PROPERTY_FIRST_NAME)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_FIRST_NAME)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+
+ public SpeakerWithEmail lastName(String lastName) {
+
+ this.lastName = lastName;
+ return this;
+ }
+
+ /**
+ * Get lastName
+ * @return lastName
+ **/
+ @jakarta.annotation.Nonnull
+ @JsonProperty(JSON_PROPERTY_LAST_NAME)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+
+ public String getLastName() {
+ return lastName;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_LAST_NAME)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+
+ public SpeakerWithEmail email(String email) {
+
+ this.email = email;
+ return this;
+ }
+
+ /**
+ * Get email
+ * @return email
+ **/
+ @jakarta.annotation.Nonnull
+ @JsonProperty(JSON_PROPERTY_EMAIL)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+
+ public String getEmail() {
+ return email;
+ }
+
+
+ @JsonProperty(JSON_PROPERTY_EMAIL)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ SpeakerWithEmail speakerWithEmail = (SpeakerWithEmail) o;
+ return Objects.equals(this.id, speakerWithEmail.id) &&
+ Objects.equals(this.firstName, speakerWithEmail.firstName) &&
+ Objects.equals(this.lastName, speakerWithEmail.lastName) &&
+ Objects.equals(this.email, speakerWithEmail.email);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, firstName, lastName, email);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class SpeakerWithEmail {\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n");
+ sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n");
+ sb.append(" email: ").append(toIndentedString(email)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ /**
+ * Convert the instance into URL query string.
+ *
+ * @return URL query string
+ */
+ public String toUrlQueryString() {
+ return toUrlQueryString(null);
+ }
+
+ /**
+ * Convert the instance into URL query string.
+ *
+ * @param prefix prefix of the query string
+ * @return URL query string
+ */
+ public String toUrlQueryString(String prefix) {
+ String suffix = "";
+ String containerSuffix = "";
+ String containerPrefix = "";
+ if (prefix == null) {
+ // style=form, explode=true, e.g. /pet?name=cat&type=manx
+ prefix = "";
+ } else {
+ // deepObject style e.g. /pet?id[name]=cat&id[type]=manx
+ prefix = prefix + "[";
+ suffix = "]";
+ containerSuffix = "]";
+ containerPrefix = "[";
+ }
+
+ StringJoiner joiner = new StringJoiner("&");
+
+ // add `id` to the URL query string
+ if (getId() != null) {
+ try {
+ joiner.add(String.format("%sid%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getId()), "UTF-8").replaceAll("\\+", "%20")));
+ } catch (UnsupportedEncodingException e) {
+ // Should never happen, UTF-8 is always supported
+ throw new RuntimeException(e);
+ }
+ }
+
+ // add `firstName` to the URL query string
+ if (getFirstName() != null) {
+ try {
+ joiner.add(String.format("%sfirstName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getFirstName()), "UTF-8").replaceAll("\\+", "%20")));
+ } catch (UnsupportedEncodingException e) {
+ // Should never happen, UTF-8 is always supported
+ throw new RuntimeException(e);
+ }
+ }
+
+ // add `lastName` to the URL query string
+ if (getLastName() != null) {
+ try {
+ joiner.add(String.format("%slastName%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getLastName()), "UTF-8").replaceAll("\\+", "%20")));
+ } catch (UnsupportedEncodingException e) {
+ // Should never happen, UTF-8 is always supported
+ throw new RuntimeException(e);
+ }
+ }
+
+ // add `email` to the URL query string
+ if (getEmail() != null) {
+ try {
+ joiner.add(String.format("%semail%s=%s", prefix, suffix, URLEncoder.encode(String.valueOf(getEmail()), "UTF-8").replaceAll("\\+", "%20")));
+ } catch (UnsupportedEncodingException e) {
+ // Should never happen, UTF-8 is always supported
+ throw new RuntimeException(e);
+ }
+ }
+
+ return joiner.toString();
+ }
+
+}
+