Closed taylorkrause closed 1 year ago
@taylorkrause I have tried your code, with a slight modification as I don't have active_support installed
# Import your dependencies
require 'dotenv/load'
require 'nylas'
require 'ricecream'
require 'date'
# Initialize your Nylas API client
nylas = Nylas::API.new(
app_id: ENV["CLIENT_ID"],
app_secret: ENV["CLIENT_SECRET"],
access_token: ENV["ACCESS_TOKEN"]
)
found_slots = nylas.calendars.availability(
duration_minutes: 30,
interval_minutes: 30,
start_time: Time.now.to_i,
end_time: (Time.now + 21 * 24 * 60 * 60).to_i,
emails: ["swag@nylas.com"],
buffer: 0
)[:time_slots]
ic(found_slots)
And the response time for me is 0.37 seconds...
@taylorkrause Thanks for opening this issue! Unfortunately we are unable to reproduce this issue on the SDK side. Is it possible for you to open a ticket with our support team at support@nylas.com? That way the support team can investigate any possible account-related issue that's causing this latency with using the Availability API. Thanks!
Describe the bug Hello! Great library, having a lot of fun working with it so far. I have noticed some rather long wait times with the availability API. I have played around with varying the end times as to not look too far into the future for availability. This doesn't seem to have much of an affect. Are there any best practices around speeding this endpoint up?
To Reproduce
Expected behavior This query can sometimes take up to 30 seconds to complete with the bulk of the time surrounding the availability api.
SDK Version: 5.14
Additional context Dialing back the end_time has no big effect on the time it takes to get a response back.