Table of contents
API
TOC
Collapse the table of content
Expand the table of content

CalendarCollection class

Nadin Merali|Last Updated: 5/6/2017

inherits members from ClientObjectCollection

Represents a collection of calendars objects.

Syntax

CSOM

class CalendarCollection 

JSOM

PS.CalendarCollection

REST Interface

Supported.

PS.CalendarCollection

http://contoso.sharepoint.com/sites/pwa/api/ProjectServer/Calendars

Members

✓ - Read Support       ✓ʷ - Write Support

Properties

Name.NETJSOMRESTTypeDescription
[Integer]CalendarGets a Calendar from the collection at the specified index.
ItemCalendarGets a Calendar from the collection at the specified index.

Methods

Name.NETJSOMRESTReturn TypeDescription
'{CalendarId}'CalendarGets a Calendar from the collection with the specified CalendarId.
Add(CalendarCreationInformation parameters)CalendarAdds the Calendar that is specified by the CalendarCreationInformation object to the collection.
GetByGuid(Guid uid)CalendarGets a Calendar from the collection with the Id value.
GetById(String objectId)CalendarGets a Calendar from the collection with the Guid value.
Remove(Calendar calendar)BooleanRemoves the specified Calendar from the collection.
Update()voidUpdates the calendar collection.


Method Details

'{CalendarId}'

Gets a Calendar from the collection with the specified CalendarId.

Syntax
Calendar http://contoso.sharepoint.com/sites/pwa/api/ProjectServer/Calendars('{CalendarId}')
Parameters
NameTypeDescription
CalendarIdStringthe id of the Calendar
Return Value

Calendar

Add(CalendarCreationInformation parameters)

Adds the Calendar that is specified by the CalendarCreationInformation object to the collection.

Syntax
Calendar Add(CalendarCreationInformation parameters)
Parameters
NameTypeDescription
parametersCalendarCreationInformationThe properties that can be set when creating a calendar.
Return Value

Calendar

GetByGuid(Guid uid)

Gets a Calendar from the collection with the Id value.

Syntax
Calendar GetByGuid(Guid uid)
Parameters
NameTypeDescription
uidGuidThe Guid of the Calendar
Return Value

Calendar

GetById(String objectId)

Gets a Calendar from the collection with the Guid value.

Syntax
Calendar GetById(String objectId)
Parameters
NameTypeDescription
objectIdStringThe id of the Calendar.
Return Value

Calendar

Remove(Calendar calendar)

Removes the specified Calendar from the collection.

Syntax
Boolean Remove(Calendar calendar)
Parameters
NameTypeDescription
calendarCalendarThe Calendar to remove.
Return Value

Boolean

Update()

Updates the calendar collection.

Syntax
void Update()
Parameters

None

Return Value

void

See Also

Calendar
CalendarCreationInformation
ProjectContext

© 2018 Microsoft