Class: Nylas::Events
- Includes:
 - ApiOperations::Delete, ApiOperations::Get, ApiOperations::Post, ApiOperations::Put
 
- Defined in:
 - lib/nylas/resources/events.rb
 
Overview
Nylas Events API
Instance Method Summary collapse
- 
  
    
      #create(identifier:, request_body:, query_params:)  ⇒ Array(Hash, String) 
    
    
  
  
  
  
  
  
  
  
  
    
Create an event.
 - 
  
    
      #destroy(identifier:, event_id:, query_params:)  ⇒ Array(TrueClass, String) 
    
    
  
  
  
  
  
  
  
  
  
    
Delete an event.
 - 
  
    
      #find(identifier:, event_id:, query_params:)  ⇒ Array(Hash, String) 
    
    
  
  
  
  
  
  
  
  
  
    
Return an event.
 - 
  
    
      #list(identifier:, query_params:)  ⇒ Array(Array(Hash), String, String) 
    
    
  
  
  
  
  
  
  
  
  
    
Return all events.
 - 
  
    
      #send_rsvp(identifier:, event_id:, request_body:, query_params:)  ⇒ (Hash, String) 
    
    
  
  
  
  
  
  
  
  
  
    
Send RSVP.
 - 
  
    
      #update(identifier:, event_id:, request_body:, query_params:)  ⇒ Array(Hash, String) 
    
    
  
  
  
  
  
  
  
  
  
    
Update an event.
 
Methods inherited from Resource
Constructor Details
This class inherits a constructor from Nylas::Resource
Instance Method Details
#create(identifier:, request_body:, query_params:) ⇒ Array(Hash, String)
Create an event.
      45 46 47 48 49 50 51  | 
    
      # File 'lib/nylas/resources/events.rb', line 45 def create(identifier:, request_body:, query_params:) post( path: "#{api_uri}/v3/grants/#{identifier}/events", query_params: query_params, request_body: request_body ) end  | 
  
#destroy(identifier:, event_id:, query_params:) ⇒ Array(TrueClass, String)
Delete an event.
      74 75 76 77 78 79 80 81  | 
    
      # File 'lib/nylas/resources/events.rb', line 74 def destroy(identifier:, event_id:, query_params:) _, request_id = delete( path: "#{api_uri}/v3/grants/#{identifier}/events/#{event_id}", query_params: query_params ) [true, request_id] end  | 
  
#find(identifier:, event_id:, query_params:) ⇒ Array(Hash, String)
Return an event.
      32 33 34 35 36 37  | 
    
      # File 'lib/nylas/resources/events.rb', line 32 def find(identifier:, event_id:, query_params:) get( path: "#{api_uri}/v3/grants/#{identifier}/events/#{event_id}", query_params: query_params ) end  | 
  
#list(identifier:, query_params:) ⇒ Array(Array(Hash), String, String)
Return all events.
      19 20 21 22 23 24  | 
    
      # File 'lib/nylas/resources/events.rb', line 19 def list(identifier:, query_params:) get_list( path: "#{api_uri}/v3/grants/#{identifier}/events", query_params: query_params ) end  | 
  
#send_rsvp(identifier:, event_id:, request_body:, query_params:) ⇒ (Hash, String)
Send RSVP. Allows users to respond to events they have been added to as an attendee.
      90 91 92 93 94 95 96  | 
    
      # File 'lib/nylas/resources/events.rb', line 90 def send_rsvp(identifier:, event_id:, request_body:, query_params:) post( path: "#{api_uri}/v3/grants/#{identifier}/events/#{event_id}/send-rsvp", query_params: query_params, request_body: request_body ) end  | 
  
#update(identifier:, event_id:, request_body:, query_params:) ⇒ Array(Hash, String)
Update an event.
      60 61 62 63 64 65 66  | 
    
      # File 'lib/nylas/resources/events.rb', line 60 def update(identifier:, event_id:, request_body:, query_params:) put( path: "#{api_uri}/v3/grants/#{identifier}/events/#{event_id}", query_params: query_params, request_body: request_body ) end  |