SCRT-HQ / PSGSuite

Powershell module for Google / G Suite API calls wrapped in handy functions. Authentication is established using a service account via P12 key to negate the consent popup and allow for greater handsoff automation capabilities
https://psgsuite.io/
Apache License 2.0
234 stars 66 forks source link

Get-GSCalendar fails with Method invocation failed because [Google.Apis.Calendar.v3.CalendarsResource] does not contain a method named 'List' #240

Closed felixfbecker closed 4 years ago

felixfbecker commented 4 years ago

Describe the bug Any call without arguments fails with an error.

To Reproduce Steps to reproduce the behavior: Run

> Get-GSCalendar
Get-GSCalendar : Method invocation failed because [Google.Apis.Calendar.v3.CalendarsResource] does not contain a method named 'List'.
At line:1 char:1
+ Get-GSCalendar
+ ~~~~~~~~~~~~~~

Expected behavior Not error

Environment (please complete the following information):

scrthq commented 4 years ago

Thanks for opening this up, @felixfbecker !! While I get this fixed, you'll probably want to use Get-GSCalendarSubscription. The previous versions actually had that same underlying call replicated between both Get-GSCalendar and Get-GSCalendarSubscription, so I've been working on cleaning up Get-GSCalendar to point at the correct endpoint (Calendar vs CalendarList). Calendars are a bit of a maze in Google's API

scrthq commented 4 years ago

hey @felixfbecker - Fix pushed! You should no longer see those errors. Update to the latest version and let me know =]