# moonlogs-ruby MoonlogsRuby - the Ruby gem for the Moonlogs Moonlogs API This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: - API version: 0.3.6 - Package version: 0.3.6 - Build package: io.swagger.codegen.v3.generators.ruby.RubyClientCodegen ## Installation ### Build a gem To build the Ruby code into a gem: ```shell gem build moonlogs-ruby.gemspec ``` Then either install the gem locally: ```shell gem install ./moonlogs-ruby-0.3.6.gem ``` (for development, run `gem install --dev ./moonlogs-ruby-0.3.6.gem` to install the development dependencies) or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/). Finally add this to the Gemfile: gem 'moonlogs-ruby', '~> 0.3.6' ### Install from Git If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile: gem 'moonlogs-ruby', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git' ### Include the Ruby code directly Include the Ruby code directly using `-I` as follows: ```shell ruby -Ilib script.rb ``` ## Getting Started Please follow the [installation](#installation) procedure and then run the following code: ```ruby # Load the gem require 'moonlogs-ruby' # Setup authorization MoonlogsRuby.configure do |config| end api_instance = MoonlogsRuby::DefaultApi.new begin result = api_instance.api_api_tokens_get p result rescue MoonlogsRuby::ApiError => e puts "Exception when calling DefaultApi->api_api_tokens_get: #{e}" end # Setup authorization MoonlogsRuby.configure do |config| end api_instance = MoonlogsRuby::DefaultApi.new id = 56 # Integer | begin result = api_instance.api_api_tokens_id_delete(id) p result rescue MoonlogsRuby::ApiError => e puts "Exception when calling DefaultApi->api_api_tokens_id_delete: #{e}" end # Setup authorization MoonlogsRuby.configure do |config| end api_instance = MoonlogsRuby::DefaultApi.new id = 56 # Integer | begin result = api_instance.api_api_tokens_id_get(id) p result rescue MoonlogsRuby::ApiError => e puts "Exception when calling DefaultApi->api_api_tokens_id_get: #{e}" end # Setup authorization MoonlogsRuby.configure do |config| end api_instance = MoonlogsRuby::DefaultApi.new id = 56 # Integer | opts = { body: MoonlogsRuby::ApiToken.new # ApiToken | } begin result = api_instance.api_api_tokens_id_put(id, opts) p result rescue MoonlogsRuby::ApiError => e puts "Exception when calling DefaultApi->api_api_tokens_id_put: #{e}" end # Setup authorization MoonlogsRuby.configure do |config| end api_instance = MoonlogsRuby::DefaultApi.new opts = { body: MoonlogsRuby::ApiToken.new # ApiToken | } begin result = api_instance.api_api_tokens_post(opts) p result rescue MoonlogsRuby::ApiError => e puts "Exception when calling DefaultApi->api_api_tokens_post: #{e}" end # Setup authorization MoonlogsRuby.configure do |config| end api_instance = MoonlogsRuby::DefaultApi.new opts = { page: 56, # Integer | limit: 56 # Integer | } begin result = api_instance.api_logs_get(opts) p result rescue MoonlogsRuby::ApiError => e puts "Exception when calling DefaultApi->api_logs_get: #{e}" end # Setup authorization MoonlogsRuby.configure do |config| end api_instance = MoonlogsRuby::DefaultApi.new schema_name = 'schema_name_example' # String | hash = 'hash_example' # String | begin result = api_instance.api_logs_group_schema_name_hash_get(schema_name, hash) p result rescue MoonlogsRuby::ApiError => e puts "Exception when calling DefaultApi->api_logs_group_schema_name_hash_get: #{e}" end # Setup authorization MoonlogsRuby.configure do |config| end api_instance = MoonlogsRuby::DefaultApi.new id = 56 # Integer | begin result = api_instance.api_logs_id_get(id) p result rescue MoonlogsRuby::ApiError => e puts "Exception when calling DefaultApi->api_logs_id_get: #{e}" end # Setup authorization MoonlogsRuby.configure do |config| end api_instance = MoonlogsRuby::DefaultApi.new opts = { body: MoonlogsRuby::Record.new # Record | } begin result = api_instance.api_logs_post(opts) p result rescue MoonlogsRuby::ApiError => e puts "Exception when calling DefaultApi->api_logs_post: #{e}" end # Setup authorization MoonlogsRuby.configure do |config| end api_instance = MoonlogsRuby::DefaultApi.new opts = { body: MoonlogsRuby::Record.new, # Record | page: 56, # Integer | limit: 56, # Integer | from: 'from_example', # String | Time in format \"YYYY-DD-MMTHH:SS\" to: 'to_example' # String | Time in format \"YYYY-DD-MMTHH:SS\" } begin result = api_instance.api_logs_search_post(opts) p result rescue MoonlogsRuby::ApiError => e puts "Exception when calling DefaultApi->api_logs_search_post: #{e}" end # Setup authorization MoonlogsRuby.configure do |config| end api_instance = MoonlogsRuby::DefaultApi.new begin result = api_instance.api_schemas_get p result rescue MoonlogsRuby::ApiError => e puts "Exception when calling DefaultApi->api_schemas_get: #{e}" end # Setup authorization MoonlogsRuby.configure do |config| end api_instance = MoonlogsRuby::DefaultApi.new id = 56 # Integer | begin result = api_instance.api_schemas_id_delete(id) p result rescue MoonlogsRuby::ApiError => e puts "Exception when calling DefaultApi->api_schemas_id_delete: #{e}" end # Setup authorization MoonlogsRuby.configure do |config| end api_instance = MoonlogsRuby::DefaultApi.new id = 56 # Integer | begin result = api_instance.api_schemas_id_get(id) p result rescue MoonlogsRuby::ApiError => e puts "Exception when calling DefaultApi->api_schemas_id_get: #{e}" end # Setup authorization MoonlogsRuby.configure do |config| end api_instance = MoonlogsRuby::DefaultApi.new id = 56 # Integer | opts = { body: MoonlogsRuby::Schema.new # Schema | } begin result = api_instance.api_schemas_id_put(id, opts) p result rescue MoonlogsRuby::ApiError => e puts "Exception when calling DefaultApi->api_schemas_id_put: #{e}" end # Setup authorization MoonlogsRuby.configure do |config| end api_instance = MoonlogsRuby::DefaultApi.new opts = { body: MoonlogsRuby::Schema.new # Schema | } begin result = api_instance.api_schemas_post(opts) p result rescue MoonlogsRuby::ApiError => e puts "Exception when calling DefaultApi->api_schemas_post: #{e}" end api_instance = MoonlogsRuby::DefaultApi.new begin result = api_instance.api_session_get p result rescue MoonlogsRuby::ApiError => e puts "Exception when calling DefaultApi->api_session_get: #{e}" end api_instance = MoonlogsRuby::DefaultApi.new opts = { body: MoonlogsRuby::Credentials.new # Credentials | } begin result = api_instance.api_session_post(opts) p result rescue MoonlogsRuby::ApiError => e puts "Exception when calling DefaultApi->api_session_post: #{e}" end api_instance = MoonlogsRuby::DefaultApi.new opts = { body: MoonlogsRuby::User.new # User | } begin result = api_instance.api_setup_register_admin_post(opts) p result rescue MoonlogsRuby::ApiError => e puts "Exception when calling DefaultApi->api_setup_register_admin_post: #{e}" end # Setup authorization MoonlogsRuby.configure do |config| end api_instance = MoonlogsRuby::DefaultApi.new begin result = api_instance.api_tags_get p result rescue MoonlogsRuby::ApiError => e puts "Exception when calling DefaultApi->api_tags_get: #{e}" end # Setup authorization MoonlogsRuby.configure do |config| end api_instance = MoonlogsRuby::DefaultApi.new id = 56 # Integer | begin result = api_instance.api_tags_id_delete(id) p result rescue MoonlogsRuby::ApiError => e puts "Exception when calling DefaultApi->api_tags_id_delete: #{e}" end # Setup authorization MoonlogsRuby.configure do |config| end api_instance = MoonlogsRuby::DefaultApi.new id = 56 # Integer | begin result = api_instance.api_tags_id_get(id) p result rescue MoonlogsRuby::ApiError => e puts "Exception when calling DefaultApi->api_tags_id_get: #{e}" end # Setup authorization MoonlogsRuby.configure do |config| end api_instance = MoonlogsRuby::DefaultApi.new id = 56 # Integer | opts = { body: MoonlogsRuby::Tag.new # Tag | } begin result = api_instance.api_tags_id_put(id, opts) p result rescue MoonlogsRuby::ApiError => e puts "Exception when calling DefaultApi->api_tags_id_put: #{e}" end # Setup authorization MoonlogsRuby.configure do |config| end api_instance = MoonlogsRuby::DefaultApi.new opts = { body: MoonlogsRuby::Tag.new # Tag | } begin result = api_instance.api_tags_post(opts) p result rescue MoonlogsRuby::ApiError => e puts "Exception when calling DefaultApi->api_tags_post: #{e}" end # Setup authorization MoonlogsRuby.configure do |config| end api_instance = MoonlogsRuby::DefaultApi.new begin result = api_instance.api_users_get p result rescue MoonlogsRuby::ApiError => e puts "Exception when calling DefaultApi->api_users_get: #{e}" end # Setup authorization MoonlogsRuby.configure do |config| end api_instance = MoonlogsRuby::DefaultApi.new id = 56 # Integer | begin result = api_instance.api_users_id_delete(id) p result rescue MoonlogsRuby::ApiError => e puts "Exception when calling DefaultApi->api_users_id_delete: #{e}" end # Setup authorization MoonlogsRuby.configure do |config| end api_instance = MoonlogsRuby::DefaultApi.new id = 56 # Integer | begin result = api_instance.api_users_id_get(id) p result rescue MoonlogsRuby::ApiError => e puts "Exception when calling DefaultApi->api_users_id_get: #{e}" end # Setup authorization MoonlogsRuby.configure do |config| end api_instance = MoonlogsRuby::DefaultApi.new id = 56 # Integer | opts = { body: MoonlogsRuby::User.new # User | } begin result = api_instance.api_users_id_put(id, opts) p result rescue MoonlogsRuby::ApiError => e puts "Exception when calling DefaultApi->api_users_id_put: #{e}" end # Setup authorization MoonlogsRuby.configure do |config| end api_instance = MoonlogsRuby::DefaultApi.new opts = { body: MoonlogsRuby::User.new # User | } begin result = api_instance.api_users_post(opts) p result rescue MoonlogsRuby::ApiError => e puts "Exception when calling DefaultApi->api_users_post: #{e}" end ``` ## Documentation for API Endpoints All URIs are relative to */* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *MoonlogsRuby::DefaultApi* | [**api_api_tokens_get**](docs/DefaultApi.md#api_api_tokens_get) | **GET** /api/api_tokens | *MoonlogsRuby::DefaultApi* | [**api_api_tokens_id_delete**](docs/DefaultApi.md#api_api_tokens_id_delete) | **DELETE** /api/api_tokens/{id} | *MoonlogsRuby::DefaultApi* | [**api_api_tokens_id_get**](docs/DefaultApi.md#api_api_tokens_id_get) | **GET** /api/api_tokens/{id} | *MoonlogsRuby::DefaultApi* | [**api_api_tokens_id_put**](docs/DefaultApi.md#api_api_tokens_id_put) | **PUT** /api/api_tokens/{id} | *MoonlogsRuby::DefaultApi* | [**api_api_tokens_post**](docs/DefaultApi.md#api_api_tokens_post) | **POST** /api/api_tokens | *MoonlogsRuby::DefaultApi* | [**api_logs_get**](docs/DefaultApi.md#api_logs_get) | **GET** /api/logs | *MoonlogsRuby::DefaultApi* | [**api_logs_group_schema_name_hash_get**](docs/DefaultApi.md#api_logs_group_schema_name_hash_get) | **GET** /api/logs/group/{schema_name}/{hash} | *MoonlogsRuby::DefaultApi* | [**api_logs_id_get**](docs/DefaultApi.md#api_logs_id_get) | **GET** /api/logs/{id} | *MoonlogsRuby::DefaultApi* | [**api_logs_post**](docs/DefaultApi.md#api_logs_post) | **POST** /api/logs | *MoonlogsRuby::DefaultApi* | [**api_logs_search_post**](docs/DefaultApi.md#api_logs_search_post) | **POST** /api/logs/search | *MoonlogsRuby::DefaultApi* | [**api_schemas_get**](docs/DefaultApi.md#api_schemas_get) | **GET** /api/schemas | *MoonlogsRuby::DefaultApi* | [**api_schemas_id_delete**](docs/DefaultApi.md#api_schemas_id_delete) | **DELETE** /api/schemas/{id} | *MoonlogsRuby::DefaultApi* | [**api_schemas_id_get**](docs/DefaultApi.md#api_schemas_id_get) | **GET** /api/schemas/{id} | *MoonlogsRuby::DefaultApi* | [**api_schemas_id_put**](docs/DefaultApi.md#api_schemas_id_put) | **PUT** /api/schemas/{id} | *MoonlogsRuby::DefaultApi* | [**api_schemas_post**](docs/DefaultApi.md#api_schemas_post) | **POST** /api/schemas | *MoonlogsRuby::DefaultApi* | [**api_session_get**](docs/DefaultApi.md#api_session_get) | **GET** /api/session | *MoonlogsRuby::DefaultApi* | [**api_session_post**](docs/DefaultApi.md#api_session_post) | **POST** /api/session | *MoonlogsRuby::DefaultApi* | [**api_setup_register_admin_post**](docs/DefaultApi.md#api_setup_register_admin_post) | **POST** /api/setup/register_admin | *MoonlogsRuby::DefaultApi* | [**api_tags_get**](docs/DefaultApi.md#api_tags_get) | **GET** /api/tags | *MoonlogsRuby::DefaultApi* | [**api_tags_id_delete**](docs/DefaultApi.md#api_tags_id_delete) | **DELETE** /api/tags/{id} | *MoonlogsRuby::DefaultApi* | [**api_tags_id_get**](docs/DefaultApi.md#api_tags_id_get) | **GET** /api/tags/{id} | *MoonlogsRuby::DefaultApi* | [**api_tags_id_put**](docs/DefaultApi.md#api_tags_id_put) | **PUT** /api/tags/{id} | *MoonlogsRuby::DefaultApi* | [**api_tags_post**](docs/DefaultApi.md#api_tags_post) | **POST** /api/tags | *MoonlogsRuby::DefaultApi* | [**api_users_get**](docs/DefaultApi.md#api_users_get) | **GET** /api/users | *MoonlogsRuby::DefaultApi* | [**api_users_id_delete**](docs/DefaultApi.md#api_users_id_delete) | **DELETE** /api/users/{id} | *MoonlogsRuby::DefaultApi* | [**api_users_id_get**](docs/DefaultApi.md#api_users_id_get) | **GET** /api/users/{id} | *MoonlogsRuby::DefaultApi* | [**api_users_id_put**](docs/DefaultApi.md#api_users_id_put) | **PUT** /api/users/{id} | *MoonlogsRuby::DefaultApi* | [**api_users_post**](docs/DefaultApi.md#api_users_post) | **POST** /api/users | ## Documentation for Models - [MoonlogsRuby::ApiToken](docs/ApiToken.md) - [MoonlogsRuby::Credentials](docs/Credentials.md) - [MoonlogsRuby::InlineResponse200](docs/InlineResponse200.md) - [MoonlogsRuby::InlineResponse2001](docs/InlineResponse2001.md) - [MoonlogsRuby::InlineResponse20010](docs/InlineResponse20010.md) - [MoonlogsRuby::InlineResponse20011](docs/InlineResponse20011.md) - [MoonlogsRuby::InlineResponse20012](docs/InlineResponse20012.md) - [MoonlogsRuby::InlineResponse20013](docs/InlineResponse20013.md) - [MoonlogsRuby::InlineResponse2002](docs/InlineResponse2002.md) - [MoonlogsRuby::InlineResponse2003](docs/InlineResponse2003.md) - [MoonlogsRuby::InlineResponse2004](docs/InlineResponse2004.md) - [MoonlogsRuby::InlineResponse2005](docs/InlineResponse2005.md) - [MoonlogsRuby::InlineResponse2006](docs/InlineResponse2006.md) - [MoonlogsRuby::InlineResponse2007](docs/InlineResponse2007.md) - [MoonlogsRuby::InlineResponse2008](docs/InlineResponse2008.md) - [MoonlogsRuby::InlineResponse2009](docs/InlineResponse2009.md) - [MoonlogsRuby::Level](docs/Level.md) - [MoonlogsRuby::Meta](docs/Meta.md) - [MoonlogsRuby::OneOfRecordLevel](docs/OneOfRecordLevel.md) - [MoonlogsRuby::OneOfUserRole](docs/OneOfUserRole.md) - [MoonlogsRuby::Record](docs/Record.md) - [MoonlogsRuby::Role](docs/Role.md) - [MoonlogsRuby::Schema](docs/Schema.md) - [MoonlogsRuby::SchemaField](docs/SchemaField.md) - [MoonlogsRuby::SchemaKind](docs/SchemaKind.md) - [MoonlogsRuby::SchemaSearch](docs/SchemaSearch.md) - [MoonlogsRuby::Session](docs/Session.md) - [MoonlogsRuby::Tag](docs/Tag.md) - [MoonlogsRuby::User](docs/User.md) ## Documentation for Authorization ### http1