com.logmein.gotowebinar.api.PanelistsApi Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gotowebinar-api Show documentation
Show all versions of gotowebinar-api Show documentation
Java SDK for the GoToWebinar REST API
/*
* © 2017 LogMeIn, Inc. All Rights Reserved.
* All rights reserved.
*
* This software is distributed under the terms and conditions of the
* LogMeIn SDK License Agreement. Please see file LICENSE for details.
*
* Auto-generated file.
*/
package com.logmein.gotowebinar.api;
import com.logmein.gotowebinar.api.common.ApiException;
import com.logmein.gotowebinar.api.common.ApiInvoker;
import com.logmein.gotowebinar.api.model.CreatedPanelist;
import com.logmein.gotowebinar.api.model.Panelist;
import com.logmein.gotowebinar.api.model.PanelistReqCreate;
import com.sun.jersey.multipart.FormDataMultiPart;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class PanelistsApi {
private String basePath = "https://api.getgo.com/G2W/rest/v2";
private ApiInvoker apiInvoker = ApiInvoker.getInstance();
/**
* Initializes a new instance of the PanelistsApi class using the
* default endpoint base url for the services being accessed.
*/
public PanelistsApi() {
}
/**
* Initializes a new instance of the PanelistsApi class using an endpoint base
* url other than the default. Use this constructor only if you should need
* to override the default endpoint base url.
* @param basePath The endpoint base url for the services being accessed.
*/
public PanelistsApi(String basePath) {
this.basePath = basePath;
}
public ApiInvoker getInvoker() {
return apiInvoker;
}
public String getBasePath() {
return basePath;
}
/**
* Create Panelists
* Create panelists for a specified webinar
* @param authorization Access token
* @param organizerKey The key of the organizer
* @param webinarKey The key of the webinar
* @param body Array of panelists
* @return List<CreatedPanelist>
* @throws ApiException If the response status code is not Successful 2xx, or an error has occurred during parameter serialization or response deserialization
*/
public List createPanelists(String authorization, Long organizerKey, Long webinarKey, List body) throws ApiException {
Object postBody = body;
if(authorization == null) {
throw new ApiException("Required parameter authorization is null.");
}
if(organizerKey == null) {
throw new ApiException("Required parameter organizerKey is null.");
}
if(webinarKey == null) {
throw new ApiException("Required parameter webinarKey is null.");
}
if(body == null) {
throw new ApiException("Required parameter body is null.");
}
// create path and map variables
String path = "/organizers/{organizerKey}/webinars/{webinarKey}/panelists"
.replaceAll("\\{format\\}", "json")
.replaceAll("\\{" + "organizerKey" + "\\}", apiInvoker.escapeString(organizerKey.toString()))
.replaceAll("\\{" + "webinarKey" + "\\}", apiInvoker.escapeString(webinarKey.toString()));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
Map formParams = new HashMap();
headerParams.put("Authorization", authorization);
String[] contentTypes = {
"application/json"
};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
FormDataMultiPart mp = new FormDataMultiPart();
if(hasFields)
postBody = mp;
}
else {
}
String response = apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType);
if(response != null){
return (List) ApiInvoker.deserialize(response, "List", CreatedPanelist.class);
}
return null;
}
/**
* Delete webinar panelist
* Removes a webinar panelist.
* @param authorization Access token
* @param organizerKey The key of the organizer
* @param webinarKey The key of the webinar
* @param panelistKey The key of the webinar panelist
* @throws ApiException If the response status code is not Successful 2xx, or an error has occurred during parameter serialization or response deserialization
*/
public void deleteWebinarPanelist(String authorization, Long organizerKey, Long webinarKey, Long panelistKey) throws ApiException {
Object postBody = null;
if(authorization == null) {
throw new ApiException("Required parameter authorization is null.");
}
if(organizerKey == null) {
throw new ApiException("Required parameter organizerKey is null.");
}
if(webinarKey == null) {
throw new ApiException("Required parameter webinarKey is null.");
}
if(panelistKey == null) {
throw new ApiException("Required parameter panelistKey is null.");
}
// create path and map variables
String path = "/organizers/{organizerKey}/webinars/{webinarKey}/panelists/{panelistKey}"
.replaceAll("\\{format\\}", "json")
.replaceAll("\\{" + "organizerKey" + "\\}", apiInvoker.escapeString(organizerKey.toString()))
.replaceAll("\\{" + "webinarKey" + "\\}", apiInvoker.escapeString(webinarKey.toString()))
.replaceAll("\\{" + "panelistKey" + "\\}", apiInvoker.escapeString(panelistKey.toString()));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
Map formParams = new HashMap();
headerParams.put("Authorization", authorization);
String[] contentTypes = {
"application/json"
};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
FormDataMultiPart mp = new FormDataMultiPart();
if(hasFields)
postBody = mp;
}
else {
}
apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, postBody, headerParams, formParams, contentType);
}
/**
* Get webinar panelists
* Retrieves all the panelists for a specific webinar.
* @param authorization Access token
* @param organizerKey The key of the organizer
* @param webinarKey The key of the webinar
* @return List<Panelist>
* @throws ApiException If the response status code is not Successful 2xx, or an error has occurred during parameter serialization or response deserialization
*/
public List getPanelists(String authorization, Long organizerKey, Long webinarKey) throws ApiException {
Object postBody = null;
if(authorization == null) {
throw new ApiException("Required parameter authorization is null.");
}
if(organizerKey == null) {
throw new ApiException("Required parameter organizerKey is null.");
}
if(webinarKey == null) {
throw new ApiException("Required parameter webinarKey is null.");
}
// create path and map variables
String path = "/organizers/{organizerKey}/webinars/{webinarKey}/panelists"
.replaceAll("\\{format\\}", "json")
.replaceAll("\\{" + "organizerKey" + "\\}", apiInvoker.escapeString(organizerKey.toString()))
.replaceAll("\\{" + "webinarKey" + "\\}", apiInvoker.escapeString(webinarKey.toString()));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
Map formParams = new HashMap();
headerParams.put("Authorization", authorization);
String[] contentTypes = {
"application/json"
};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
FormDataMultiPart mp = new FormDataMultiPart();
if(hasFields)
postBody = mp;
}
else {
}
String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType);
if(response != null){
return (List) ApiInvoker.deserialize(response, "List", Panelist.class);
}
return null;
}
/**
* Resend panelist invitation
* Resend the panelist invitation email.
* @param authorization Access token
* @param organizerKey The key of the organizer
* @param webinarKey The key of the webinar
* @param panelistKey The key of the webinar panelist
* @throws ApiException If the response status code is not Successful 2xx, or an error has occurred during parameter serialization or response deserialization
*/
public void resendPanelistInvitation(String authorization, Long organizerKey, Long webinarKey, Long panelistKey) throws ApiException {
Object postBody = null;
if(authorization == null) {
throw new ApiException("Required parameter authorization is null.");
}
if(organizerKey == null) {
throw new ApiException("Required parameter organizerKey is null.");
}
if(webinarKey == null) {
throw new ApiException("Required parameter webinarKey is null.");
}
if(panelistKey == null) {
throw new ApiException("Required parameter panelistKey is null.");
}
// create path and map variables
String path = "/organizers/{organizerKey}/webinars/{webinarKey}/panelists/{panelistKey}/resendInvitation"
.replaceAll("\\{format\\}", "json")
.replaceAll("\\{" + "organizerKey" + "\\}", apiInvoker.escapeString(organizerKey.toString()))
.replaceAll("\\{" + "webinarKey" + "\\}", apiInvoker.escapeString(webinarKey.toString()))
.replaceAll("\\{" + "panelistKey" + "\\}", apiInvoker.escapeString(panelistKey.toString()));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
Map formParams = new HashMap();
headerParams.put("Authorization", authorization);
String[] contentTypes = {
"application/json"
};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
if(contentType.startsWith("multipart/form-data")) {
boolean hasFields = false;
FormDataMultiPart mp = new FormDataMultiPart();
if(hasFields)
postBody = mp;
}
else {
}
apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy