Class: Nylas::Client
- Inherits:
-
Object
- Object
- Nylas::Client
- Defined in:
- lib/nylas/client.rb
Overview
Methods to retrieve data from the Nylas API as Ruby objects.
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
-
#api_uri ⇒ Object
readonly
Returns the value of attribute api_uri.
-
#timeout ⇒ Object
readonly
Returns the value of attribute timeout.
Instance Method Summary collapse
-
#applications ⇒ Nylas::Applications
The application resources for your Nylas application.
-
#auth ⇒ Nylas::Auth
The auth resources for your Nylas application.
-
#calendars ⇒ Nylas::Calendars
The calendar resources for your Nylas application.
-
#events ⇒ Nylas::Events
The event resources for your Nylas application.
-
#initialize(api_key:, api_uri: Config::DEFAULT_REGION_URL, timeout: nil) ⇒ Client
constructor
Initializes a client session.
-
#webhooks ⇒ Nylas::Webhooks
The webhook resources for your Nylas application.
Constructor Details
#initialize(api_key:, api_uri: Config::DEFAULT_REGION_URL, timeout: nil) ⇒ Client
Initializes a client session.
19 20 21 22 23 24 25 |
# File 'lib/nylas/client.rb', line 19 def initialize(api_key:, api_uri: Config::DEFAULT_REGION_URL, timeout: nil) @api_key = api_key @api_uri = api_uri @timeout = timeout || 30 end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
12 13 14 |
# File 'lib/nylas/client.rb', line 12 def api_key @api_key end |
#api_uri ⇒ Object (readonly)
Returns the value of attribute api_uri.
12 13 14 |
# File 'lib/nylas/client.rb', line 12 def api_uri @api_uri end |
#timeout ⇒ Object (readonly)
Returns the value of attribute timeout.
12 13 14 |
# File 'lib/nylas/client.rb', line 12 def timeout @timeout end |
Instance Method Details
#applications ⇒ Nylas::Applications
The application resources for your Nylas application.
30 31 32 |
# File 'lib/nylas/client.rb', line 30 def applications Applications.new(self) end |
#auth ⇒ Nylas::Auth
The auth resources for your Nylas application.
51 52 53 |
# File 'lib/nylas/client.rb', line 51 def auth Auth.new(self) end |
#calendars ⇒ Nylas::Calendars
The calendar resources for your Nylas application.
37 38 39 |
# File 'lib/nylas/client.rb', line 37 def calendars Calendars.new(self) end |
#events ⇒ Nylas::Events
The event resources for your Nylas application.
44 45 46 |
# File 'lib/nylas/client.rb', line 44 def events Events.new(self) end |
#webhooks ⇒ Nylas::Webhooks
The webhook resources for your Nylas application.
58 59 60 |
# File 'lib/nylas/client.rb', line 58 def webhooks Webhooks.new(self) end |