Calendly V2 support
Calendly is working on the next version of their API. Monitoring it to make it compatible with this lib
We are currently looking for exactly a lib with v2 support. Is there already a plan to implement this or would you be open to a PR which implements it?
I am planning to work on this soon, but I will definitely love a PR!
is any work on this still occuring?
I am not a Python developer but am able to use the V2 API by making some slight modification. I don't use webhooks:
Change: (utils/requests.py):
class CaRequest(object):
def __init__(self, token):
self.headers = {'authorization': token}
#self.headers = {'X-TOKEN': token}
Change: (utils/constants.py):
BASE="https://api.calendly.com/" #BASE="https://calendly.com/api/v1/" WEBHOOK=f"{BASE}/hooks" ME=f"{BASE}/users/me" ECHO=f"{BASE}/echo" #EVENTS=f"{BASE}/events"
#Added EVENT_TYPE=f"{BASE}/event_types" SCHEDULED_EVENTS=f"{BASE}/scheduled_events"
Change: (utils/constants.py):
from requests.auth import HTTPBasicAuth from json import JSONDecodeError #from calendly.utils.constants import WEBHOOK, ME, ECHO, EVENTS from calendly.utils.constants import BASE,WEBHOOK, ME, ECHO,SCHEDULED_EVENTS,EVENT_TYPE from calendly.utils.requests import CaRequest
class Calendly(object):
... ... #Updated def event_types(self): #response = self.request.get(f'{BASE}/event_types') response = self.request.get(f'{ME}/event_types') return response.json()
#added
def scheduled_events(self,queryParam):
#response = self.request.get(f'{BASE}/event_types')
#response = self.request.get(f'{SCHEDULED_EVENTS}?'+'user='+user+'status='+status+'&count=20')
response = self.request.get(f'{SCHEDULED_EVENTS}?' + queryParam)
return response.json()
#added
def scheduled_event_details(self,eventUUID,inviteeUUID):
#response = self.request.get(f'{BASE}/event_types')
#response = self.request.get(f'{SCHEDULED_EVENTS}?'+'user='+user+'status='+status+'&count=20')
response = self.request.get(f'{SCHEDULED_EVENTS}/' + eventUUID + '/invitees')#/' + inviteeUUID)
return response.json()
If you are still looking for Calendly API v2 support, I've built another package which you can make use of: https://github.com/laxmena/PyCalendly
Thanks, @chotaGit I noticed they made the V2 the main version now.