agentcat-api

AgentCatApi - the Ruby gem for the AgentCat API

API for AgentCat application

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: v1
  • Package version: 0.0.2
  • Generator version: 7.14.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build agentcat-api.gemspec

Then either install the gem locally:

gem install ./agentcat-api-0.0.2.gem

(for development, run gem install --dev ./agentcat-api-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 'agentcat-api', '~> 0.0.2'

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 'agentcat-api', :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 'agentcat-api'

# Setup authorization
AgentCatApi.configure do |config|
  # Configure API key authorization: tokenAuth
  config.api_key['Authorization'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['Authorization'] = 'Bearer'
  # Configure faraday connection
  config.configure_faraday_connection { |connection| 'YOUR CONNECTION CONFIG PROC' }
end

api_instance = AgentCatApi::EventsApi.new
opts = {
  publish_event_request: AgentCatApi::PublishEventRequest.new({project_id: 'project_id_example'}) # PublishEventRequest | 
}

begin
  #Publish analytics event
  result = api_instance.publish_event(opts)
  p result
rescue AgentCatApi::ApiError => e
  puts "Exception when calling EventsApi->publish_event: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://api.agentcat.com

Class Method HTTP request Description
AgentCatApi::EventsApi publish_event POST /v1/public/events/ Publish analytics event
AgentCatApi::NotificationsApi unsubscribe_notification POST /v1/public/notifications/unsubscribe Disable an email notification type for the token's user

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

tokenAuth

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header