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.
-
#attachments ⇒ Nylas::Attachments
The attachments 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.
-
#connectors ⇒ Nylas::Connectors
The connector resources for your Nylas application.
-
#contacts ⇒ Nylas::Contacts
The contact resources for your Nylas application.
-
#drafts ⇒ Nylas::Drafts
The draft resources for your Nylas application.
-
#events ⇒ Nylas::Events
The event resources for your Nylas application.
-
#folders ⇒ Nylas::Folder
The folder resources for your Nylas application.
-
#grants ⇒ Nylas::Grants
The grants resources for your Nylas application.
-
#initialize(api_key:, api_uri: Config::DEFAULT_REGION_URL, timeout: nil) ⇒ Client
constructor
Initializes a client session.
-
#messages ⇒ Nylas::Messages
The message resources for your Nylas application.
-
#scheduler ⇒ Nylas::Scheduler
The Scheduler resources for your Nylas application.
-
#threads ⇒ Nylas::Threads
The thread resources for your Nylas application.
-
#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.
23 24 25 26 27 28 29 |
# File 'lib/nylas/client.rb', line 23 def initialize(api_key:, api_uri: Config::DEFAULT_REGION_URL, timeout: nil) @api_key = api_key @api_uri = api_uri @timeout = timeout || 90 end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
16 17 18 |
# File 'lib/nylas/client.rb', line 16 def api_key @api_key end |
#api_uri ⇒ Object (readonly)
Returns the value of attribute api_uri.
16 17 18 |
# File 'lib/nylas/client.rb', line 16 def api_uri @api_uri end |
#timeout ⇒ Object (readonly)
Returns the value of attribute timeout.
16 17 18 |
# File 'lib/nylas/client.rb', line 16 def timeout @timeout end |
Instance Method Details
#applications ⇒ Nylas::Applications
The application resources for your Nylas application.
34 35 36 |
# File 'lib/nylas/client.rb', line 34 def applications Applications.new(self) end |
#attachments ⇒ Nylas::Attachments
The attachments resources for your Nylas application.
41 42 43 |
# File 'lib/nylas/client.rb', line 41 def Attachments.new(self) end |
#auth ⇒ Nylas::Auth
The auth resources for your Nylas application.
48 49 50 |
# File 'lib/nylas/client.rb', line 48 def auth Auth.new(self) end |
#calendars ⇒ Nylas::Calendars
The calendar resources for your Nylas application.
55 56 57 |
# File 'lib/nylas/client.rb', line 55 def calendars Calendars.new(self) end |
#connectors ⇒ Nylas::Connectors
The connector resources for your Nylas application.
62 63 64 |
# File 'lib/nylas/client.rb', line 62 def connectors Connectors.new(self) end |
#contacts ⇒ Nylas::Contacts
The contact resources for your Nylas application.
69 70 71 |
# File 'lib/nylas/client.rb', line 69 def contacts Contacts.new(self) end |
#drafts ⇒ Nylas::Drafts
The draft resources for your Nylas application.
76 77 78 |
# File 'lib/nylas/client.rb', line 76 def drafts Drafts.new(self) end |
#events ⇒ Nylas::Events
The event resources for your Nylas application.
83 84 85 |
# File 'lib/nylas/client.rb', line 83 def events Events.new(self) end |
#folders ⇒ Nylas::Folder
The folder resources for your Nylas application.
90 91 92 |
# File 'lib/nylas/client.rb', line 90 def folders Folders.new(self) end |
#grants ⇒ Nylas::Grants
The grants resources for your Nylas application.
97 98 99 |
# File 'lib/nylas/client.rb', line 97 def grants Grants.new(self) end |
#messages ⇒ Nylas::Messages
The message resources for your Nylas application.
104 105 106 |
# File 'lib/nylas/client.rb', line 104 def Messages.new(self) end |
#scheduler ⇒ Nylas::Scheduler
The Scheduler resources for your Nylas application.
124 125 126 |
# File 'lib/nylas/client.rb', line 124 def scheduler Scheduler.new(self) end |
#threads ⇒ Nylas::Threads
The thread resources for your Nylas application.
111 112 113 |
# File 'lib/nylas/client.rb', line 111 def threads Threads.new(self) end |
#webhooks ⇒ Nylas::Webhooks
The webhook resources for your Nylas application.
118 119 120 |
# File 'lib/nylas/client.rb', line 118 def webhooks Webhooks.new(self) end |