Class: DemoApiScalarGalaxy::Resources::CelestialBodies
- Inherits:
-
Object
- Object
- DemoApiScalarGalaxy::Resources::CelestialBodies
- Defined in:
- lib/amritk-galaxy-staging/resources/celestial_bodies.rb,
sig/amritk-galaxy-staging/resources/celestial_bodies.rbs
Overview
Celestial bodies are the planets and satellites in the Scalar Galaxy.
Instance Method Summary collapse
-
#create(celestial_body:, request_options: {}) ⇒ DemoApiScalarGalaxy::Models::Planet, DemoApiScalarGalaxy::Models::Satellite
Create a celestial body.
-
#initialize(client:) ⇒ CelestialBodies
constructor
private
A new instance of CelestialBodies.
Constructor Details
#initialize(client:) ⇒ CelestialBodies
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 CelestialBodies.
31 32 33 |
# File 'lib/amritk-galaxy-staging/resources/celestial_bodies.rb', line 31 def initialize(client:) @client = client end |
Instance Method Details
#create(celestial_body:, request_options: {}) ⇒ DemoApiScalarGalaxy::Models::Planet, DemoApiScalarGalaxy::Models::Satellite
Create a celestial body
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/amritk-galaxy-staging/resources/celestial_bodies.rb', line 17 def create(params) parsed, = DemoApiScalarGalaxy::CelestialBodyCreateParams.dump_request(params) @client.request( method: :post, path: "celestial-bodies", body: parsed[:celestial_body], model: DemoApiScalarGalaxy::CelestialBody, options: ) end |