All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.logmein.gotomeeting.api.OrganizersApi Maven / Gradle / Ivy

The newest version!
/*
 * © 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.gotomeeting.api;

import com.logmein.gotomeeting.api.common.ApiException;
import com.logmein.gotomeeting.api.common.ApiInvoker;
import com.logmein.gotomeeting.api.common.JsonUtil;
import com.logmein.gotomeeting.api.model.AttendeeByOrganizer;
import com.logmein.gotomeeting.api.model.HistoricalMeeting;
import com.logmein.gotomeeting.api.model.MeetingByOrganizer;
import com.logmein.gotomeeting.api.model.Organizer;
import com.logmein.gotomeeting.api.model.OrganizerReq;
import com.logmein.gotomeeting.api.model.OrganizerShort;
import com.logmein.gotomeeting.api.model.OrganizerStatus;
import com.logmein.gotomeeting.api.model.UpcomingMeeting;
import com.sun.jersey.multipart.FormDataMultiPart;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class OrganizersApi {

    private String basePath = "https://api.getgo.com/G2M/rest";
    private ApiInvoker apiInvoker = ApiInvoker.getInstance();

    /**
     * Initializes a new instance of the OrganizersApi class using the
     * default endpoint base url for the services being accessed.
     */
    public OrganizersApi() {
    }

    /**
     * Initializes a new instance of the OrganizersApi 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 OrganizersApi(String basePath) {
        this.basePath = basePath;
    }

    public ApiInvoker getInvoker() {
        return apiInvoker;
    }
  
    public String getBasePath() {
        return basePath;
    }

    /**
     * Create organizer
     * Creates a new organizer and sends an email to the email address defined in the request. This API call is only available to users with the admin role. You may also pass 'G2W' or 'G2T' or 'OPENVOICE' as productType variables, creating organizers for those products. A G2W or G2T organizer will also have access to G2M.
     * @param authorization Access token
     * @param body The details of the organizer to be created
     * @return List<OrganizerShort>
     * @throws ApiException If the response status code is not Successful 2xx, or an error has occurred during parameter serialization or response deserialization
     */
    public List createOrganizer(String authorization, OrganizerReq body) throws ApiException {

        Object postBody = body;

        if(authorization == null) {
            throw new ApiException("Required parameter authorization is null.");
        }

        if(body == null) {
            throw new ApiException("Required parameter body is null.");
        }

        // create path and map variables
        String path = "/organizers"
                .replaceAll("\\{format\\}", "json");

        // 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", OrganizerShort.class);
        }
        return null;
    }

    /**
     * Delete organizer
     * Deletes the individual organizer specified by the organizer key. This API call is only available to users with the admin role.
     * @param authorization Access token
     * @param organizerKey The key of the organizer
     * @throws ApiException If the response status code is not Successful 2xx, or an error has occurred during parameter serialization or response deserialization
     */
    public void deleteOrganizer(String authorization, Long organizerKey) 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.");
        }

        // create path and map variables
        String path = "/organizers/{organizerKey}"
                .replaceAll("\\{format\\}", "json")
                .replaceAll("\\{" + "organizerKey" + "\\}", apiInvoker.escapeString(organizerKey.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);
    }

    /**
     * Delete organizer by email
     * Deletes the individual organizer specified by the email address. This API call is only available to users with the admin role.
     * @param authorization Access token
     * @param email The email address of the organizer
     * @throws ApiException If the response status code is not Successful 2xx, or an error has occurred during parameter serialization or response deserialization
     */
    public void deleteOrganizerByEmail(String authorization, String email) throws ApiException {

        Object postBody = null;

        if(authorization == null) {
            throw new ApiException("Required parameter authorization is null.");
        }

        if(email == null) {
            throw new ApiException("Required parameter email is null.");
        }

        // create path and map variables
        String path = "/organizers"
                .replaceAll("\\{format\\}", "json");

        // query params
        Map queryParams = new HashMap();
        Map headerParams = new HashMap();
        Map formParams = new HashMap();

        String emailString = JsonUtil.Stringify(email);
        if(!"null".equals(emailString)){
            queryParams.put("email", emailString);
        }

        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);
    }

    /**
     * Remove attendee list of a meeting session
     * Use this call to clean up your data by deleting the attendee list for a specific session. The sessionID(s) and the number of attendees at each session is included by meeting in the Get Historical Meetings call. Each meeting held is at least one session. One meeting may be multiple sessions if the organizer stopped and restarted the meeting for any reason, such as their device of choice did not work. Recurring meetings are at least one session per event. The call removes the attendee list from the session from LogMeIn's servers. You can remove the entire session data using the Delete Session call, or delete recordings of the meeting using the Delete Session Recordings call. The meeting will still appear in your organizer's Meeting History, but will have no associated attendees. NOTE: The delete occurs at the session level because this provides the greatest granular control. To delete for a specific meetingID, you would need to accumualate all sessions for the meeting and apply the delete.
     * @param authorization Access token
     * @param organizerKey The organizer ID
     * @param sessionId The session ID
     * @throws ApiException If the response status code is not Successful 2xx, or an error has occurred during parameter serialization or response deserialization
     */
    public void deleteSessionAttendeesById(String authorization, Long organizerKey, Long sessionId) 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(sessionId == null) {
            throw new ApiException("Required parameter sessionId is null.");
        }

        // create path and map variables
        String path = "/organizers/{organizerKey}/sessions/{sessionId}/attendees"
                .replaceAll("\\{format\\}", "json")
                .replaceAll("\\{" + "organizerKey" + "\\}", apiInvoker.escapeString(organizerKey.toString()))
                .replaceAll("\\{" + "sessionId" + "\\}", apiInvoker.escapeString(sessionId.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);
    }

    /**
     * Delete meeting session by session id
     * Use this call to clean up your data by deleting any specific session. The sessionID(s) are included by meeting in the Get Historical Meetings call. Each meeting held is at least one session. One meeting may be multiple sessions if the organizer stopped and restarted the meeting for any reason, such as their device of choice did not work. Recurring meetings are at least one session per event. The call removes the specified session(s) from LogMeIn's servers including the sessionID, the attendee list, and any recordings. The meeting will still appear in your organizer's Meeting History, but will have no associated sessions. NOTE: The delete occurs at the session level because this provides the greatest granular control. To delete for a specific meetingID, you would need to accumualate all sessions for the meeting and apply the delete.
     * @param authorization Access token
     * @param organizerKey The organizer ID
     * @param sessionId The session ID
     * @throws ApiException If the response status code is not Successful 2xx, or an error has occurred during parameter serialization or response deserialization
     */
    public void deleteSessionById(String authorization, Long organizerKey, Long sessionId) 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(sessionId == null) {
            throw new ApiException("Required parameter sessionId is null.");
        }

        // create path and map variables
        String path = "/organizers/{organizerKey}/sessions/{sessionId}"
                .replaceAll("\\{format\\}", "json")
                .replaceAll("\\{" + "organizerKey" + "\\}", apiInvoker.escapeString(organizerKey.toString()))
                .replaceAll("\\{" + "sessionId" + "\\}", apiInvoker.escapeString(sessionId.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);
    }

    /**
     * Delete recordings of a meeting session
     * Use this call to clean up your data by deleting recordings associated with a specific session. The sessionID(s) are included by meeting in the Get Historical Meetings call. The call removes any recordings associated with the specified session from LogMeIn's servers. (Any session may have multiple recordings if the feature was started and stopped multiple times during the meeting.) You can remove the entire session data using the Delete Session call, or delete attendee lists for the session using the Delete Session Attendees call. The meeting will still appear in your organizer's Meeting History, but will have no associated recordings for the specified session. NOTE: The delete occurs at the session level because this provides the greatest granular control. To delete for a specific meetingID, you would need to accumualate all sessions for the meeting and apply the delete.
     * @param authorization Access token
     * @param organizerKey The organizer ID
     * @param sessionId The session ID
     * @throws ApiException If the response status code is not Successful 2xx, or an error has occurred during parameter serialization or response deserialization
     */
    public void deleteSessionRecordingsById(String authorization, Long organizerKey, Long sessionId) 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(sessionId == null) {
            throw new ApiException("Required parameter sessionId is null.");
        }

        // create path and map variables
        String path = "/organizers/{organizerKey}/sessions/{sessionId}/recordings"
                .replaceAll("\\{format\\}", "json")
                .replaceAll("\\{" + "organizerKey" + "\\}", apiInvoker.escapeString(organizerKey.toString()))
                .replaceAll("\\{" + "sessionId" + "\\}", apiInvoker.escapeString(sessionId.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 attendees by organizer
     * Lists all attendees for all meetings within a specified date range for a specified organizer. This API call is only available to users with the admin role.
     * @param authorization Access token
     * @param organizerKey The key of the organizer
     * @param startDate A required start of date range in ISO8601 UTC format, e.g. 2015-07-01T22:00:00Z
     * @param endDate A required end of date range in ISO8601 UTC format, e.g. 2015-07-01T23:00:00Z
     * @return List<AttendeeByOrganizer>
     * @throws ApiException If the response status code is not Successful 2xx, or an error has occurred during parameter serialization or response deserialization
     */
    public List getAttendeesByOrganizer(String authorization, Long organizerKey, Date startDate, Date endDate) 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(startDate == null) {
            throw new ApiException("Required parameter startDate is null.");
        }

        if(endDate == null) {
            throw new ApiException("Required parameter endDate is null.");
        }

        // create path and map variables
        String path = "/organizers/{organizerKey}/attendees"
                .replaceAll("\\{format\\}", "json")
                .replaceAll("\\{" + "organizerKey" + "\\}", apiInvoker.escapeString(organizerKey.toString()));

        // query params
        Map queryParams = new HashMap();
        Map headerParams = new HashMap();
        Map formParams = new HashMap();

        String startDateString = JsonUtil.Stringify(startDate);
        if(!"null".equals(startDateString)){
            queryParams.put("startDate", startDateString);
        }

        String endDateString = JsonUtil.Stringify(endDate);
        if(!"null".equals(endDateString)){
            queryParams.put("endDate", endDateString);
        }

        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", AttendeeByOrganizer.class);
        }
        return null;
    }

    /**
     * Get historical meetings by organizer
     * Get historical meetings for the specified organizer that started within the specified date/time range. Remark: Meetings which are still ongoing at the time of the request are NOT contained in the result array.
     * @param authorization Access token
     * @param organizerKey The key of the organizer
     * @param startDate Required start of date range, in ISO8601 UTC format, e.g. 2015-07-01T22:00:00Z
     * @param endDate Required end of date range, in ISO8601 UTC format, e.g. 2015-07-01T23:00:00Z
     * @return List<HistoricalMeeting>
     * @throws ApiException If the response status code is not Successful 2xx, or an error has occurred during parameter serialization or response deserialization
     */
    public List getHistoricalMeetingsByOrganizer(String authorization, Long organizerKey, Date startDate, Date endDate) 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(startDate == null) {
            throw new ApiException("Required parameter startDate is null.");
        }

        if(endDate == null) {
            throw new ApiException("Required parameter endDate is null.");
        }

        // create path and map variables
        String path = "/organizers/{organizerKey}/historicalMeetings"
                .replaceAll("\\{format\\}", "json")
                .replaceAll("\\{" + "organizerKey" + "\\}", apiInvoker.escapeString(organizerKey.toString()));

        // query params
        Map queryParams = new HashMap();
        Map headerParams = new HashMap();
        Map formParams = new HashMap();

        String startDateString = JsonUtil.Stringify(startDate);
        if(!"null".equals(startDateString)){
            queryParams.put("startDate", startDateString);
        }

        String endDateString = JsonUtil.Stringify(endDate);
        if(!"null".equals(endDateString)){
            queryParams.put("endDate", endDateString);
        }

        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", HistoricalMeeting.class);
        }
        return null;
    }

    /**
     * DEPRECATED: Get meetings by organizer
     * DEPRECATED: Please use the new API calls 'Get historical meetings by organizer' and 'Get upcoming meetings by organizer'. Gets future (scheduled) or past (history) meetings for a specified organizer. Include 'history=true' and the past start and end dates in the URL to retrieve past meetings. Enter 'scheduled=true' (without dates) to get scheduled meetings.
     * @param authorization Access token
     * @param organizerKey The key of the organizer
     * @param scheduled When 'true', returns all future meetings. Date range not supported.
     * @param history When 'true', returns all past meetings within date range
     * @param startDate If history is 'true', required start of date range, in ISO8601 UTC format, e.g. 2015-07-01T22:00:00Z
     * @param endDate If history is 'true', required end of date range, in ISO8601 UTC format, e.g. 2015-07-01T23:00:00Z
     * @return List<MeetingByOrganizer>
     * @throws ApiException If the response status code is not Successful 2xx, or an error has occurred during parameter serialization or response deserialization
     */
    @Deprecated
    public List getMeetingsByOrganizer(String authorization, Long organizerKey, Boolean scheduled, Boolean history, Date startDate, Date endDate) 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.");
        }

        // create path and map variables
        String path = "/organizers/{organizerKey}/meetings"
                .replaceAll("\\{format\\}", "json")
                .replaceAll("\\{" + "organizerKey" + "\\}", apiInvoker.escapeString(organizerKey.toString()));

        // query params
        Map queryParams = new HashMap();
        Map headerParams = new HashMap();
        Map formParams = new HashMap();

        String scheduledString = JsonUtil.Stringify(scheduled);
        if(!"null".equals(scheduledString)){
            queryParams.put("scheduled", scheduledString);
        }

        String historyString = JsonUtil.Stringify(history);
        if(!"null".equals(historyString)){
            queryParams.put("history", historyString);
        }

        String startDateString = JsonUtil.Stringify(startDate);
        if(!"null".equals(startDateString)){
            queryParams.put("startDate", startDateString);
        }

        String endDateString = JsonUtil.Stringify(endDate);
        if(!"null".equals(endDateString)){
            queryParams.put("endDate", endDateString);
        }

        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", MeetingByOrganizer.class);
        }
        return null;
    }

    /**
     * Get organizer
     * Returns the individual organizer specified by the key. This API call is only available to users with the admin role. Non-admin users can only make this call for their own organizerKey.
     * @param authorization Access token
     * @param organizerKey The key of the organizer
     * @return List<Organizer>
     * @throws ApiException If the response status code is not Successful 2xx, or an error has occurred during parameter serialization or response deserialization
     */
    public List getOrganizer(String authorization, Long organizerKey) 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.");
        }

        // create path and map variables
        String path = "/organizers/{organizerKey}"
                .replaceAll("\\{format\\}", "json")
                .replaceAll("\\{" + "organizerKey" + "\\}", apiInvoker.escapeString(organizerKey.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", Organizer.class);
        }
        return null;
    }

    /**
     * Get organizer by email / Get all organizers
     * Gets the individual organizer specified by the organizer's email address. If an email address is not specified, all organizers are returned. This API call is only available to users with the admin role.
     * @param authorization Access token
     * @param email The email address of the organizer
     * @return List<Organizer>
     * @throws ApiException If the response status code is not Successful 2xx, or an error has occurred during parameter serialization or response deserialization
     */
    public List getOrganizersAllOrByEmail(String authorization, String email) throws ApiException {

        Object postBody = null;

        if(authorization == null) {
            throw new ApiException("Required parameter authorization is null.");
        }

        // create path and map variables
        String path = "/organizers"
                .replaceAll("\\{format\\}", "json");

        // query params
        Map queryParams = new HashMap();
        Map headerParams = new HashMap();
        Map formParams = new HashMap();

        String emailString = JsonUtil.Stringify(email);
        if(!"null".equals(emailString)){
            queryParams.put("email", emailString);
        }

        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", Organizer.class);
        }
        return null;
    }

    /**
     * Get upcoming meetings by organizer
     * Get upcoming meetings for a specified organizer. This API call is only available to users with the admin role.
     * @param authorization Access token
     * @param organizerKey The key of the organizer
     * @return List<UpcomingMeeting>
     * @throws ApiException If the response status code is not Successful 2xx, or an error has occurred during parameter serialization or response deserialization
     */
    public List getUpcomingMeetingsByOrganizer(String authorization, Long organizerKey) 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.");
        }

        // create path and map variables
        String path = "/organizers/{organizerKey}/upcomingMeetings"
                .replaceAll("\\{format\\}", "json")
                .replaceAll("\\{" + "organizerKey" + "\\}", apiInvoker.escapeString(organizerKey.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", UpcomingMeeting.class);
        }
        return null;
    }

    /**
     * Update organizer
     * Updates the products of the specified organizer. To add a product (G2M, G2W, G2T, OPENVOICE) for the organizer, the call must be sent once for each product you want to add. To remove all products for the organizer, set status to 'suspended'. The call is limited to users with the admin role.
     * @param authorization Access token
     * @param organizerKey The key of the organizer
     * @param body The organizer's status
     * @throws ApiException If the response status code is not Successful 2xx, or an error has occurred during parameter serialization or response deserialization
     */
    public void updateOrganizer(String authorization, Long organizerKey, OrganizerStatus 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(body == null) {
            throw new ApiException("Required parameter body is null.");
        }

        // create path and map variables
        String path = "/organizers/{organizerKey}"
                .replaceAll("\\{format\\}", "json")
                .replaceAll("\\{" + "organizerKey" + "\\}", apiInvoker.escapeString(organizerKey.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, "PUT", queryParams, postBody, headerParams, formParams, contentType);
    }

    /**
     * Get organizer by email
     * Gets the individual organizer specified by the organizer's email address. This API call is only available to users with the admin role.
     * @deprecated Use getOrganizersAllOrByEmail() instead.
     * @param authorization Access token
     * @param email The email address of the organizer
     * @return List<Organizer>
     * @throws ApiException If the response status code is not Successful 2xx, or an error has occurred during parameter serialization or response deserialization
     */
    @Deprecated
    public List getOrganizerByEmail (String authorization, String email) throws ApiException {

        Object postBody = null;

        if(authorization == null) {
            throw new ApiException("Required parameter authorization is null.");
        }

        if(email == null) {
            throw new ApiException("Required parameter email is null.");
        }

        // create path and map variables
        String path = "/organizers"
                .replaceAll("\\{format\\}", "json");

        // query params
        Map queryParams = new HashMap();
        Map headerParams = new HashMap();
        Map formParams = new HashMap();

        String emailString = JsonUtil.Stringify(email);
        if(!"null".equals(emailString)){
            queryParams.put("email", emailString);
        }

        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;
        }

        String response = apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType);
        if(response != null){
            return (List)ApiInvoker.deserialize(response, "List", Organizer.class);
        }
        return null;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy