From 5cff3f90c7970a5b516313e108cc9343c09b5557 Mon Sep 17 00:00:00 2001 From: Mostafa Rashed <17770919+mrashed-dev@users.noreply.github.com> Date: Fri, 1 Mar 2024 12:44:39 -0500 Subject: [PATCH] Change default timeout to match API (90 seconds) --- CHANGELOG.md | 3 +++ lib/nylas/client.rb | 2 +- spec/nylas/client_spec.rb | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6aedbee7..24e8fee0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +### Unreleased +* Change default timeout to match API (90 seconds) + ### 6.0.2 / 2024-02-27 * Fixed the HTTP operation of updating grants * Fixed endpoint URL of rotating webhooks diff --git a/lib/nylas/client.rb b/lib/nylas/client.rb index bdc414e3..700d626c 100644 --- a/lib/nylas/client.rb +++ b/lib/nylas/client.rb @@ -24,7 +24,7 @@ def initialize(api_key:, timeout: nil) @api_key = api_key @api_uri = api_uri - @timeout = timeout || 30 + @timeout = timeout || 90 end # The application resources for your Nylas application. diff --git a/spec/nylas/client_spec.rb b/spec/nylas/client_spec.rb index 5e6914de..9e70f283 100644 --- a/spec/nylas/client_spec.rb +++ b/spec/nylas/client_spec.rb @@ -8,7 +8,7 @@ expect(nylas.api_key).to eq("fake-key") expect(nylas.api_uri).to eq("https://api.us.nylas.com") - expect(nylas.timeout).to eq(30) + expect(nylas.timeout).to eq(90) end end @@ -18,7 +18,7 @@ expect(nylas.api_key).to eq("fake-key") expect(nylas.api_uri).to eq("https://custom.nylas.com") - expect(nylas.timeout).to eq(30) + expect(nylas.timeout).to eq(90) end end