class Nylas::Events
Public Instance Methods
Create an event.
@param identifier [String] Grant ID or email account in which to create the object. @param request_body [Hash] The values to create the event with. @param query_params [Hash] The query parameters to include in the request. @return [Array(Hash, String)] The created event and API Request ID.
# 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
Delete an event.
@param identifier [String] Grant ID or email account from which to delete an object. @param event_id [String] The id of the event to delete. @param query_params [Hash] The query parameters to include in the request @return [Array(TrueClass, String)] True and the API Request ID for the delete operation.
# 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
Return an event.
@param identifier [String] Grant ID or email account to query. @param event_id [String] The id of the event to return. @param query_params [Hash] The query parameters to include in the request @return [Array(Hash, String)] The event and API request ID.
# 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
Return all events.
@param identifier [String] Grant ID or email account to query. @param query_params [Hash] Query params to pass to the request. @return [Array(Array(Hash), String, String)] The list of events, API Request ID, and next cursor.
# 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. Allows users to respond to events they have been added to as an attendee.
@param identifier [String] Grant ID or email account from which to send RSVP with. @param event_id [String] The id of the event to respond to. @param request_body [Hash] The status values to send the RSVP with. @param query_params [Hash] The query parameters to include in the request @return [(Hash, String)] Response object with the API Request ID.
# 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 an event.
@param identifier [String] Grant ID or email account in which to update an object. @param event_id [String] The id of the event to update. @param request_body [Hash] The values to update the event with @param query_params [Hash] The query parameters to include in the request @return [Array(Hash, String)] The updated event and API Request ID.
# 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