class Nylas::Connectors
Nylas
Connectors
API
Attributes
Access the Credentials
API
Public Class Methods
Initializes Connectors
.
# File lib/nylas/resources/connectors.rb, line 18 def initialize(sdk_instance) super(sdk_instance) @credentials = Credentials.new(sdk_instance) end
Public Instance Methods
Create a connector.
@param request_body [Hash] The values to create the connector with. @return [Array(Hash, String)] The created connector and API Request ID.
# File lib/nylas/resources/connectors.rb, line 49 def create(request_body:) post( path: "#{api_uri}/v3/connectors", request_body: request_body ) end
Delete a connector.
@param provider [String] The provider associated to the connector to delete. @return [Array(TrueClass, String)] True and the API Request ID for the delete operation.
# File lib/nylas/resources/connectors.rb, line 72 def destroy(provider:) _, request_id = delete( path: "#{api_uri}/v3/connectors/#{provider}" ) [true, request_id] end
Return a connector.
@param provider [String] The provider associated to the connector to retrieve. @return [Array(Hash, String)] The connector and API request ID.
# File lib/nylas/resources/connectors.rb, line 39 def find(provider:) get( path: "#{api_uri}/v3/connectors/#{provider}" ) end
Return all connectors.
@param query_params [Hash, nil] Query params to pass to the request. @return [Array(Array(Hash), String)] The list of connectors and API Request ID.
# File lib/nylas/resources/connectors.rb, line 28 def list(query_params: nil) get( path: "#{api_uri}/v3/connectors", query_params: query_params ) end
Update a connector.
@param provider [String] The provider associated to the connector to update. @param request_body [Hash] The values to update the connector with @return [Array(Hash, String)] The updated connector and API Request ID.
# File lib/nylas/resources/connectors.rb, line 61 def update(provider:, request_body:) patch( path: "#{api_uri}/v3/connectors/#{provider}", request_body: request_body ) end