api-ai 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 157f947e3ee7a31a3ea546d297614df916d0dcee
4
+ data.tar.gz: 79c2d5791c8fad4082d66dc3651be9c19fd52414
5
+ SHA512:
6
+ metadata.gz: eb3cfe790c5296efcfc729fc0c893e9b751d410005d9733e5b445bf41ae0d3ee064a60e972c4ac6861accdcb71ab55a4679310057ee4b6edee85bbb378c971e7
7
+ data.tar.gz: 9988d1bcb7bfa373e74ef2e3e3f209c0270f85780c930d09245c9ec35c10ab37dc5fabf17f825f98795409266e889712683cf8f277c0cc7c79c0a06d8c0ac3ea
@@ -0,0 +1,2 @@
1
+ languages:
2
+ Ruby: true
@@ -0,0 +1 @@
1
+ service_name: travis-ci
@@ -0,0 +1,21 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
15
+
16
+ # Idea
17
+ .idea
18
+ .idea/**/*
19
+
20
+ .ruby-gemset
21
+ .ruby-version
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
File without changes
@@ -0,0 +1,20 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.0.0
4
+ - 2.1
5
+ - 2.2.2
6
+ - ruby-head
7
+ - jruby
8
+ - jruby-head
9
+
10
+ sudo: false
11
+
12
+ script: 'bundle exec rake spec'
13
+
14
+ cache: bundler
15
+
16
+ matrix:
17
+ allow_failures:
18
+ - rvm: ruby-head
19
+ - rvm: jruby-head
20
+ fast_finish: true
@@ -0,0 +1,9 @@
1
+ --protected
2
+ --no-private
3
+ --embed-mixin ClassMethods
4
+ --markup markdown
5
+ -
6
+ README.md
7
+ CHANGELOG.md
8
+ CODE_OF_CONDUCT.md
9
+ MIT-LICENSE
@@ -0,0 +1,3 @@
1
+ ### 0.0.1 2015-09-27
2
+ * Initial release
3
+ * Only `query` endpoint for now
@@ -0,0 +1,13 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
+
5
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
6
+
7
+ Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8
+
9
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10
+
11
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
+
13
+ This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in api-ai-wrapper.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 Gustavo Bazan
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,61 @@
1
+ # ApiAi
2
+ [![Gem Version](https://badge.fury.io/rb/api-ai.svg)](http://badge.fury.io/rb/api-ai)
3
+ [![Build Status](https://travis-ci.org/gssbzn/api-ai.svg)](https://travis-ci.org/gssbzn/api-ai)
4
+ [![Code Climate](https://codeclimate.com/github/gssbzn/api-ai/badges/gpa.svg)](https://codeclimate.com/github/gssbzn/api-ai)
5
+ [![Coverage Status](https://coveralls.io/repos/gssbzn/api-ai/badge.svg?branch=master&service=github)](https://coveralls.io/github/gssbzn/api-ai)
6
+
7
+ A library that provides a plain function-call interface to the Slack API web endpoints.
8
+
9
+ ## Installation
10
+
11
+ Add this line to your application's Gemfile:
12
+
13
+ ```ruby
14
+ gem 'api-ai'
15
+ ```
16
+
17
+ And then execute:
18
+
19
+ ```console
20
+ bundle
21
+ ```
22
+
23
+ Or install it yourself as:
24
+
25
+ ```console
26
+ gem install api-ai
27
+ ```
28
+
29
+ ## Usage
30
+
31
+ ```ruby
32
+ client = ApiAi::Client.new AI_ACCESS_TOKEN, AI_SUBSCRIPTION_TOKEN
33
+ response = client.query 'query' => "test", 'lang' => 'en', 'sessionId' => current_user.id, 'timezone' => current_user.timezone
34
+ # { "id"=>"...",
35
+ # "timestamp"=>"...",
36
+ # "result"=>{
37
+ # "source"=>"domains",
38
+ # "resolvedQuery"=>"test",
39
+ # "action"=>"smalltalk.user",
40
+ # "parameters"=>{"simplified"=>"i am testing you"},
41
+ # "metadata"=>{},
42
+ # "fulfillment"=>{"speech"=>"I encourage you to test me often. That helps my developers improve my performance."}
43
+ # },
44
+ # "status"=>{"code"=>200, "errorType"=>"success"}}
45
+ ```
46
+
47
+ ## Additional Resources
48
+
49
+ api.ai docs: https://docs.api.ai/docs/welcome
50
+
51
+ ## Contributing
52
+
53
+ 1. Fork it ( https://github.com/[my-github-username]/api-ai/fork )
54
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
55
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
56
+ 4. Push to the branch (`git push origin my-new-feature`)
57
+ 5. Create a new Pull Request
58
+
59
+ ## License
60
+
61
+ MIT License. Copyright 2015 Gustavo Bazan. http://gustavobazan.com
@@ -0,0 +1,6 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task default: :spec
@@ -0,0 +1,30 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'api_ai/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'api-ai'
8
+ spec.version = ApiAi::VERSION
9
+ spec.authors = ['Gustavo Bazan']
10
+ spec.email = ['contacto@gustavobazan.com']
11
+ spec.summary = 'api.ai Wrapper'
12
+ spec.description = <<-EOF
13
+ A library that provides a plain function-call interface to the
14
+ api.ai web endpoints.
15
+ EOF
16
+ spec.homepage = 'https://github.com/gssbzn/api-ai'
17
+ spec.license = 'MIT'
18
+
19
+ spec.files = `git ls-files -z`.split("\x0")
20
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
21
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
22
+ spec.require_paths = ['lib']
23
+
24
+ spec.add_development_dependency 'bundler', '~> 1.7'
25
+ spec.add_development_dependency 'rake', '~> 10.0'
26
+ spec.add_development_dependency 'rspec', '~> 3.2', '>= 3.2.0'
27
+ spec.add_development_dependency 'webmock', '~> 1.21', '>= 1.21.0'
28
+ spec.add_development_dependency 'coveralls', '~>0.8.0'
29
+ spec.add_development_dependency 'yard', '~> 0.8.7', '>= 0.8.0'
30
+ end
@@ -0,0 +1,40 @@
1
+ # Copyright (c) 2015 Gustavo Bazan
2
+ # MIT License
3
+
4
+ require 'net/https'
5
+ require 'cgi'
6
+ require 'json'
7
+
8
+ require_relative 'api_ai/version'
9
+ require_relative 'api_ai/error'
10
+ require_relative 'api_ai/session'
11
+ require_relative 'api_ai/client'
12
+
13
+ module ApiAi
14
+ # api.ai url
15
+ WEB_SERVER = 'api.ai'
16
+ # api.ai api path
17
+ API_SERVER = 'api.api.ai'
18
+
19
+ API_VERSION = '20150520'
20
+
21
+ # Parse response. You probably shouldn't be calling this directly.
22
+ # This takes responses from the server and parses them.
23
+ # It also checks for errors and raises exceptions with the appropriate messages.
24
+ #
25
+ # @param [Net::HTTPResponse] response
26
+ # @param [Boolean] raw if return raw data
27
+ # @raise [ApiAi::Error]
28
+ # @raise [ApiAi::AuthError]
29
+ def self.parse_response(response, raw = false)
30
+ if response.is_a?(Net::HTTPServerError)
31
+ fail ApiAi::Error.new("api.ai Server Error: #{response} - #{response.body}", response)
32
+ end
33
+ return response.body if raw
34
+ begin
35
+ return JSON.parse(response.body)
36
+ rescue JSON::ParserError
37
+ raise ApiAi::Error.new("Unable to parse JSON response: #{response.body}", response)
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,22 @@
1
+ # Copyright (c) 2015 Gustavo Bazan
2
+ # MIT License
3
+
4
+ require_relative 'session'
5
+ require_relative 'endpoint'
6
+
7
+ module ApiAi
8
+ # Use this class to make api.ai calls.
9
+ class Client
10
+ include Endpoint
11
+
12
+ # @param [String] access_token developer token
13
+ # @param [String] subscription_key subscription token
14
+ def initialize(access_token, subscription_key)
15
+ if access_token.is_a?(String) && subscription_key.is_a?(String)
16
+ @session = Session.new(access_token, subscription_key)
17
+ else
18
+ fail ArgumentError, "access_token or subscription_key doesn't have a valid type"
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,17 @@
1
+ # Copyright (c) 2015 Gustavo Bazan
2
+ # MIT License
3
+
4
+ require_relative 'endpoint/query'
5
+ require_relative 'endpoint/tts'
6
+ require_relative 'endpoint/entities'
7
+ require_relative 'endpoint/intents'
8
+ require_relative 'error'
9
+
10
+ module ApiAi
11
+ module Endpoint
12
+ include Query
13
+ include Tts
14
+ include Entities
15
+ include Intents
16
+ end
17
+ end
@@ -0,0 +1,9 @@
1
+ # Copyright (c) 2015 Gustavo Bazan
2
+ # MIT License
3
+
4
+ module ApiAi
5
+ module Endpoint
6
+ module Entities
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ # Copyright (c) 2015 Gustavo Bazan
2
+ # MIT License
3
+
4
+ module ApiAi
5
+ module Endpoint
6
+ module Intents
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,28 @@
1
+ # Copyright (c) 2015 Gustavo Bazan
2
+ # MIT License
3
+
4
+ module ApiAi
5
+ module Endpoint
6
+ module Query
7
+ # Checks API calling code.
8
+ #
9
+ # @param [Hash] params
10
+ # API call arguments
11
+ # @option params [String] 'query'
12
+ # The natural language text to be processed. The request can have multiple query parameters.
13
+ # @option params [String] 'sessionId'
14
+ # A string token up to 36 symbols long, used to identify the client and to manage sessions parameters (including contexts) per client.
15
+ # @option params [String] 'lang'
16
+ # Language tag, e.g. EN, ES
17
+ #
18
+ # @see http://api.ai/docs/reference/#query
19
+ def query(params = {})
20
+ fail ArgumentError, "Required arguments 'query' missing" if params['query'].nil?
21
+ fail ArgumentError, "Required arguments 'sessionId' missing" if params['sessionId'].nil?
22
+ fail ArgumentError, "Required arguments 'lang' missing" if params['lang'].nil?
23
+ response = @session.do_post 'query', params
24
+ ApiAi.parse_response(response)
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,9 @@
1
+ # Copyright (c) 2015 Gustavo Bazan
2
+ # MIT License
3
+
4
+ module ApiAi
5
+ module Endpoint
6
+ module Tts
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,29 @@
1
+ # Copyright (c) 2015 Gustavo Bazan
2
+ # MIT License
3
+
4
+ module ApiAi
5
+ # This is the usual error raised on any api.ai related Errors
6
+ # @!attribute http_response
7
+ # @return [Object] server response
8
+ # @!attribute error
9
+ # @return [String] the name of the error
10
+ class Error < RuntimeError
11
+
12
+ attr_accessor :http_response, :error
13
+
14
+ def initialize(error, http_response = nil)
15
+ @error = error
16
+ @http_response = http_response
17
+ end
18
+
19
+ # String representation
20
+ # @return [String]
21
+ def to_s
22
+ "#{error}"
23
+ end
24
+ end
25
+
26
+ # This is the error raised on Authentication failures. Usually this means
27
+ # one of three things
28
+ class AuthError < Error; end
29
+ end
@@ -0,0 +1,57 @@
1
+ module ApiAi
2
+ # Methods to do http requests
3
+ module Request
4
+ # Convert params to query string
5
+ #
6
+ # @param [Hash] params
7
+ # API call arguments
8
+ # @return [String]
9
+ def make_query_string(params)
10
+ clean_params(params).collect do |k, v|
11
+ CGI.escape(k) + '=' + CGI.escape(v)
12
+ end.join('&')
13
+ end
14
+
15
+ # Handle http requests
16
+ # @param [URI::HTTPS] uri
17
+ # API uri
18
+ # @param [Object] request
19
+ # request object
20
+ # @return [Net::HTTPResponse]
21
+ def do_http(uri, request)
22
+ http = Net::HTTP.new(uri.host, uri.port)
23
+ http.use_ssl = true
24
+ # Let then know about us
25
+ request['User-Agent'] = 'SlackRubyAPIWrapper'
26
+ begin
27
+ http.request(request)
28
+ rescue OpenSSL::SSL::SSLError => e
29
+ raise Slack::Error, 'SSL error connecting to Slack.'
30
+ end
31
+ end
32
+
33
+ def do_http_with_body(uri, request, body) # :nodoc:
34
+ unless body.nil?
35
+ if body.is_a?(Hash)
36
+ request['Content-Type'] = 'application/json; charset=utf-8'
37
+ request.body = clean_params(body).to_json
38
+ else
39
+ s = body.to_s
40
+ request['Content-Length'] = s.length
41
+ request.body = s
42
+ end
43
+ end
44
+ do_http(uri, request)
45
+ end
46
+
47
+ private
48
+
49
+ def clean_params(params) # :nodoc:
50
+ r = {}
51
+ params.each do |k, v|
52
+ r[k] = v.to_s unless v.nil?
53
+ end
54
+ r
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,55 @@
1
+ # Copyright (c) 2015 Gustavo Bazan
2
+ # MIT License
3
+ require_relative 'request'
4
+
5
+ module ApiAi
6
+ class Session # :nodoc:
7
+ include Request
8
+
9
+ # @param [String] access_token
10
+ # @param [String] subscription_key
11
+ def initialize(access_token, subscription_key)
12
+ unless access_token.is_a?(String)
13
+ fail 'bad type for access_token (expecting String)'
14
+ end
15
+ unless subscription_key.is_a?(String)
16
+ fail 'bad type for subscription_key (expecting String)'
17
+ end
18
+ @access_token = access_token
19
+ @subscription_key = subscription_key
20
+ end
21
+
22
+ def do_get(path, params = nil, headers = nil) # :nodoc:
23
+ params ||= {}
24
+ params['v'] = ApiAi::API_VERSION
25
+ headers ||= {}
26
+ headers['Authorization'] = "Bearer #{@access_token}"
27
+ headers['ocp-apim-subscription-key'] = "Bearer #{@subscription_key}"
28
+ uri = build_url_with_params(path, params)
29
+ do_http(uri, Net::HTTP::Get.new(uri.request_uri))
30
+ end
31
+
32
+ def do_post(path, params = nil, headers = nil) # :nodoc:
33
+ headers ||= {}
34
+ headers['Authorization'] = "Bearer #{@access_token}"
35
+ headers['ocp-apim-subscription-key'] = "Bearer #{@subscription_key}"
36
+
37
+ uri = build_url_with_params(path, 'v' => ApiAi::API_VERSION)
38
+ do_http_with_body(uri, Net::HTTP::Post.new(uri.request_uri, headers), params)
39
+ end
40
+
41
+ private
42
+
43
+ def build_url(path) # :nodoc:
44
+ host = ApiAi::API_SERVER
45
+ full_path = "/v1/#{path}"
46
+ URI::HTTPS.build(host: host, path: full_path)
47
+ end
48
+
49
+ def build_url_with_params(path, params) # :nodoc:
50
+ target = build_url(path)
51
+ target.query = make_query_string(params)
52
+ target
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,6 @@
1
+ # Copyright (c) 2015 Gustavo Bazan
2
+ # MIT License
3
+
4
+ module ApiAi
5
+ VERSION = '0.0.1'.freeze
6
+ end
@@ -0,0 +1,13 @@
1
+ require 'spec_helper'
2
+
3
+ describe ApiAi::Client do
4
+ it 'Initialize' do
5
+ client = ApiAi::Client.new('', '')
6
+ expect(client).not_to be nil
7
+ end
8
+ it 'Validates token is string' do
9
+ expect { ApiAi::Client.new(1, '') }.to raise_error(ArgumentError)
10
+ expect { ApiAi::Client.new('', 1) }.to raise_error(ArgumentError)
11
+ expect { ApiAi::Client.new(1, 1) }.to raise_error(ArgumentError)
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ require 'spec_helper'
2
+
3
+ describe ApiAi do
4
+ it 'has a version number' do
5
+ expect(ApiAi::VERSION).not_to be nil
6
+ end
7
+ it 'has web server domain' do
8
+ expect(ApiAi::WEB_SERVER).to eq('api.ai')
9
+ end
10
+ it 'has api uri' do
11
+ expect(ApiAi::API_SERVER).to eq('api.api.ai')
12
+ end
13
+ end
@@ -0,0 +1,3 @@
1
+ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
+
3
+ require 'api-ai'
metadata ADDED
@@ -0,0 +1,180 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: api-ai
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Gustavo Bazan
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-09-27 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.7'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.7'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.2'
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: 3.2.0
51
+ type: :development
52
+ prerelease: false
53
+ version_requirements: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - "~>"
56
+ - !ruby/object:Gem::Version
57
+ version: '3.2'
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: 3.2.0
61
+ - !ruby/object:Gem::Dependency
62
+ name: webmock
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '1.21'
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: 1.21.0
71
+ type: :development
72
+ prerelease: false
73
+ version_requirements: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - "~>"
76
+ - !ruby/object:Gem::Version
77
+ version: '1.21'
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: 1.21.0
81
+ - !ruby/object:Gem::Dependency
82
+ name: coveralls
83
+ requirement: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - "~>"
86
+ - !ruby/object:Gem::Version
87
+ version: 0.8.0
88
+ type: :development
89
+ prerelease: false
90
+ version_requirements: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - "~>"
93
+ - !ruby/object:Gem::Version
94
+ version: 0.8.0
95
+ - !ruby/object:Gem::Dependency
96
+ name: yard
97
+ requirement: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - "~>"
100
+ - !ruby/object:Gem::Version
101
+ version: 0.8.7
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: 0.8.0
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - "~>"
110
+ - !ruby/object:Gem::Version
111
+ version: 0.8.7
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ version: 0.8.0
115
+ description: |2
116
+ A library that provides a plain function-call interface to the
117
+ api.ai web endpoints.
118
+ email:
119
+ - contacto@gustavobazan.com
120
+ executables: []
121
+ extensions: []
122
+ extra_rdoc_files: []
123
+ files:
124
+ - ".codeclimate.yml"
125
+ - ".coveralls.yml"
126
+ - ".gitignore"
127
+ - ".rspec"
128
+ - ".simplecov"
129
+ - ".travis.yml"
130
+ - ".yardopts"
131
+ - CHANGELOG.md
132
+ - CODE_OF_CONDUCT.md
133
+ - Gemfile
134
+ - MIT-LICENSE
135
+ - README.md
136
+ - Rakefile
137
+ - api-ai.gemspec
138
+ - lib/api-ai.rb
139
+ - lib/api_ai/client.rb
140
+ - lib/api_ai/endpoint.rb
141
+ - lib/api_ai/endpoint/entities.rb
142
+ - lib/api_ai/endpoint/intents.rb
143
+ - lib/api_ai/endpoint/query.rb
144
+ - lib/api_ai/endpoint/tts.rb
145
+ - lib/api_ai/error.rb
146
+ - lib/api_ai/request.rb
147
+ - lib/api_ai/session.rb
148
+ - lib/api_ai/version.rb
149
+ - spec/api_ai/client_spec.rb
150
+ - spec/api_ai_spec.rb
151
+ - spec/spec_helper.rb
152
+ homepage: https://github.com/gssbzn/api-ai
153
+ licenses:
154
+ - MIT
155
+ metadata: {}
156
+ post_install_message:
157
+ rdoc_options: []
158
+ require_paths:
159
+ - lib
160
+ required_ruby_version: !ruby/object:Gem::Requirement
161
+ requirements:
162
+ - - ">="
163
+ - !ruby/object:Gem::Version
164
+ version: '0'
165
+ required_rubygems_version: !ruby/object:Gem::Requirement
166
+ requirements:
167
+ - - ">="
168
+ - !ruby/object:Gem::Version
169
+ version: '0'
170
+ requirements: []
171
+ rubyforge_project:
172
+ rubygems_version: 2.4.6
173
+ signing_key:
174
+ specification_version: 4
175
+ summary: api.ai Wrapper
176
+ test_files:
177
+ - spec/api_ai/client_spec.rb
178
+ - spec/api_ai_spec.rb
179
+ - spec/spec_helper.rb
180
+ has_rdoc: