Is there some way with the Google Calendar API to view which rooms have been booked when retrieving a meeting via the API?
Also is there a way to add a room resource to a meeting via the Calendar API?
To manage a resource, you need to add the resource's email address to your My Calendars list. You can then edit, share, or get notifications about the resource. If you don't explicitly set the sharing option for your new resource, it will inherit the default sharing option for secondary calendars in your organization.
Set individually in the Google CalendarIn the left side bar, point to Other calendars. Browse resources. and check the box. The resource now appears in your Settings for my calendars list.
View Resources When Creating an EventToward the right side, click Rooms, etc. Hold your mouse over any scheduled events to see more information (information may vary depending on your level of access to the calendar) or click directly on an available time in the calendar to update the date/time of your event.
The fact that you are using resources with Google calendar tells me that you are a Google Apps for Business/Education user.
If you want a list of resources at your organisation you need to use the Google Apps Calendar Resource API. You can also use this API to create new resources.
If you want to list availability of a calendar resource you need to use the Google Calendar API. You need to query the API using a username that has the appropriate permissions to view the resource calendar. The id of a calendar resource looks like an email address ending in @resource.calendar.google.com
You will also notice that resources are listed amongst your event attendees.
Now the bad news
At the time of writing (October 2013) the Google Apps Calendar Resource API uses Atom/OAuth 1.0a whereas the Google Calendar API version 3 uses JSON/OAuth 2.0.
So that means you currently need to implement two different mechanisms of authentication and two different styles of API, fun eh?
That said since Google are deprecating support for OAuth 1.0a, I'm sure they are beavering away re-writing the Google Apps Calendar Resource API to become JSON/OAuth 2.0 compatible (I may post a question here to ask about that!).
Update
Please see my question for information regarding the lifespan of the Google Apps Calendar Resource API:
Google Apps Calendar Resource API v1 (Atom/OAuth 1.0) likely lifespan?
I've just tried it out - it works fine (returns array of booked dates for each resource id, eventually if such array is empty - resource is available for you. I'd like to get boolean values, but still..)
So, you need to use following API.
Go to section try it
login using oauth
paste request below (Replace resource ids to existing)
Request code:
{
"maxResults": 10,
"timeMin": "2013-11-27T00:00:00+02:00",
"timeMax": "2013-12-27T23:59:59+02:00",
"items": [
{
"id": "[email protected]"
},
{
"id": "[email protected]"
},
{
"id": "[email protected]"
}
]
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With