From 6efac8f7cd949a961eff06a41725d1d8b1223027 Mon Sep 17 00:00:00 2001 From: Subash Pradhan Date: Mon, 4 Nov 2024 11:54:14 +0100 Subject: [PATCH] Add select field to folders find method --- CHANGELOG.md | 5 +++++ lib/nylas/resources/folders.rb | 5 +++-- spec/nylas/resources/folders_spec.rb | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4bbad76f..afed4550 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +### Unreleased +* Added support for scheduler APIs +* Added `select` field to `Folders` find + + ### 6.2.0 / 2024-09-24 * Added query support for folders * Added dependency on `ostruct` gem diff --git a/lib/nylas/resources/folders.rb b/lib/nylas/resources/folders.rb index 886f9469..a891bc7d 100644 --- a/lib/nylas/resources/folders.rb +++ b/lib/nylas/resources/folders.rb @@ -28,9 +28,10 @@ def list(identifier:, query_params: nil) # @param identifier [String] Grant ID or email account to query. # @param folder_id [String] The id of the folder to return. # @return [Array(Hash, String)] The folder and API request ID. - def find(identifier:, folder_id:) + def find(identifier:, folder_id:, query_params: nil) get( - path: "#{api_uri}/v3/grants/#{identifier}/folders/#{folder_id}" + path: "#{api_uri}/v3/grants/#{identifier}/folders/#{folder_id}", + query_params: query_params ) end diff --git a/spec/nylas/resources/folders_spec.rb b/spec/nylas/resources/folders_spec.rb index daa8c20a..92762d2e 100644 --- a/spec/nylas/resources/folders_spec.rb +++ b/spec/nylas/resources/folders_spec.rb @@ -42,7 +42,7 @@ folder_id = "5d3qmne77v32r8l4phyuksl2x" path = "#{api_uri}/v3/grants/#{identifier}/folders/#{folder_id}" allow(folders).to receive(:get) - .with(path: path) + .with(path: path, query_params: nil) .and_return(response) folder_response = folders.find(identifier: identifier, folder_id: folder_id)