From b7a13dfb1135793fff7f724d900a4ab6f606186b Mon Sep 17 00:00:00 2001 From: Mostafa Rashed <17770919+mrashed-dev@users.noreply.github.com> Date: Tue, 24 Sep 2024 11:43:47 -0400 Subject: [PATCH 1/3] add query params to list folders --- lib/nylas/resources/folders.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/nylas/resources/folders.rb b/lib/nylas/resources/folders.rb index 963a7d33..886f9469 100644 --- a/lib/nylas/resources/folders.rb +++ b/lib/nylas/resources/folders.rb @@ -14,10 +14,12 @@ class Folders < Resource # Return all folders. # # @param identifier [String] Grant ID or email account to query. + # @param query_params [Hash, nil] Query params to pass to the request. # @return [Array(Array(Hash), String, String)] The list of folders, API Request ID, and next cursor. - def list(identifier:) + def list(identifier:, query_params: nil) get_list( - path: "#{api_uri}/v3/grants/#{identifier}/folders" + path: "#{api_uri}/v3/grants/#{identifier}/folders", + query_params: query_params ) end From 315abd37ab111d2166c3a41ffef91ae124361999 Mon Sep 17 00:00:00 2001 From: Mostafa Rashed <17770919+mrashed-dev@users.noreply.github.com> Date: Tue, 24 Sep 2024 11:44:17 -0400 Subject: [PATCH 2/3] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a8bd97b..473394fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ### Unreleased +* Added query support for folders * Enable SDK to reattach large files to messages on retry ### 6.1.1 / 2024-08-20 From 133e343585db6ced76003a00edf7a24bfc34f62f Mon Sep 17 00:00:00 2001 From: Mostafa Rashed <17770919+mrashed-dev@users.noreply.github.com> Date: Tue, 24 Sep 2024 12:47:00 -0400 Subject: [PATCH 3/3] fix CI --- spec/nylas/resources/folders_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/nylas/resources/folders_spec.rb b/spec/nylas/resources/folders_spec.rb index 8c6e40c8..daa8c20a 100644 --- a/spec/nylas/resources/folders_spec.rb +++ b/spec/nylas/resources/folders_spec.rb @@ -27,7 +27,7 @@ identifier = "abc-123-grant-id" path = "#{api_uri}/v3/grants/#{identifier}/folders" allow(folders).to receive(:get_list) - .with(path: path) + .with(path: path, query_params: nil) .and_return(list_response) folders_response = folders.list(identifier: identifier)