Coder Social home page Coder Social logo

calendly-api-ruby-client's Introduction

calendly-api-ruby-client's People

Contributors

ismael-texidor avatar jameswilliamiii avatar koshilife avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

calendly-api-ruby-client's Issues

support new UUID format

refs #37

Calendly has updated their UUID format that uses "-" and so the regex that was used to identify the UUID was not working. I have updated the regex to be able to identify a UUID like "3d9c2990-e847-458d-95dc-e1cf6a7ec745".

Following is a quote of the official release note.

October 2021 Updates
UUID format is now updated

We've updated the length and formatting of UUID to 255 characters and ASCII for newly created Users and Organizations. This change will not affect existing UUIDs. As mentioned in our API Conventions, we recommend using URI to identify the resources instead of an ID to avoid any disruption to your integrations.

save fetched data in cache

Problem

The fetched data has not been saved, so there are wasted request to same resources.
Such as following case.

>> client.me
D, [2020-09-19T01:26:19.101929 #10577] DEBUG -- : Request GET https://api.calendly.com/users/me params:, body:
=> #<Calendly::User uuid:USER001>

>> client.me
D, [2020-09-19T01:26:21.245822 #10577] DEBUG -- : Request GET https://api.calendly.com/users/me params:, body:
=> #<Calendly::User uuid:USER001>

support for new Routing Form APIs

We are going to support the following new Routing Forms API.

Release Notes July 9:
We have added the routing_form_submission.created webhook subscription to allow users to be notified and take appropriate action based on form details when a routing form is submitted. The routing_form_submission.created webhook payload contains the Routing Form Submission resource and the routing form submission link is now included in the Invitee resource. In addition to the Webhook, we have also added complementary APIs to retrieve the Routing Form details

catch up API Updates since January 2021

Since January 2021, some new API features and new fields are available like following according to official release notes.

This library will catch up and support these updates.

■January 2021 Updates
Event Resource includes additional guests

The event resource will now include the email addresses of any additional guests the invitee adds while booking the event. The event resource is included in the response from the .

Invitee model includes cancellation event

When an invitee is canceled, the person who canceled the invitee and any reason provided is included in the .

■February 2021 Updates
Event type endpoint includes organization parameter

Authenticated Calendly owners and admins can make a call to using the optional organization parameter to return event types across all users in the Calendly organization. To get the organization parameter related to the authenticated owner or admin, they can make a call to this using the user parameter.

Invitee model includes payment amount

When a Calendly user connects a payment integration to collect payment at the time an event is scheduled, the amount the invitee paid will be included in the .

support New 'cancellation' object in the response of scheduled event endpoints

We are going to support the following updates.

February 2022 Updates https://developer.calendly.com/release-notes

New 'cancellation' object in the response of scheduled event endpoints
We have enhanced (below) scheduled events endpoint and added a new cancellation object in the response. This object is also included in the Webhook payload.

- https://developer.calendly.com/api-docs/b3A6NTkxNDEx-list-event-invitees
- https://developer.calendly.com/api-docs/b3A6NTkxNDEy-list-events
- https://developer.calendly.com/api-docs/b3A6NTkxNDE1-get-event-invitee
- https://developer.calendly.com/api-docs/b3A6NTkxNDE2-get-event


- Object:
  - `cancellation` object. Provides data pertaining to the cancellation of the Event
  - `canceled_by` string required.
  - `reason` string required.
  - `canceler_type` string required. Allowed values: host, invitee

support for new Cancel Event API

We are going to support the following new Cancel Event API.

Release Notes APRIL 28:
Enable meeting cancellation functionality with our new Cancel Event API
Implement meeting cancellation functionality within external products to enable hosts to cancel a scheduled meeting using our new Cancel Event API.

Host(Organiser) details of Invitee registration

Hi, Since there are multiple event types, suppose there is an Round robin event, and Upon registration (#event_invitee) which returns Calendly::Invitee

Is there a way, I could know the assigned host(member) out of the registration
If the event is One to One, then I maybe get the host details from the Event

But in case of Round Robin Event types, I would like to know the Host for a meetin

I was not able to see any instance method which brings such details

Thanks in advanced

support a new response parameter `admin_managed` in List User's Event Types and Get Event Type

We are thinking about supporting the following updates

Release Notes NOVEMBER 18
Identify Managed Event Types when returning list of Event Types for a given user
We have added a new response parameter (admin_managed) in List User's Event Types and Get Event Type APIs. Developers can use this parameter to identify if an Event Type is a Managed Event Type assigned to that user or if it’s their personal Event Type.

Fetching scheduled event fails

When calling client.scheduled_event it should return an event as per

Event.new body[:resource], self

However I get the following error:

NameError: uninitialized constant Calendly::Client::Event
Did you mean?  FSEvent
    app/models/calendly_client.rb:22:in `get_event_from_uri'
    app/controllers/calendly_webhook_controller.rb:36:in `receive'
    lib/jumpstart/lib/jumpstart/account_middleware.rb:30:in `call'
    test/controllers/calendly_webhook_controller_test.rb:64:in `block (3 levels) in <class:CalendlyWebhookControllerTest>'
    test/controllers/calendly_webhook_controller_test.rb:68:in `block (3 levels) in <class:CalendlyWebhookControllerTest>'

This looks to be an issue with autloading...

> Zeitwerk::Loader.eager_load_all
NameError: uninitialized constant Calendly::OrganizationMembership::ModelUtils

support for new Availability Schedules APIs

We are thinking about supporting the following new List User Availability Schedules, Get User Availability Schedules, and List User Busy Times.

Release Notes Oct. 20:
User Calendar Availability
We have added three new APIs - List User Availability Schedules, Get User Availability Schedules and List User Busy Times. With these APIs, developers are able to view user’s schedules including override dates and ‘busy times’ (scheduled external meetings and Calendly meetings). Use this information to get total available (or booked) hours for a given user for a given period of time. These APIs will also enable developers to create ‘calendar view’ within their product.

debug log writing failed. "\xE7" from ASCII-8BIT to UTF-8

version 0.5.2

When debug logging is enable in some response data, sometimes logging failed.
I confirmed to reproduce when user profile name set 田中 太郎 (Japanese).

Screen Shot 2021-05-26 at 14 03 31

procedure for reproducing

> Calendly::VERSION
=> "0.5.2"
> Calendly.configuration.logger.level = :debug
> client = Calendly::Client.new token
> client.me
D, [2021-05-26T13:37:54.100172 #13508] DEBUG -- : Request GET https://api.calendly.com/users/me params:, body:
log writing failed. "\xE7" from ASCII-8BIT to UTF-8

we will consider to use String#force_encoding.

NoMethodError (undefined method `values_at' for nil:NilClass)

Hi @koshilife
I have setup a client object by passing my "personal access token" to the class using
client = Calendly::Client.new token

when I perform client.me It returns below error

By the way, Thanks for making such client

By the way
My Ruby version: 2.7.5
Faraday: 0.15.4

WARNING: No adapter was configured for this request
Traceback (most recent call last):
        1: from (irb):13
NoMethodError (undefined method `values_at' for nil:NilClass)

catch up API changes, added Cancel and Reschedule URLs to the Invitee Resource and Getting All Events in an Org

New APIs have been announced, so we will catch up it.

The announcement about the APIs from Calendly is below.

support for Activity Log API

We are thinking about supporting the following new Activity Log API.

Release Notes Sep 7:
We have added an API to retrieve the activity log data we have available in the product. IT Security teams & developers (with admin authorization) can use this api to retrieve user activity for a specific category or action for a given period of time. Customers can utilize this API for audit log archiving and retention purposes and for integration with a SIEM (Security information and event management). Read our help center article for more information.Note: This API is only available to Calendly enterprise customers

support for filtering Event Types by 'active' or 'inactive' status

We are going to support the following updates.

February 2022 Updates https://developer.calendly.com/release-notes

Filter Event Types by 'active' or 'inactive' status
We have enhanced our GET /event_types API with an ability to return only ‘active’ or ‘inactive’ Event Types by adding optional query parameters in the request. Default (current) action in the request without active query parameter will return both ‘active’ and ‘inactive’ Event Types.

- /event_types API
  - https://developer.calendly.com/api-docs/b3A6NTkxNDEz-list-user-s-event-types

- Query Parameter:
  - active boolean

Return only active event types if true, only inactive if false, or all event types if this parameter is omitted.

support for new no show APIs

We are going to support the following updates.

March 2022 Updates https://developer.calendly.com/release-notes

Sync Invitee No-Show information

You can now sync invitee no-show information for a scheduled events using our new no-show APIs.
View who were marked no-show among list of invitees for a given scheduled events.

Object: no_show

Provides data pertaining to the associated no show for the Invitee

uri string required

Canonical reference (unique identifier) for the no show

created_at string <date-time> required

The moment when the no show was created

Example:2019-01-02T03:04:05.678Z

CI has failed with a new major version of oauth2

I realized some CI has failed like the following actions.

I compared the dependencies libs versions with the last succeeded CI and failed one.
And then, oauth2 had released new major version series 2.x a couple of weeks ago.
As a test, I tried to specify the oauth2 version set 1.x series, so the CI passed.

We need to catch up on the oauth2 updates, and we'll think about how to fix this.

<Next version 0.5.0>Fetching scheduled events in an org fails

I'm going to support an organization option in scheduled events API.

When using organization options and other option such as count or invitee_email in one request, the fetching events request failed.

commit: 8656367 on feature-branch for #21

case1 (organization and count)

When using organization and count options, fetching second page was fail then I received 400 http status.
The request and response log is following.

> org.scheduled_events!({count: 2})

# fetching a first page succeeded.
D, [2020-11-27T09:23:26.973580 #3949] DEBUG -- : Request GET https://api.calendly.com/scheduled_events params:{:organization=>"https://api.calendly.com/organizations/MY_ORG_ID", :count=>2}, body:
D, [2020-11-27T09:23:29.569397 #3949] DEBUG -- : Response status:200, body:{"collection":[{"created_at":"2020-11-20T13:00:37.590394Z","end_time":"2020-11-25T00:15:00.000000Z","event_type":"https://api.calendly.com/event_types/MY_EVENT_TYPE01","invitees_counter":{"active":1,"limit":1,"total":1},"location":{"data":{"audioConferencing":{"conferenceId":null,"dialinUrl":null,"tollNumber":null}},"join_url":"https://calendly.com/events/MY_EV_01/microsoft_teams","status":"pushed","type":"microsoft_teams_conference"},"name":"15 Minute Meeting","start_time":"2020-11-25T00:00:00.000000Z","status":"active","updated_at":"2020-11-20T13:00:48.110315Z","uri":"https://api.calendly.com/scheduled_events/MY_EV_01"},{"created_at":"2020-11-26T11:33:06.823021Z","end_time":"2020-11-30T02:00:00.000000Z","event_type":"https://api.calendly.com/event_types/MY_EVENT_TYPE01","invitees_counter":{"active":3,"limit":3,"total":3},"location":{"data":{"id":79843894707,"settings":{},"password":"cmA95E","extra":null},"join_url":"zoom-url(masked)","status":"pushed","type":"zoom"},"name":"Zoom Testing","start_time":"2020-11-30T01:30:00.000000Z","status":"active","updated_at":"2020-11-26T11:33:40.809932Z","uri":"https://api.calendly.com/scheduled_events/MY_EV_02"}],"pagination":{"count":2,"next_page":"https://api.calendly.com/scheduled_events?count=2&page_token=uXW24hNnuJ-4GkDNBXIOePFlihmp8RzI"}}

# fetching a second page failed.
D, [2020-11-27T09:23:29.570359 #3949] DEBUG -- : Request GET https://api.calendly.com/scheduled_events params:{:organization=>"https://api.calendly.com/organizations/MY_ORG_ID", :count=>"2", :page_token=>"uXW24hNnuJ-4GkDNBXIOePFlihmp8RzI"}, body:
W, [2020-11-27T09:23:34.585369 #3949]  WARN -- : Calendly::ApiError occured. status:400 message:The supplied parameters are invalid.

case2 (organization and invitee_email)

When using organization and invitee_email options, 500 http status and html was returned.
The request and response log is following.

> org.scheduled_events!({invitee_email: '[email protected]'})

D, [2020-11-27T09:21:01.363364 #3949] DEBUG -- : Request GET https://api.calendly.com/scheduled_events params:{:organization=>"https://api.calendly.com/organizations/MY_ORG_ID", :invitee_email=>"[email protected]"}, body:
W, [2020-11-27T09:21:01.727555 #3949]  WARN -- : Calendly::ApiError occured. status:500 message:<!DOCTYPE html>
<html>
<head>
<title>Calendly</title>
<meta charset='utf-8'>
<meta content='width=device-width' name='viewport'>
...

uuid is required

Since the latest gem calendly api release and since this gem was updated I have been getting this error:
<Calendly::Error: uuid is required.>
I have not been able to pinpoint the cause and I was wondering if this is an issue because of the update. Is there a way around this?

This is occurring when trying to delete a webhook.
I am getting the webhooks for my organization and I get one WebhookSubscription and this webhook has a nil uuid. When I try to delete the webhook that is when I get the error message:
Calendly::Error Exception: uuid is required.

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.