voxable-api-ai-ruby 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c3f60b2fe21b3f60dca836485331891cda546b20
4
- data.tar.gz: bf272acdd61609ade78f93c13fc06657f57acd0b
2
+ SHA256:
3
+ metadata.gz: 011757f9b10759cddb08cacd3367acf6fd210be3d32ca7b16a471a30e6885bc5
4
+ data.tar.gz: 6ed7c83a1f9d18357153127a332113281674eb65a17ce0beabaa205344df0986
5
5
  SHA512:
6
- metadata.gz: 61cff169d6a352175d3c0364f4d4ceb696b6b07c4f7f16ea28b4d40237da6297e425004858899f2bd9b35186df140ad9e1b596a107af170d30c500cc4dc3fa97
7
- data.tar.gz: ac01ff6f3045b1ec1ea8a1cc9fc224e793ce3550495a20e50808358aceba8fb45608a4f81e8b2f5513a756925fcd545e85e92d7dd4ea48d18ff4c4b0cb5fdb01
6
+ metadata.gz: 3966ee65385bc8e52f56481ec8d848d1e35a5e42d0f9a797bc7346b7b976cd6e04bd7373ffab27d953a10cbb218741f3cad1436a2633c91599648c25b79ffeff
7
+ data.tar.gz: 7c08169554884bd6cbb14091620be6771c215a1339f6b5a5aceef02d0738a7f140fa9e6854ce49131ed407cc03062b4a9a4074ac5b0bdc4f1812199eb131e656
data/lib/api-ai-ruby.rb CHANGED
@@ -8,5 +8,5 @@ require 'api-ai-ruby/voice_request'
8
8
  require 'api-ai-ruby/update_entities_request'
9
9
  require 'api-ai-ruby/update_intent_request'
10
10
  require 'api-ai-ruby/get_intent_request'
11
- require 'api-ai-ruby/get_intents_request'
11
+ require 'api-ai-ruby/get_entity_request'
12
12
 
@@ -85,5 +85,16 @@ module ApiAiRuby
85
85
  raise ApiAiRuby::ClientError.new('Credentials missing') if !developer_credentials?
86
86
  ApiAiRuby::GetIntentRequest.new(self, options).perform
87
87
  end
88
+
89
+ def get_entity_request(eid, options = {})
90
+ raise ApiAiRuby::ClientError.new('Credentials missing') if !developer_credentials?
91
+ options[:eid] = eid
92
+ ApiAiRuby::GetEntityRequest.new(self, options).perform
93
+ end
94
+
95
+ def get_entities_request(options = {})
96
+ raise ApiAiRuby::ClientError.new('Credentials missing') if !developer_credentials?
97
+ ApiAiRuby::GetEntityRequest.new(self, options).perform
98
+ end
88
99
  end
89
- end
100
+ end
@@ -1,6 +1,6 @@
1
1
  module ApiAiRuby
2
2
  class Constants
3
- VERSION = '1.1.1'
3
+ VERSION = '1.1.2'
4
4
  DEFAULT_BASE_URL = 'https://api.api.ai/v1/'
5
5
  DEFAULT_API_VERSION = '20150204'
6
6
  DEFAULT_CLIENT_LANG = 'en'
@@ -1,16 +1,14 @@
1
- require 'json'
2
-
3
1
  module ApiAiRuby
4
- class GetIntentsRequest < ApiAiRuby::Request
2
+ class GetEntityRequest < ApiAiRuby::Request
5
3
  def initialize (client, options={})
6
- @path = "intents"
4
+ @path = "entities/#{ options.delete(:eid) }"
7
5
 
8
6
  super client, options
9
7
  @request_method = :get
10
8
 
11
9
  # TODO: There should be a method for generating the proper headers.
12
10
  @headers = {
13
- 'Authorization': 'Bearer ' + client.developer_access_token
11
+ 'Authorization': 'Bearer ' + client.developer_access_token
14
12
  }
15
13
  end
16
14
  end
@@ -1,5 +1,3 @@
1
- require 'json'
2
-
3
1
  module ApiAiRuby
4
2
  class GetIntentRequest < ApiAiRuby::Request
5
3
  def initialize (client, options={})
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: voxable-api-ai-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - api.ai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-26 00:00:00.000000000 Z
11
+ date: 2018-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -83,8 +83,8 @@ files:
83
83
  - lib/api-ai-ruby/client.rb
84
84
  - lib/api-ai-ruby/client_error.rb
85
85
  - lib/api-ai-ruby/constants.rb
86
+ - lib/api-ai-ruby/get_entity_request.rb
86
87
  - lib/api-ai-ruby/get_intent_request.rb
87
- - lib/api-ai-ruby/get_intents_request.rb
88
88
  - lib/api-ai-ruby/request.rb
89
89
  - lib/api-ai-ruby/request_error.rb
90
90
  - lib/api-ai-ruby/text_request.rb
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  version: '0'
121
121
  requirements: []
122
122
  rubyforge_project:
123
- rubygems_version: 2.5.1
123
+ rubygems_version: 2.7.3
124
124
  signing_key:
125
125
  specification_version: 4
126
126
  summary: ruby SDK for https://api.ai