11
Citrix GotoMeeting API Data Report This Excel spreadsheet demonstrates a simple way to obtain your meeting data from the Citrix GoToMeeting API, and to integrate GoToMeeting data into your users’ daily work. The Excel sheet creates a report of your meetings in a time range you define. This report automatically fills in a copy of the Template sheet with the meeting subject, meeting start and end time and the attendees of your meeting. The second portion of this document provides an example of how to modify the report. Opening the GoToMeeting API Report You should have the Excel file, G2M_Reports.xlsm, on your local drive. When you open the Excel file, you will typically get one or more security warnings. Excel suppresses all macros by default for your security. Enable editing and activate the macros for this report. 1. Select Enable Editing to permit data entry for the report. 2. Select Enable Content to activate the macros. Running the GoToMeeting API Report Running the report consists of logging in, running a macro, and viewing the results. 1. With the document open select the Template worksheet. 2. Click the Create Report button.

itrix GotoMeeting API ata Report - goto-developer.logmein.com fileitrix GotoMeeting API ata Report This Excel spreadsheet demonstrates a simple way to obtain your meeting data from

  • Upload
    vodien

  • View
    229

  • Download
    0

Embed Size (px)

Citation preview

Page 1: itrix GotoMeeting API ata Report - goto-developer.logmein.com fileitrix GotoMeeting API ata Report This Excel spreadsheet demonstrates a simple way to obtain your meeting data from

Citrix GotoMeeting API Data Report

This Excel spreadsheet demonstrates a simple way to obtain your meeting data from the Citrix

GoToMeeting API, and to integrate GoToMeeting data into your users’ daily work.

The Excel sheet creates a report of your meetings in a time range you define. This report

automatically fills in a copy of the Template sheet with the meeting subject, meeting start and end

time and the attendees of your meeting.

The second portion of this document provides an example of how to modify the report.

Opening the GoToMeeting API Report You should have the Excel file, G2M_Reports.xlsm, on your local drive.

When you open the Excel file, you will typically get one or more security warnings. Excel suppresses

all macros by default for your security. Enable editing and activate the macros for this report.

1. Select Enable Editing to permit data entry for the report.

2. Select Enable Content to activate the macros.

Running the GoToMeeting API Report Running the report consists of logging in, running a macro, and viewing the results.

1. With the document open select the Template worksheet.

2. Click the Create Report button.

Page 2: itrix GotoMeeting API ata Report - goto-developer.logmein.com fileitrix GotoMeeting API ata Report This Excel spreadsheet demonstrates a simple way to obtain your meeting data from

3. This button takes you to a login dialog. Enter your credentials and select Connect.

4. After connecting to GoToMeeting you get a Login successful message. Click OK. The

connection dialog remains in place.

5. Use the default start and end dates for the report range, or enter a specific date range using

the date format in the dialog (YYYY-MM-DD). Then click Get Meetings. This starts the macro.

Page 3: itrix GotoMeeting API ata Report - goto-developer.logmein.com fileitrix GotoMeeting API ata Report This Excel spreadsheet demonstrates a simple way to obtain your meeting data from

6. The macro collects the requested data for all your meetings in the given timeframe. When it

completes, you see the data on a new spreadsheet tab and a Request successful dialog. Click

OK to close the dialog. You will also need to close the Connection dialog to navigate in the

data.

7. The meeting data is created on a new sheet, directly after the template sheet, named

‘Report’ plus the create date in the format: Report_YYYY_MM_DD_mm_ss. The Sheet is a

copy of the template sheet, with the data requested from the GoToMeeting API. Date

formats follow ISO 8601. The tailing ‘.+000’ shows that the Time zone is UTC+0h.

Page 4: itrix GotoMeeting API ata Report - goto-developer.logmein.com fileitrix GotoMeeting API ata Report This Excel spreadsheet demonstrates a simple way to obtain your meeting data from
Page 5: itrix GotoMeeting API ata Report - goto-developer.logmein.com fileitrix GotoMeeting API ata Report This Excel spreadsheet demonstrates a simple way to obtain your meeting data from

Modifying the GoToMeeting API Report There are any number of modifications you may want to make to the GoToMeeting API Report. You

can add observers, parse the attendees back out into separate data values, or modify the date

format. As an example of modifying the report, the following steps add MeetingType as a data

column on the report.

Open the Spreadsheet in Developer Mode 1. Make a backup of the report so that you have a clean copy to refer to.

2. In the new copy of the report, open the Template worksheet and insert a new column to the

