Class: Cerca::Resources::Auth
- Inherits:
-
Object
- Object
- Cerca::Resources::Auth
- Defined in:
- lib/cerca/resources/auth.rb
Instance Method Summary collapse
-
#context(request_options: {}) ⇒ Cerca::Models::AuthContextResponse
Retrieve context.
-
#initialize(client:) ⇒ Auth
constructor
private
A new instance of Auth.
-
#list_fleets(cursor: nil, limit: nil, request_options: {}) ⇒ Cerca::Internal::FleetsCursorPage<Cerca::Models::Fleet>
Some parameter documentations has been truncated, see Models::AuthListFleetsParams for more details.
Constructor Details
#initialize(client:) ⇒ Auth
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Auth.
56 57 58 |
# File 'lib/cerca/resources/auth.rb', line 56 def initialize(client:) @client = client end |
Instance Method Details
#context(request_options: {}) ⇒ Cerca::Models::AuthContextResponse
Retrieve context
15 16 17 18 19 20 21 22 |
# File 'lib/cerca/resources/auth.rb', line 15 def context(params = {}) @client.request( method: :get, path: "auth/context", model: Cerca::AuthContextResponse, options: params[:request_options] ) end |
#list_fleets(cursor: nil, limit: nil, request_options: {}) ⇒ Cerca::Internal::FleetsCursorPage<Cerca::Models::Fleet>
Some parameter documentations has been truncated, see Models::AuthListFleetsParams for more details.
List fleets
40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/cerca/resources/auth.rb', line 40 def list_fleets(params = {}) parsed, = Cerca::AuthListFleetsParams.dump_request(params) query = Cerca::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "auth/fleets", query: query, page: Cerca::Internal::FleetsCursorPage, model: Cerca::Fleet, options: ) end |