Skip to content

zaccari/kafka-rest-proxy-ruby-client

Repository files navigation

kafka_rest_proxy_client

KafkaProxyRestClient - a Ruby gem for the Kafka REST Proxy API.

This SDK is automatically generated by the Swagger Codegen project:

  • API version: 0.1.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build kafka_rest_proxy_client.gemspec

Then either install the gem locally:

gem install ./kafka_rest_proxy_client-1.0.0.gem

Install from Git

gem 'kafka_rest_proxy_client', git: 'https://github.com/mzaccari/kafka-rest-proxy-ruby-client.git'

Getting Started

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

# Load the gem
require 'kafka_rest_proxy_client'

KafkaProxyRestClient.configure do |config|
  config.host = "127.0.0.1:8082"
  config.scheme = "http"
  config.base_path = "/"
end

topic_name = "topic_name_example"

api_client = KafkaProxyRestClient::ProducerApi.new
record = KafkaProxyRestClient::Record.new(value: { hello: 'world' })
request = KafkaProxyRestClient::ProducerRequest.new(records: [record])

begin
  result = api_client.publish(topic_name, request)
  p result
rescue KafkaProxyRestClient::ApiError => e
  puts "Exception when calling ProducerApi->topics_topic_name_post: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://localhost

Class Method HTTP request Description
KafkaProxyRestClient::ProducerApi publish POST /topics/{topic_name}

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.

About

A swagger generated ruby client for https://github.com/confluentinc/kafka-rest

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published