nylas / nylas-ruby

Ruby bindings for the Nylas Platform APIs
https://nylas.com/docs
MIT License
101 stars 130 forks source link

Free-busy for `emails` is not supported by the EAS provider #391

Closed anirban-tw closed 1 year ago

anirban-tw commented 2 years ago

Bug Description I am using nylas gem version 5.13.0 to fetch free_busy slots, getting the error Free-busy for 'emails' is not supported by the EAS provider with a Microsoft outlook email id.

To Reproduce The code snippet used is as follows:

nylas = Nylas::API.new(
    app_id: ...,
    app_secret: ...,
    access_token: ...
)
coll = client.free_busy(emails: ['[someid]@outlook.com'], start_time: 1668784065, end_time: 1673968065)
coll.each{ |item| puts item}

the code when executed throws the following exception:

../http_client.rb:227:in `handle_anticipated_failure_mode': Free-busy for `emails` is not supported by the EAS provider. (Nylas::InvalidRequest)

Expected behavior

Should return a list of free busy slots

SDK Version: nylas gem version 5.13.0

mrashed-dev commented 1 year ago

@anirban-tw Sorry for the delay, I did not see this issue come in. After further investigation it seems like this is the expected behaviour for this endpoint, please see the documentation here: https://developer.nylas.com/docs/api/#post/calendars/free-busy

Supported for:

  • Microsoft(EWS)
  • Gmail

Please let me know if you have any other questions!