Project

talk_api

0.0
No commit activity in last 3 years
No release in over 3 years
Client library for talk API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

TalkApi

Gem Version

Client library for (talk API)[http://a3rt.recruit-tech.co.jp/product/talkAPI/]

Installation

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

Usage

First, (Register API KEY for Talk API)[http://a3rt.recruit-tech.co.jp/product/talkAPI/registered/]

require 'talk_api'

Run 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

Example

client = TalkApi::Client.new(api_key: 'valid api key')
response = client.smalltalk('あのイーハトーヴォのすきとほった風、夏でも底に冷たさをもつ青いそら')
response.first_message
=> "それはいいですね"

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ryonkn/talk_api.

License

The gem is available as open source under the terms of the MIT License.