Client library for (talk API)[http://a3rt.recruit-tech.co.jp/product/talkAPI/]
Add this line to your application's Gemfile:
gem 'talk_api'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install talk_api
First, (Register API KEY for Talk API)[http://a3rt.recruit-tech.co.jp/product/talkAPI/registered/]
require 'talk_api'
client = TalkApi::Client.new(api_key: '<API KEY>') # TalkApi::Client instance
response = client.smalltalk('<messages>') # Send text to API and return a response
response.success? # true or false
response.first_message # Return a text message
client = TalkApi::Client.new(api_key: 'valid api key')
response = client.smalltalk('あのイーハトーヴォのすきとほった風、夏でも底に冷たさをもつ青いそら')
response.first_message
=> "それはいいですね"
Bug reports and pull requests are welcome on GitHub at https://github.com/ryonkn/talk_api.
The gem is available as open source under the terms of the MIT License.