Class: Nylas::RedirectUris
- Includes:
- ApiOperations::Delete, ApiOperations::Get, ApiOperations::Post, ApiOperations::Put
- Defined in:
- lib/nylas/resources/redirect_uris.rb
Overview
A collection of redirect URI related API endpoints.
Instance Method Summary collapse
-
#create(request_body:) ⇒ Array(Hash, String)
Create a redirect uri.
-
#destroy(redirect_uri_id:) ⇒ Array(TrueClass, String)
Delete a redirect uri.
-
#find(redirect_uri_id:) ⇒ Array(Hash, String)
Return a redirect uri.
-
#list ⇒ Array(Array(Hash), String)
Return all redirect uris.
-
#update(redirect_uri_id:, request_body:) ⇒ Array(Hash, String)
Update a redirect uri.
Methods inherited from Resource
Constructor Details
This class inherits a constructor from Nylas::Resource
Instance Method Details
#create(request_body:) ⇒ Array(Hash, String)
Create a redirect uri.
37 38 39 40 41 42 |
# File 'lib/nylas/resources/redirect_uris.rb', line 37 def create(request_body:) post( path: "#{api_uri}/v3/applications/redirect-uris", request_body: request_body ) end |
#destroy(redirect_uri_id:) ⇒ Array(TrueClass, String)
Delete a redirect uri.
60 61 62 63 64 65 66 |
# File 'lib/nylas/resources/redirect_uris.rb', line 60 def destroy(redirect_uri_id:) _, request_id = delete( path: "#{api_uri}/v3/applications/redirect-uris/#{redirect_uri_id}" ) [true, request_id] end |
#find(redirect_uri_id:) ⇒ Array(Hash, String)
Return a redirect uri.
27 28 29 30 31 |
# File 'lib/nylas/resources/redirect_uris.rb', line 27 def find(redirect_uri_id:) get( path: "#{api_uri}/v3/applications/redirect-uris/#{redirect_uri_id}" ) end |
#list ⇒ Array(Array(Hash), String)
Return all redirect uris.
17 18 19 20 21 |
# File 'lib/nylas/resources/redirect_uris.rb', line 17 def list get( path: "#{api_uri}/v3/applications/redirect-uris" ) end |
#update(redirect_uri_id:, request_body:) ⇒ Array(Hash, String)
Update a redirect uri.
49 50 51 52 53 54 |
# File 'lib/nylas/resources/redirect_uris.rb', line 49 def update(redirect_uri_id:, request_body:) put( path: "#{api_uri}/v3/applications/redirect-uris/#{redirect_uri_id}", request_body: request_body ) end |