nylas 6.2.3 → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/nylas/handler/api_operations.rb +7 -6
- data/lib/nylas/handler/http_client.rb +4 -1
- data/lib/nylas/resources/events.rb +14 -0
- data/lib/nylas/utils/file_utils.rb +1 -0
- data/lib/nylas/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6aa010eb2b2938c69724103ee74d3a3898320bf31631e2d8838223ce4779a09
|
4
|
+
data.tar.gz: 0b91f115c36a87cab0ab5110eaffbe4a042168e5f2b152df4be16702a6040be9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 873debe33d40035191e712eb7239840e4343bc6180e657f25dac7c39b73dec6c597d57ce63e204358f8b266f237a2fa4b7a7f52766a07e6f2ef95f8f0cbeb8ff
|
7
|
+
data.tar.gz: efb90a1bd1930a0536b418c16de61d84bc6925e3f6fb5f9c39cde4dd77bb406dacd6fee2f7799257a3dd430e7ec9da23221ab9222d387bba75be96f806aec3e4
|
@@ -15,22 +15,23 @@ module Nylas
|
|
15
15
|
#
|
16
16
|
# @param path [String] Destination path for the call.
|
17
17
|
# @param query_params [Hash, {}] Query params to pass to the call.
|
18
|
-
# @return [Array([Hash, Array], String)] Nylas data object
|
18
|
+
# @return [Array([Hash, Array], String, Hash)] Nylas data object, API Request ID, and response headers.
|
19
19
|
def get(path:, query_params: {})
|
20
20
|
response = get_raw(path: path, query_params: query_params)
|
21
21
|
|
22
|
-
[response[:data], response[:request_id]]
|
22
|
+
[response[:data], response[:request_id], response[:headers]]
|
23
23
|
end
|
24
24
|
|
25
25
|
# Performs a GET call to the Nylas API for a list response.
|
26
26
|
#
|
27
27
|
# @param path [String] Destination path for the call.
|
28
28
|
# @param query_params [Hash, {}] Query params to pass to the call.
|
29
|
-
# @return [Array
|
29
|
+
# @return [Array<Array<Hash>, String, String, Hash>]
|
30
|
+
# Nylas data array, API Request ID, next cursor, and response headers.response headers.
|
30
31
|
def get_list(path:, query_params: {})
|
31
32
|
response = get_raw(path: path, query_params: query_params)
|
32
33
|
|
33
|
-
[response[:data], response[:request_id], response[:next_cursor]]
|
34
|
+
[response[:data], response[:request_id], response[:next_cursor], response[:headers]]
|
34
35
|
end
|
35
36
|
|
36
37
|
private
|
@@ -63,7 +64,7 @@ module Nylas
|
|
63
64
|
# @param query_params [Hash, {}] Query params to pass to the call.
|
64
65
|
# @param request_body [Hash, nil] Request body to pass to the call.
|
65
66
|
# @param headers [Hash, {}] Additional HTTP headers to include in the payload.
|
66
|
-
# @return Nylas data object
|
67
|
+
# @return [Array(Hash, String, Hash)] Nylas data object, API Request ID, and response headers.
|
67
68
|
def post(path:, query_params: {}, request_body: nil, headers: {})
|
68
69
|
response = execute(
|
69
70
|
method: :post,
|
@@ -75,7 +76,7 @@ module Nylas
|
|
75
76
|
timeout: timeout
|
76
77
|
)
|
77
78
|
|
78
|
-
[response[:data], response[:request_id]]
|
79
|
+
[response[:data], response[:request_id], response[:headers]]
|
79
80
|
end
|
80
81
|
end
|
81
82
|
|
@@ -40,7 +40,10 @@ module Nylas
|
|
40
40
|
content_type = response.headers[:content_type].downcase
|
41
41
|
end
|
42
42
|
|
43
|
-
parse_json_evaluate_error(result.code.to_i, response, path, content_type)
|
43
|
+
parsed_response = parse_json_evaluate_error(result.code.to_i, response, path, content_type)
|
44
|
+
# Include headers in the response
|
45
|
+
parsed_response[:headers] = response.headers unless parsed_response.nil?
|
46
|
+
parsed_response
|
44
47
|
end
|
45
48
|
rescue RestClient::Exceptions::OpenTimeout, RestClient::Exceptions::ReadTimeout
|
46
49
|
raise Nylas::NylasSdkTimeoutError.new(request[:path], timeout)
|
@@ -94,5 +94,19 @@ module Nylas
|
|
94
94
|
request_body: request_body
|
95
95
|
)
|
96
96
|
end
|
97
|
+
|
98
|
+
# Returns a list of recurring events, recurring event exceptions, and single events
|
99
|
+
# from the specified calendar within a given time frame. This is useful when you
|
100
|
+
# want to import, store, and synchronize events from the time frame to your application
|
101
|
+
#
|
102
|
+
# @param identifier [String] Grant ID or email account to import events from.
|
103
|
+
# @param query_params [Hash] The query parameters to include in the request
|
104
|
+
# @return [(Array(Hash), String, String)] The list of events, API Request ID, and next cursor.
|
105
|
+
def list_import_events(identifier:, query_params:)
|
106
|
+
get_list(
|
107
|
+
path: "#{api_uri}/v3/grants/#{identifier}/events/import",
|
108
|
+
query_params: query_params
|
109
|
+
)
|
110
|
+
end
|
97
111
|
end
|
98
112
|
end
|
data/lib/nylas/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nylas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nylas, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: base64
|