right of the Meeting Id column. Enter a heading called Meeting Type and resize the column

to fit the heading.

3. Enable the developer tools:

a. Right-click anywhere in the control ribbon, and select Customize the Ribbon.

b. In the Excel Options dialog, click on Developer as shown.

4. Click on the Developer tab and select Visual Basic to launch the editor.

Page 6: itrix GotoMeeting API ata Report - goto-developer.logmein.com fileitrix GotoMeeting API ata Report This Excel spreadsheet demonstrates a simple way to obtain your meeting data from

5. In the Project window in the upper left of the editing area, open the node labelled Form and

double-click on frmG2MReport. This opens the base form and the form properties window.

6. To view the code, click the code icon at the far top left in the Project – VBA Project window.

The code window displays.

Editing the Code To successfully edit the code, you will need to create a new app in your Citrix Online developer

account. If you do not already have a developer account, create a free account on

https://developer.citrixonline.com. The description of how to create the account is on the FAQ

page - https://developer.citrixonline.com/faq-page.

Page 7: itrix GotoMeeting API ata Report - goto-developer.logmein.com fileitrix GotoMeeting API ata Report This Excel spreadsheet demonstrates a simple way to obtain your meeting data from

1. Create a new App in your developer account. This is required in order to create a Consumer

Key. The Consumer Key is used during authentication to create an access token for the API

calls.

2. Fill in the app values.

IMPORTANT: The APIs an app can access and run is limited to those products you select

under Product API in the Add App dialog.

Click Create App to build the app. The site requires a few moments to build the app.

3. Click on the app name to open the app in your App listing.

Page 8: itrix GotoMeeting API ata Report - goto-developer.logmein.com fileitrix GotoMeeting API ata Report This Excel spreadsheet demonstrates a simple way to obtain your meeting data from

4. Select and copy the Consumer Key value.

5. You can now return to the Excel spreadsheet. In the code window, scroll to top of the code

and locate the ClientID value. Select the existing value and paste your new Consumer Key

value inside the quotation marks. (The Consumer Key = the ClientID and is used to authorize

your account and create an access token that is then used to make your API calls.)

6. Add MeetingType in the locations detailed below. In each case, copy the syntax of the

MeetingId statements, and create a matching MeetingType statement immediately after the

MeetingId statement.

a. Define the columns – Set colMeetingType to “E” and set colAttendees to “F”.

Page 9: itrix GotoMeeting API ata Report - goto-developer.logmein.com fileitrix GotoMeeting API ata Report This Excel spreadsheet demonstrates a simple way to obtain your meeting data from

b. Declare in the JSONMeeting object.

c. Beautify the report.

d. Add Meeting Type to the report header.

7. Save the entire sheet.

8. In the Template sheet, click Create Report to test the result.

Page 10: itrix GotoMeeting API ata Report - goto-developer.logmein.com fileitrix GotoMeeting API ata Report This Excel spreadsheet demonstrates a simple way to obtain your meeting data from

General usage of the GoToMeeting API from within VBA This sample uses only a small part of the GoToMeeting API (Please have a look at the documentation:

https://developer.citrixonline.com/api/gotomeeting-rest-api). To review the calls look at the

following functions on the frmG2MReport:

frmG2MReport -> GetAccessTokenFromAPI

frmG2MReport -> GetMeetingsFromAPI

frmG2MReport -> GetAttendeesFromAPI

GetAccessTokenFromAPI

The ClientID (Consumer Key) is used to authorize your account and create an access token that is

then used to make your API calls. This is the method to acquire and store the token.

The token is associated with the logged in user and the call limits of the ClientID. Please be aware the

ClientID gives you only access to the area of API you selected when you created the ClientID.

GetMeetingsFromAPI

This is the method used to request meeting data from the API.

Please make sure that the start and end date/time is formatted correctly. And the time is always UTC!

GetAttendeesFromAPI

This method pulls the attendees for each meeting using a different API call.

Page 11: itrix GotoMeeting API ata Report - goto-developer.logmein.com fileitrix GotoMeeting API ata Report This Excel spreadsheet demonstrates a simple way to obtain your meeting data from

How to work with JSON Object from this JSON library

The JSON library parses strings recursively and returns Collections for Arrays and Dictionary Objects

for JSON Objects, storing key/value pairs for each property. The value can be a numeric, a string, a

collection (for an array) or a dictionary (for a JSON Object) value. Values in Objects can be accessed

easily – use the name of the property to get the value. The objects you normally get from API contain

more information than you need. You can have a look at the result objects via the interactive

debugger.