pandorified 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,11 +2,22 @@ require 'pandorified/result'
2
2
 
3
3
  module Pandorified
4
4
  class Session
5
+ # A new session for conversing with a bot.
6
+ #
7
+ # @note If you choose not to specify a {custid}, one will be chosen automatically and remembered throughout the session.
8
+ #
9
+ # @param [String] botid A valid Pandorabots botid.
10
+ # @param [String] custid An identifier used to keep track of this conversation.
5
11
  def initialize(botid, custid = nil)
6
12
  @botid = botid
7
13
  @custid = custid
8
14
  end
9
15
 
16
+ # Send a message to this session's bot and receive a response.
17
+ #
18
+ # @param [String] input Text to say to the bot.
19
+ #
20
+ # @return [String] The bot's response text.
10
21
  def talk(input)
11
22
  result = Pandorified::Result.new(botid: @botid, custid: @custid, input: input)
12
23
  if result.status.zero?
@@ -1,3 +1,3 @@
1
1
  module Pandorified
2
- VERSION = '0.2.0'
2
+ VERSION = '0.3.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pandorified
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rest-client
17
- requirement: &21704800 !ruby/object:Gem::Requirement
17
+ requirement: &10750380 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *21704800
25
+ version_requirements: *10750380
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: nokogiri
28
- requirement: &21704200 !ruby/object:Gem::Requirement
28
+ requirement: &10749960 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,7 +33,7 @@ dependencies:
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *21704200
36
+ version_requirements: *10749960
37
37
  description: Pandorified makes it easy for your Ruby scripts to interact with chat
38
38
  bots hosted on Pandorabots.
39
39
  email: xtagon@gmail.com