CalendarCollection class

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 .NET JSOM REST Type Description
[Integer] Calendar Gets a Calendar from the collection at the specified index.
Item Calendar Gets a Calendar from the collection at the specified index.

Methods

Name .NET JSOM REST Return Type Description
'{CalendarId}' Calendar Gets a Calendar from the collection with the specified CalendarId.
Add(CalendarCreationInformation parameters) Calendar Adds the Calendar that is specified by the CalendarCreationInformation object to the collection.
GetByGuid(Guid uid) Calendar Gets a Calendar from the collection with the Guid value.
GetById(String objectId) Calendar Gets a Calendar from the collection with the Id value.
Remove(Calendar calendar) Boolean Removes the specified Calendar from the collection.
Update() void Updates 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
Name Type Description
CalendarId String the 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
Name Type Description
parameters CalendarCreationInformation The properties that can be set when creating a calendar.
Return Value

Calendar

GetByGuid(Guid uid)

Gets a Calendar from the collection with the Guid value.

Syntax
Calendar GetByGuid(Guid uid)
Parameters
Name Type Description
uid Guid The Guid of the Calendar
Return Value

Calendar

GetById(String objectId)

Gets a Calendar from the collection with the Id value.

Syntax
Calendar GetById(String objectId)
Parameters
Name Type Description
objectId String The id of the Calendar.
Return Value

Calendar

Remove(Calendar calendar)

Removes the specified Calendar from the collection.

Syntax
Boolean Remove(Calendar calendar)
Parameters
Name Type Description
calendar Calendar The Calendar to remove.
Return Value

Boolean

Update()

Updates the calendar collection.

Syntax
void Update()
Parameters

None

Return Value

void

See Also

Calendar
CalendarCreationInformation
ProjectContext