moonlogs-ruby

MoonlogsRuby - the Ruby gem for the Moonlogs

Moonlogs API

This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.15.1
  • Package version: 1.15.1
  • Build package: io.swagger.codegen.v3.generators.ruby.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build moonlogs-ruby.gemspec

Then either install the gem locally:

gem install ./moonlogs-ruby-1.15.1.gem

(for development, run gem install --dev ./moonlogs-ruby-1.15.1.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'moonlogs-ruby', '~> 1.15.1'

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:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'moonlogs-ruby'
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new
id = 56 # Integer | 


begin
  result = api_instance.cover_record_by_id(id)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->cover_record_by_id: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new
opts = { 
  body: MoonlogsRuby::ActionRequest.new # ActionRequest | 
}

begin
  result = api_instance.create_action(opts)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->create_action: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new
opts = { 
  body: MoonlogsRuby::RecordRequest.new # RecordRequest | 
}

begin
  result = api_instance.create_log(opts)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->create_log: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new
opts = { 
  body: MoonlogsRuby::RecordRequest.new # RecordRequest | 
}

begin
  result = api_instance.create_log_async(opts)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->create_log_async: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new
opts = { 
  body: MoonlogsRuby::SchemaRequest.new # SchemaRequest | 
}

begin
  result = api_instance.create_schema(opts)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->create_schema: #{e}"
end

api_instance = MoonlogsRuby::DefaultApi.new
opts = { 
  body: MoonlogsRuby::Credentials.new # Credentials | 
}

begin
  result = api_instance.create_session(opts)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->create_session: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new
opts = { 
  body: MoonlogsRuby::TagRequest.new # TagRequest | 
}

begin
  result = api_instance.create_tag(opts)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->create_tag: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new
opts = { 
  body: MoonlogsRuby::ApiTokenRequest.new # ApiTokenRequest | 
}

begin
  result = api_instance.create_token(opts)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->create_token: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new
opts = { 
  body: MoonlogsRuby::UserRequest.new # UserRequest | 
}

begin
  result = api_instance.create_user(opts)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->create_user: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new

begin
  result = api_instance.delete_action_by_id
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->delete_action_by_id: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new
id = 56 # Integer | 


begin
  result = api_instance.delete_schema_by_id(id)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->delete_schema_by_id: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new
id = 56 # Integer | 


begin
  result = api_instance.delete_tag_by_id(id)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->delete_tag_by_id: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new
id = 56 # Integer | 


begin
  result = api_instance.delete_token_by_id(id)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->delete_token_by_id: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new
id = 56 # Integer | 


begin
  result = api_instance.delete_user_by_id(id)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->delete_user_by_id: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new
id = 56 # Integer | 


begin
  result = api_instance.expose_record_by_id(id)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->expose_record_by_id: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new

begin
  result = api_instance.get_action_by_id
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->get_action_by_id: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new

begin
  result = api_instance.get_actions
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->get_actions: #{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.get_log(opts)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->get_log: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new
id = 56 # Integer | 


begin
  result = api_instance.get_log_by_id(id)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->get_log_by_id: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new
id = 56 # Integer | 


begin
  result = api_instance.get_log_request_by_id(id)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->get_log_request_by_id: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new
id = 56 # Integer | 


begin
  result = api_instance.get_log_response_by_id(id)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->get_log_response_by_id: #{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.get_logs_by_schema_and_hash(schema_name, hash)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->get_logs_by_schema_and_hash: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new
id = 56 # Integer | 


begin
  result = api_instance.get_schema_by_id(id)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->get_schema_by_id: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new

begin
  result = api_instance.get_schemas
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->get_schemas: #{e}"
end

api_instance = MoonlogsRuby::DefaultApi.new

begin
  result = api_instance.get_session
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->get_session: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new
id = 56 # Integer | 


begin
  result = api_instance.get_tag_by_id(id)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->get_tag_by_id: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new

begin
  result = api_instance.get_tags
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->get_tags: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new
id = 56 # Integer | 


begin
  result = api_instance.get_token_by_id(id)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->get_token_by_id: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new

begin
  result = api_instance.get_tokens
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->get_tokens: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new
id = 56 # Integer | 


begin
  result = api_instance.get_user_by_id(id)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->get_user_by_id: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new

begin
  result = api_instance.get_users
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->get_users: #{e}"
end

api_instance = MoonlogsRuby::DefaultApi.new
opts = { 
  body: MoonlogsRuby::UserRequest.new # UserRequest | 
}

begin
  result = api_instance.register_admin(opts)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->register_admin: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new
opts = { 
  body: MoonlogsRuby::RecordRequest.new, # RecordRequest | 
  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.search_logs(opts)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->search_logs: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new
opts = { 
  body: MoonlogsRuby::ActionRequest.new # ActionRequest | 
}

begin
  result = api_instance.update_action_by_id(opts)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->update_action_by_id: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new
id = 56 # Integer | 
opts = { 
  body: MoonlogsRuby::SchemaRequest.new # SchemaRequest | 
}

begin
  result = api_instance.update_schema_by_id(id, opts)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->update_schema_by_id: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new
id = 56 # Integer | 
opts = { 
  body: MoonlogsRuby::TagRequest.new # TagRequest | 
}

begin
  result = api_instance.update_tag_by_id(id, opts)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->update_tag_by_id: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new
id = 56 # Integer | 
opts = { 
  body: MoonlogsRuby::ApiTokenRequest.new # ApiTokenRequest | 
}

begin
  result = api_instance.update_token_by_id(id, opts)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->update_token_by_id: #{e}"
end
# Setup authorization
MoonlogsRuby.configure do |config|
end

api_instance = MoonlogsRuby::DefaultApi.new
id = 56 # Integer | 
opts = { 
  body: MoonlogsRuby::UserRequest.new # UserRequest | 
}

begin
  result = api_instance.update_user_by_id(id, opts)
  p result
rescue MoonlogsRuby::ApiError => e
  puts "Exception when calling DefaultApi->update_user_by_id: #{e}"
end

Documentation for API Endpoints

All URIs are relative to /

Class Method HTTP request Description
MoonlogsRuby::DefaultApi cover_record_by_id PUT /api/logs/id/cover
MoonlogsRuby::DefaultApi create_action POST /api/actions
MoonlogsRuby::DefaultApi create_log POST /api/logs
MoonlogsRuby::DefaultApi create_log_async POST /api/logs/async
MoonlogsRuby::DefaultApi create_schema POST /api/schemas
MoonlogsRuby::DefaultApi create_session POST /api/session
MoonlogsRuby::DefaultApi create_tag POST /api/tags
MoonlogsRuby::DefaultApi create_token POST /api/api_tokens
MoonlogsRuby::DefaultApi create_user POST /api/users
MoonlogsRuby::DefaultApi delete_action_by_id DELETE /api/actions/id
MoonlogsRuby::DefaultApi delete_schema_by_id DELETE /api/schemas/id
MoonlogsRuby::DefaultApi delete_tag_by_id DELETE /api/tags/id
MoonlogsRuby::DefaultApi delete_token_by_id DELETE /api/api_tokens/id
MoonlogsRuby::DefaultApi delete_user_by_id DELETE /api/users/id
MoonlogsRuby::DefaultApi expose_record_by_id PUT /api/logs/id/expose
MoonlogsRuby::DefaultApi get_action_by_id GET /api/actions/id
MoonlogsRuby::DefaultApi get_actions GET /api/actions
MoonlogsRuby::DefaultApi get_log GET /api/logs
MoonlogsRuby::DefaultApi get_log_by_id GET /api/logs/id
MoonlogsRuby::DefaultApi get_log_request_by_id GET /api/logs/id/request
MoonlogsRuby::DefaultApi get_log_response_by_id GET /api/logs/id/response
MoonlogsRuby::DefaultApi get_logs_by_schema_and_hash GET /api/logs/group/schema_name/hash
MoonlogsRuby::DefaultApi get_schema_by_id GET /api/schemas/id
MoonlogsRuby::DefaultApi get_schemas GET /api/schemas
MoonlogsRuby::DefaultApi get_session GET /api/session
MoonlogsRuby::DefaultApi get_tag_by_id GET /api/tags/id
MoonlogsRuby::DefaultApi get_tags GET /api/tags
MoonlogsRuby::DefaultApi get_token_by_id GET /api/api_tokens/id
MoonlogsRuby::DefaultApi get_tokens GET /api/api_tokens
MoonlogsRuby::DefaultApi get_user_by_id GET /api/users/id
MoonlogsRuby::DefaultApi get_users GET /api/users
MoonlogsRuby::DefaultApi register_admin POST /api/setup/register_admin
MoonlogsRuby::DefaultApi search_logs POST /api/logs/search
MoonlogsRuby::DefaultApi update_action_by_id PUT /api/actions/id
MoonlogsRuby::DefaultApi update_schema_by_id PUT /api/schemas/id
MoonlogsRuby::DefaultApi update_tag_by_id PUT /api/tags/id
MoonlogsRuby::DefaultApi update_token_by_id PUT /api/api_tokens/id
MoonlogsRuby::DefaultApi update_user_by_id PUT /api/users/id

Documentation for Models

Documentation for Authorization

http1