Module: Svelte
- Defined in:
- lib/svelte.rb,
lib/svelte/path.rb,
lib/svelte/service.rb,
lib/svelte/version.rb,
lib/svelte/operation.rb,
lib/svelte/rest_client.rb,
lib/svelte/path_builder.rb,
lib/svelte/configuration.rb,
lib/svelte/model_factory.rb,
lib/svelte/swagger_builder.rb,
lib/svelte/errors/http_error.rb,
lib/svelte/errors/json_error.rb,
lib/svelte/generic_operation.rb,
lib/svelte/operation_builder.rb,
lib/svelte/string_manipulator.rb,
lib/svelte/errors/version_error.rb,
lib/svelte/errors/parameter_error.rb,
lib/svelte/model_factory/parameter.rb
Overview
Svelte is a sleek Ruby API Client generated from a Swagger spec.
You can hand it a spec which defines an path like /api/comments/{id}
that
supports a series of operations like get
, post
, delete
, and a module
name you want built (i.e. Comments
), and it will hand you a
Svelte::Service::Comments
object that can be used like so:
Defined Under Namespace
Modules: ModelFactory, StringManipulator Classes: Configuration, GenericOperation, HTTPError, JSONError, Operation, OperationBuilder, ParameterError, Path, PathBuilder, RestClient, Service, SwaggerBuilder, VersionError
Constant Summary collapse
- VERSION =
Version
'0.3.0'
Class Method Summary collapse
Class Method Details
.create(url: nil, json: nil, module_name:, options: {}) ⇒ Object
Note:
Either url
or json
need to be provided. url
will take
precedence over json
43 44 45 |
# File 'lib/svelte.rb', line 43 def self.create(url: nil, json: nil, module_name:, options: {}) Service.create(url: url, json: json, module_name: module_name, options: ) end |