Skip to content

Commit

Permalink
Add select field to folders find method
Browse files Browse the repository at this point in the history
  • Loading branch information
Subash Pradhan committed Nov 4, 2024
1 parent 03ec00b commit 6efac8f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 3 additions & 2 deletions lib/nylas/resources/folders.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion spec/nylas/resources/folders_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6efac8f

Please sign in to comment.