Calendar Event Utility methods for scripted widgets
Methods
AggregateByMonth
Velocity
#set($dictionaryResponse = $calendar_v1_events.AggregateByMonth($events))
JavaScript
var dictionaryResponse = calendar_v1_events.AggregateByMonth(events);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| events | IEnumerable of Event | Events | Required |
Returns
Dictionary of StringCreate
Velocity
#set($eventResponse = $calendar_v1_events.Create($calendarId, "%{ _ExtendedAttributes_NAME = $_ExtendedAttributes_NAMEArg, Address = $addressArg, AllowAnonymous = $allowAnonymousArg, Body = $bodyArg, EndDate = $endDateArg, Latitude = $latitudeArg, Location = $locationArg, Longitude = $longitudeArg, MaxRegistrations = $maxRegistrationsArg, RegistrationType = $registrationTypeArg, StartDate = $startDateArg, Tags = $tagsArg, TimeZoneId = $timeZoneIdArg, Title = $titleArg, Url = $urlArg }"))JavaScript
var eventResponse = calendar_v1_events.Create(calendarId, { _ExtendedAttributes_NAME: _ExtendedAttributes_NAMEArg, Address: addressArg, AllowAnonymous: allowAnonymousArg, Body: bodyArg, EndDate: endDateArg, Latitude: latitudeArg, Location: locationArg, Longitude: longitudeArg, MaxRegistrations: maxRegistrationsArg, RegistrationType: registrationTypeArg, StartDate: startDateArg, Tags: tagsArg, TimeZoneId: timeZoneIdArg, Title: titleArg, Url: urlArg });Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| calendarId | Number | Calendar Id | Required | ||
| options | Options | Set of optional parameters including: | Required | ||
| _ExtendedAttributes_NAME | String | Additional information about the calendar that may be used by third party plugins | Optional | ||
| Address | String | The address string used to look up map locations when using geo-coding. | Optional | ||
| AllowAnonymous | Boolean | Allows users not currently a member of the community to register. | Optional | ||
| Body | String | The specific details about the event. Required. | Optional | ||
| EndDate | DateTime | When the event ends. | Optional | ||
| Latitude | Number | The latitude of the event. Applies only to geo-coding. | Optional | ||
| Location | String | Where the event takes place. | Optional | ||
| Longitude | Number | The longitude of the event. Applies only to geo-coding. | Optional | ||
| MaxRegistrations | Number | The maximum amount of registrations accepted. | Optional | ||
| RegistrationType | Number | Registration options for the event. None= 0, Open=1, Approval Required = 2, InvitationOnly=3. Default is Open (0). | Optional | ||
| StartDate | DateTime | When the event starts. Required. | Optional | ||
| Tags | String | Tags to add to the event. | Optional | ||
| TimeZoneId | String | The timezone the event occurs in. | Optional | ||
| Title | String | The title of the event. Required. | Optional | ||
| Url | String | An external url representing the event, such as a third party website. | Optional |
Returns
Delete
Delete Overload 1
Deletes a calendar event.
Velocity
#set($eventResponse = $calendar_v1_events.Delete($eventId))
JavaScript
var eventResponse = calendar_v1_events.Delete(eventId);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| eventId | Number | Event Id | Required |
Delete Overload 2
Deletes or cancels a calendar event.
Velocity
#set($eventResponse = $calendar_v1_events.Delete($eventId, "%{ CancelOnly = $cancelOnlyArg }"))JavaScript
var eventResponse = calendar_v1_events.Delete(eventId, { CancelOnly: cancelOnlyArg });Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| eventId | Number | Event Id | Required | ||
| options | Options | Set of optional parameters including: | Required | ||
| CancelOnly | Boolean | Indicate whether to fully delete the event or only mark it canceled. | Optional | False |
Returns
HasPermission
Velocity
#set($booleanResponse = $calendar_v1_events.HasPermission($eventId, $permission))
JavaScript
var booleanResponse = calendar_v1_events.HasPermission(eventId, permission);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| eventId | Number | Event Id | Required | ||
| permission | Guid | Permission | Required |
Returns
IncrementViewCount
Increments the views for the specified event.
Velocity
$calendar_v1_events.IncrementViewCount($eventId)
JavaScript
calendar_v1_events.IncrementViewCount(eventId);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| eventId | Number | Event Id | Required |
Returns
NothingIsFeatured
Velocity
#set($booleanResponse = $calendar_v1_events.IsFeatured($eventId))
JavaScript
var booleanResponse = calendar_v1_events.IsFeatured(eventId);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| eventId | Number | Event Id | Required |
Returns
IsSubscribed
Velocity
#set($booleanResponse = $calendar_v1_events.IsSubscribed($eventId))
JavaScript
var booleanResponse = calendar_v1_events.IsSubscribed(eventId);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| eventId | Number | Event Id | Required |
Returns
List
Velocity
#set($pagedListResponse = $calendar_v1_events.List("%{ ApplicationIds = $applicationIdsArg, CalendarContext = $calendarContextArg, CalendarId = $calendarIdArg, CalendarReferenceId = $calendarReferenceIdArg, CancelledOnly = $cancelledOnlyArg, ContainerIds = $containerIdsArg, ContentIds = $contentIdsArg, DateRangeEnd = $dateRangeEndArg, DateRangeStart = $dateRangeStartArg, EventId = $eventIdArg, ExcludeCancelledEvents = $excludeCancelledEventsArg, FilterByCalendarIdList = $filterByCalendarIdListArg, FilterByReferenceIdList = $filterByReferenceIdListArg, IncludeSubGroups = $includeSubGroupsArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, QueryType = $queryTypeArg, RegisteredUserId = $registeredUserIdArg, RegisteredUserRegistrationStatus = $registeredUserRegistrationStatusArg, SortBy = $sortByArg, SortOrder = $sortOrderArg }"))JavaScript
var pagedListResponse = calendar_v1_events.List({ ApplicationIds: applicationIdsArg, CalendarContext: calendarContextArg, CalendarId: calendarIdArg, CalendarReferenceId: calendarReferenceIdArg, CancelledOnly: cancelledOnlyArg, ContainerIds: containerIdsArg, ContentIds: contentIdsArg, DateRangeEnd: dateRangeEndArg, DateRangeStart: dateRangeStartArg, EventId: eventIdArg, ExcludeCancelledEvents: excludeCancelledEventsArg, FilterByCalendarIdList: filterByCalendarIdListArg, FilterByReferenceIdList: filterByReferenceIdListArg, IncludeSubGroups: includeSubGroupsArg, PageIndex: pageIndexArg, PageSize: pageSizeArg, QueryType: queryTypeArg, RegisteredUserId: registeredUserIdArg, RegisteredUserRegistrationStatus: registeredUserRegistrationStatusArg, SortBy: sortByArg, SortOrder: sortOrderArg });Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| options | Options | Set of optional parameters including: | Required | ||
| ApplicationIds | String | Comma separated list of ApplicationIds. Used to limit to a specific set of calendar events. Filtering by ApplicationIds will ignore CalendarReferenceId, FilterByReferenceIdList and ContainerIds. | Optional | ||
| CalendarContext | String | Only used if CalendarReferenceId or FilterByReferenceIdList are sepecified. | Optional | ||
| CalendarId | Number | Calendar Id. Filtering by CalendarId ill ignore CalendarReferenceId, FilterByReferenceIdList, ApplicationIds and ContainerIds. | Optional | ||
| CalendarReferenceId | Number | Filtering by CalendarReferenceId will ignore ContainerIds. | Optional | ||
| CancelledOnly | Boolean | Cancelled Only | Optional | ||
| ContainerIds | String | Comma separated list of ContainerIds. Used to limit to a specific set of calendar events. | Optional | ||
| ContentIds | String | Comma separated list of ContentIds. Used to limit to a specific set of calendar events as well as sort order if SortBy is set to ContentIdsOrder. Filtering by ContentIds will ignore FilterByCalenderIdList, CalendarReferenceId, FilterByReferenceIdList, ApplicationIds and ContainerIds. | Optional | ||
| DateRangeEnd | DateTime | Date Range End | Optional | ||
| DateRangeStart | DateTime | Date Range Start | Optional | ||
| EventId | Number | Event Id. Filtering by EventId will ignore CalendarId, CalendarReferenceId, FilterByCalenderIdList, FilterByReferenceIdList, ContentIds, ApplicationIds and ContainerIds. | Optional | ||
| ExcludeCancelledEvents | Boolean | Exclude cancelled events from results. | Optional | ||
| FilterByCalendarIdList | String | Filtering by FilterByCalenderIdList will ignore FilterByReferenceIdList, ApplicationIds and ContainerIds. | Optional | ||
| FilterByReferenceIdList | String | Filtering by FilterByReferenceIdList will ignore ContainerIds. | Optional | ||
| IncludeSubGroups | Boolean | Only used when CalendarReferenceId is specified. | Optional | ||
| PageIndex | Number | Page Index | Optional | 0 | |
| PageSize | Number | Page Size | Optional | 100 | |
| QueryType | String | Query Type | Optional | ||
| RegisteredUserId | Number | Registered User Id | Optional | ||
| RegisteredUserRegistrationStatus | String | Registered User Registration Status | Optional | Cancelled, Confirmed, Invited, NotApproved | |
| SortBy | String | Sort By | Optional | StartDate | ContentIdsOrder, CreateDate, EndDate, StartDate, Title |
| SortOrder | String | Sort Order | Optional | Ascending | Ascending, Descending |
Returns
RegistrationTypes
Velocity
#set($apiListResponse = $calendar_v1_events.RegistrationTypes())
JavaScript
var apiListResponse = calendar_v1_events.RegistrationTypes();
Returns
SetFeatured
Velocity
$calendar_v1_events.SetFeatured($eventId, $feature)
JavaScript
calendar_v1_events.SetFeatured(eventId, feature);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| eventId | Number | Event Id | Required | ||
| feature | Boolean | Feature | Required |
Returns
NothingSetSubscribed
Velocity
$calendar_v1_events.SetSubscribed($eventId, $subscribe)
JavaScript
calendar_v1_events.SetSubscribed(eventId, subscribe);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| eventId | Number | Event Id | Required | ||
| subscribe | Boolean | Subscribe | Required |
Returns
NothingShow
Show Overload 1
Velocity
#set($eventResponse = $calendar_v1_events.Show($id))
JavaScript
var eventResponse = calendar_v1_events.Show(id);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| id | Number | Id | Required |
Show Overload 2
Velocity
#set($eventResponse = $calendar_v1_events.Show("%{ ContentId = $contentIdArg, Id = $idArg }"))JavaScript
var eventResponse = calendar_v1_events.Show({ ContentId: contentIdArg, Id: idArg });Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| options | Options | Set of optional parameters including: | Required | ||
| ContentId | String | Either Id or ContentId is Required. | Optional | ||
| Id | Number | Either Id or ContentId is Required. | Optional |
Returns
ToString
Velocity
#set($stringResponse = $calendar_v1_events.ToString())
JavaScript
var stringResponse = calendar_v1_events.ToString();
Returns
Update
Update Overload 1
OBSOLETE in 12.1.7: Use calendar_v1_events.Update(int eventId, IDictionary options) instead. Updates a calendar event. OBSOLETE in 12.1.7: Use calendar_v1_events.Update(int eventId, IDictionary options) instead.
Velocity
#set($eventResponse = $calendar_v1_events.Update($calendarId, $eventId, "%{ _ExtendedAttributes_NAME = $_ExtendedAttributes_NAMEArg, Address = $addressArg, AllowAnonymous = $allowAnonymousArg, Body = $bodyArg, EndDate = $endDateArg, Latitude = $latitudeArg, Location = $locationArg, Longitude = $longitudeArg, MaxRegistrations = $maxRegistrationsArg, RegistrationType = $registrationTypeArg, StartDate = $startDateArg, Tags = $tagsArg, TimeZoneId = $timeZoneIdArg, Title = $titleArg, Url = $urlArg }"))JavaScript
var eventResponse = calendar_v1_events.Update(calendarId, eventId, { _ExtendedAttributes_NAME: _ExtendedAttributes_NAMEArg, Address: addressArg, AllowAnonymous: allowAnonymousArg, Body: bodyArg, EndDate: endDateArg, Latitude: latitudeArg, Location: locationArg, Longitude: longitudeArg, MaxRegistrations: maxRegistrationsArg, RegistrationType: registrationTypeArg, StartDate: startDateArg, Tags: tagsArg, TimeZoneId: timeZoneIdArg, Title: titleArg, Url: urlArg });Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| calendarId | Number | Calendar Id | Required | ||
| eventId | Number | Event Id | Required | ||
| options | Options | Set of optional parameters including: | Required | ||
| _ExtendedAttributes_NAME | String | Additional information about the calendar that may be used by third party plugins | Optional | ||
| Address | String | The address string used to look up map locations when using geo-coding. | Optional | ||
| AllowAnonymous | Boolean | Allows users not currently a member of the community to register. | Optional | ||
| Body | String | The specific details about the event. | Optional | ||
| EndDate | DateTime | When the event ends. | Optional | ||
| Latitude | Number | The latitude of the event. Applies only to geo-coding. | Optional | ||
| Location | String | Where the event takes place. | Optional | ||
| Longitude | Number | The longitude of the event. Applies only to geo-coding. | Optional | ||
| MaxRegistrations | Number | The maximum amount of registrations accepted. | Optional | ||
| RegistrationType | Number | Registration options for the event. None= 0, Open=1, Approval Required = 2, InvitationOnly=3. Default is Open (0). | Optional | ||
| StartDate | DateTime | When the event starts. | Optional | ||
| Tags | String | Tags to add to the event. | Optional | ||
| TimeZoneId | Number | The timezone the event occurs in. | Optional | ||
| Title | String | The title of the event. | Optional | ||
| Url | String | An external url representing the event, such as a third party website. | Optional |
Update Overload 2
Updates a calendar event.
Velocity
#set($eventResponse = $calendar_v1_events.Update($eventId, "%{ _ExtendedAttributes_NAME = $_ExtendedAttributes_NAMEArg, Address = $addressArg, AllowAnonymous = $allowAnonymousArg, Body = $bodyArg, EndDate = $endDateArg, Latitude = $latitudeArg, Location = $locationArg, Longitude = $longitudeArg, MaxRegistrations = $maxRegistrationsArg, RegistrationType = $registrationTypeArg, StartDate = $startDateArg, Tags = $tagsArg, TimeZoneId = $timeZoneIdArg, Title = $titleArg, Url = $urlArg }"))JavaScript
var eventResponse = calendar_v1_events.Update(eventId, { _ExtendedAttributes_NAME: _ExtendedAttributes_NAMEArg, Address: addressArg, AllowAnonymous: allowAnonymousArg, Body: bodyArg, EndDate: endDateArg, Latitude: latitudeArg, Location: locationArg, Longitude: longitudeArg, MaxRegistrations: maxRegistrationsArg, RegistrationType: registrationTypeArg, StartDate: startDateArg, Tags: tagsArg, TimeZoneId: timeZoneIdArg, Title: titleArg, Url: urlArg });Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| eventId | Number | Event Id | Required | ||
| options | Options | Set of optional parameters including: | Required | ||
| _ExtendedAttributes_NAME | String | Additional information about the calendar that may be used by third party plugins | Optional | ||
| Address | String | The address string used to look up map locations when using geo-coding. | Optional | ||
| AllowAnonymous | Boolean | Allows users not currently a member of the community to register. | Optional | ||
| Body | String | The specific details about the event. | Optional | ||
| EndDate | DateTime | When the event ends. | Optional | ||
| Latitude | Number | The latitude of the event. Applies only to geo-coding. | Optional | ||
| Location | String | Where the event takes place. | Optional | ||
| Longitude | Number | The longitude of the event. Applies only to geo-coding. | Optional | ||
| MaxRegistrations | Number | The maximum amount of registrations accepted. | Optional | ||
| RegistrationType | Number | Registration options for the event. None= 0, Open=1, Approval Required = 2, InvitationOnly=3. Default is Open (0). | Optional | ||
| StartDate | DateTime | When the event starts. | Optional | ||
| Tags | String | Tags to add to the event. | Optional | ||
| TimeZoneId | Number | The timezone the event occurs in. | Optional | ||
| Title | String | The title of the event. | Optional | ||
| Url | String | An external url representing the event, such as a third party website. | Optional |