Giter Club home page Giter Club logo

calendly-python's Introduction

calendly-python

calendly-python is an API wrapper for Calendly, written in Python

Installing

pip install calendly-python

Usage

from calendly.client import Client
client = Client('access_token')

user_uri = client.user_uri
user_uuid = client.user_uuid
organization_uri = client.organization_uri
organization_uuid = client.organization_uuid

If you don't have access_token you can get one using Oauth2, following the next steps: Check https://developer.calendly.com/how-to-authenticate-with-oauth, for more info.

  1. Initiate client:
client = Client(client_id="client_id", client_secret="client_secret", redirect_uri="redirect_uri")
  1. Get authorization URL to get code
url = client.authorization_url()
  1. Get access token using code
response = client.get_access_token(code)
  1. Set access token
client.set_token(access_token)

If your access token expired, you can get a new one using refresh_token:

response = client.refresh_access_token(refresh_token)

And then set access token again...

Current User

current_user = client.get_current_user()

Get Scheduled Event

event = client.get_scheduled_event(event_uuid)

Webhooks

Create webhook

webhook = client.create_webhook(self, url, events, organization_uri, user_uri, scope)
# events: must be a list of valid events (check calendly API)
# scope: two options: "user" or "organization"

List webhooks

webhooks = client.list_webhooks(self, scope, organization_uri, user_uri=None)
# scope: two options: "user" or "organization"
# Note: must send user_uri if scope = "user"

Delete webhook

client.delete_webhook(webhook_uuid)

calendly-python's People

Contributors

juanrios15 avatar ingmferrer avatar mrshoikot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.