All URIs are relative to https://komoju.com/api/v1
| Method | HTTP request | Description |
|---|---|---|
| list_events | GET /events | Event: List |
| show_event | GET /events/{id} | Event Show |
list_events(opts)
Event: List
Lists out past webhook events from most-recent to least-recent.
require 'time'
require 'komoju-sdk'
# setup authorization
Komoju.configure do |config|
# Configure your KOMOJU API key
config.api_key = 'YOUR_API_KEY'
end
api_instance = Komoju::EventsApi.new
opts = {
start_time: Time.parse('2013-10-20T19:20:30+01:00'), # Time | Query for records created after this time.
end_time: Time.parse('2013-10-20T19:20:30+01:00'), # Time | Query for records created before this time.
per_page: 56, # Integer | How many objects per page.
page: 56 # Integer | Page number to query for.
}
begin
# Event: List
result = api_instance.list_events(opts)
p result
rescue Komoju::ApiError => e
puts "Error when calling EventsApi->list_events: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> list_events_with_http_info(opts)
begin
# Event: List
data, status_code, headers = api_instance.list_events_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <EventList>
rescue Komoju::ApiError => e
puts "Error when calling EventsApi->list_events_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| start_time | Time | Query for records created after this time. | [optional] |
| end_time | Time | Query for records created before this time. | [optional] |
| per_page | Integer | How many objects per page. | [optional] |
| page | Integer | Page number to query for. | [optional] |
- Content-Type: Not defined
- Accept: application/json
show_event(id)
Event Show
View an event given an id. Event ids can be saved from a webhook or found by querying all events.
require 'time'
require 'komoju-sdk'
# setup authorization
Komoju.configure do |config|
# Configure your KOMOJU API key
config.api_key = 'YOUR_API_KEY'
end
api_instance = Komoju::EventsApi.new
id = 'id_example' # String | A unique identifier for an event.
begin
# Event Show
result = api_instance.show_event(id)
p result
rescue Komoju::ApiError => e
puts "Error when calling EventsApi->show_event: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> show_event_with_http_info(id)
begin
# Event Show
data, status_code, headers = api_instance.show_event_with_http_info(id)
p status_code # => 2xx
p headers # => { ... }
p data # => <Event>
rescue Komoju::ApiError => e
puts "Error when calling EventsApi->show_event_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | A unique identifier for an event. |
- Content-Type: Not defined
- Accept: application/json