EventClient - the Ruby gem for the Service API
filters.
This SDK is automatically generated by the Swagger Codegen project:
- API version: 1.0.0
- Package version: 0.0.2
- Build package: io.swagger.codegen.languages.RubyClientCodegen
To build the Ruby code into a gem first install:
gem install specific_install
Then install the gem from github:
<<<<<<< HEAD
gem install ./event_client-0.0.2.gem
=======
gem specific_install https://github.com/zerebral/event_client
>>>>>>> 0352ea70fd939016fb57d1e0945bb2b5469d1e4a
(for development, run gem install --dev ./event_client-0.0.2.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 'event_client', '~> 0.0.2'
If the Ruby gem is hosted at a git repository: https://github.com/zerebral/event_client.git, then add the following in the Gemfile:
gem 'event_client', :git => 'https://github.com/zerebral/event_client.git'
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Please follow the installation procedure and then run the following code:
# Load the gem
require 'event_client'
api_instance = EventClient::RegisterEventApi.new
body = {
project_name: "Export",
process_name: "Autobot Export One Day",
status: "started",
server_id: "server name",
lan_ip: "xx.xx.xx.xx",
wan_ip: "xxx.xx.xxx.xxx",
start_time: "Timestamp in utc""
}
# Event | Event object that needs to be added to the Index
begin
#Register a new event
result = api_instance.add_event(body)
p result
rescue EventClient::ApiError => e
puts "Exception when calling RegisterEventApi->add_event: #{e}"
end
All URIs are relative to http://eventservice.marketcheck.com:8986/v1
Class | Method | HTTP request | Description |
---|---|---|---|
EventClient::RegisterEventApi | add_event | POST /register_event | Register a new event |
EventClient::RegisterEventApi | update_event | POST /update_event | Register a new event |
- Type: API key
- API key parameter name: api_key
- Location: HTTP header