| @@ 88-95 (lines=8) @@ | ||
| 85 | * |
|
| 86 | * @return \Google_Service_Calendar_Event |
|
| 87 | */ |
|
| 88 | public function insertEvent($event): Google_Service_Calendar_Event |
|
| 89 | { |
|
| 90 | if ($event instanceof Event) { |
|
| 91 | $event = $event->googleEvent; |
|
| 92 | } |
|
| 93 | ||
| 94 | return $this->calendarService->events->insert($this->calendarId, $event); |
|
| 95 | } |
|
| 96 | ||
| 97 | /** |
|
| 98 | * @param \Spatie\GoogleCalendar\Event|Google_Service_Calendar_Event $event |
|
| @@ 102-109 (lines=8) @@ | ||
| 99 | * |
|
| 100 | * @return \Google_Service_Calendar_Event |
|
| 101 | */ |
|
| 102 | public function updateEvent($event): Google_Service_Calendar_Event |
|
| 103 | { |
|
| 104 | if ($event instanceof Event) { |
|
| 105 | $event = $event->googleEvent; |
|
| 106 | } |
|
| 107 | ||
| 108 | return $this->calendarService->events->update($this->calendarId, $event->id, $event); |
|
| 109 | } |
|
| 110 | ||
| 111 | /** |
|
| 112 | * @param string|\Spatie\GoogleCalendar\Event $eventId |
|