moonlogs-ruby

MoonlogsRuby - the Ruby gem for the Moonlogs

Moonlogs API

This SDK is automatically generated by the Swagger Codegen project:

  • API version: 0.2.1
  • Package version: 0.2.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-0.2.1.gem

(for development, run gem install --dev ./moonlogs-ruby-0.2.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', '~> 0.2.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

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 |
}

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 GET /api/api_tokens
MoonlogsRuby::DefaultApi api_api_tokens_id_delete DELETE /api/api_tokens/id
MoonlogsRuby::DefaultApi api_api_tokens_id_get GET /api/api_tokens/id
MoonlogsRuby::DefaultApi api_api_tokens_id_put PUT /api/api_tokens/id
MoonlogsRuby::DefaultApi api_api_tokens_post POST /api/api_tokens
MoonlogsRuby::DefaultApi api_logs_get GET /api/logs
MoonlogsRuby::DefaultApi api_logs_group_schema_name_hash_get GET /api/logs/group/schema_name/hash
MoonlogsRuby::DefaultApi api_logs_id_get GET /api/logs/id
MoonlogsRuby::DefaultApi api_logs_post POST /api/logs
MoonlogsRuby::DefaultApi api_logs_search_post POST /api/logs/search
MoonlogsRuby::DefaultApi api_schemas_get GET /api/schemas
MoonlogsRuby::DefaultApi api_schemas_id_delete DELETE /api/schemas/id
MoonlogsRuby::DefaultApi api_schemas_id_get GET /api/schemas/id
MoonlogsRuby::DefaultApi api_schemas_id_put PUT /api/schemas/id
MoonlogsRuby::DefaultApi api_schemas_post POST /api/schemas
MoonlogsRuby::DefaultApi api_session_get GET /api/session
MoonlogsRuby::DefaultApi api_session_post POST /api/session
MoonlogsRuby::DefaultApi api_setup_register_admin_post POST /api/setup/register_admin
MoonlogsRuby::DefaultApi api_tags_get GET /api/tags
MoonlogsRuby::DefaultApi api_tags_id_delete DELETE /api/tags/id
MoonlogsRuby::DefaultApi api_tags_id_get GET /api/tags/id
MoonlogsRuby::DefaultApi api_tags_id_put PUT /api/tags/id
MoonlogsRuby::DefaultApi api_tags_post POST /api/tags
MoonlogsRuby::DefaultApi api_users_get GET /api/users
MoonlogsRuby::DefaultApi api_users_id_delete DELETE /api/users/id
MoonlogsRuby::DefaultApi api_users_id_get GET /api/users/id
MoonlogsRuby::DefaultApi api_users_id_put PUT /api/users/id
MoonlogsRuby::DefaultApi api_users_post POST /api/users

Documentation for Models

Documentation for Authorization

http1