Calendar Event Utility methods for scripted widgets
- Properties
- AggregateByMonth
- Create
- HasPermission
- IncrementViewCount
- IsFeatured
- IsSubscribed
- List
- RegistrationTypes
- SetFeatured
- SetSubscribed
- Show
- Update
Properties
Name | Access | Type | Description |
---|---|---|---|
ContentTypeId | Read | Guid | Content Type Id |
Current | Read | Event | Current |
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 String
Create
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 | Int32 | 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 | Double | The latitude of the event. Applies only to geo-coding. | Optional | ||
Location | String | Where the event takes place. | Optional | ||
Longitude | Double | The longitude of the event. Applies only to geo-coding. | Optional | ||
MaxRegistrations | Int32 | The maximum amount of registrations accepted. | Optional | ||
RegistrationType | Int32 | 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
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 | Int32 | Event Id | Required | ||
permission | Guid | Permission | Required |
Returns
Boolean
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 | Int32 | 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 | Int32 | Event Id | Required |
Returns
Boolean
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 | Int32 | Event Id | Required |
Returns
Boolean
List
Velocity
#set($pagedListResponse = $calendar_v1_events.List("%{ CalendarContext = $calendarContextArg, CalendarId = $calendarIdArg, CalendarReferenceId = $calendarReferenceIdArg, CancelledOnly = $cancelledOnlyArg, ContentIds = $contentIdsArg, DateRangeEnd = $dateRangeEndArg, DateRangeStart = $dateRangeStartArg, EventId = $eventIdArg, 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({ CalendarContext: calendarContextArg, CalendarId: calendarIdArg, CalendarReferenceId: calendarReferenceIdArg, CancelledOnly: cancelledOnlyArg, ContentIds: contentIdsArg, DateRangeEnd: dateRangeEndArg, DateRangeStart: dateRangeStartArg, EventId: eventIdArg, 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 | ||
CalendarContext | String | Calendar Context | Optional | ||
CalendarId | Int32 | Calendar Id | Optional | ||
CalendarReferenceId | Int32 | Calendar Reference Id | Optional | ||
CancelledOnly | Boolean | Cancelled Only | 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 | Optional | ||
DateRangeEnd | DateTime | Date Range End | Optional | ||
DateRangeStart | DateTime | Date Range Start | Optional | ||
EventId | Int32 | Event Id | Optional | ||
FilterByCalendarIdList | String | Filter By Calendar Id List | Optional | ||
FilterByReferenceIdList | String | Filter By Reference Id List | Optional | ||
IncludeSubGroups | Boolean | Include Sub Groups | Optional | ||
PageIndex | Int32 | Page Index | Optional | 0 | |
PageSize | Int32 | Page Size | Optional | 100 | |
QueryType | String | Query Type | Optional | ||
RegisteredUserId | Int32 | 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 | Int32 | 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 | Int32 | 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 | Int32 | 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 | Int32 | Either Id or ContentId is Required. | Optional |
Returns
Update
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 | Int32 | Calendar Id | Required | ||
eventId | Int32 | 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 | Double | The latitude of the event. Applies only to geo-coding. | Optional | ||
Location | String | Where the event takes place. | Optional | ||
Longitude | Double | The longitude of the event. Applies only to geo-coding. | Optional | ||
MaxRegistrations | Int32 | The maximum amount of registrations accepted. | Optional | ||
RegistrationType | Int32 | 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 | Int32 | 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 |