assistly 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,11 +16,7 @@ module Assistly
16
16
  def articles(id, *args)
17
17
  options = args.last.is_a?(Hash) ? args.pop : {}
18
18
  response = get("topics/#{id}/articles",options)
19
- if response['results']
20
- return response['results']
21
- else
22
- return response
23
- end
19
+ response
24
20
  end
25
21
 
26
22
  # Returns extended information on a single article
@@ -15,7 +15,7 @@ module Assistly
15
15
  def cases(*args)
16
16
  options = args.last.is_a?(Hash) ? args.pop : {}
17
17
  response = get("cases",options)
18
- response['results']
18
+ response
19
19
  end
20
20
 
21
21
  # Returns extended information on a single case
@@ -14,7 +14,7 @@ module Assistly
14
14
  def customers(*args)
15
15
  options = args.last.is_a?(Hash) ? args.pop : {}
16
16
  response = get("customers",options)
17
- response['results']
17
+ response
18
18
  end
19
19
 
20
20
  # Returns extended information on a single customer
@@ -15,7 +15,7 @@ module Assistly
15
15
  def interactions(*args)
16
16
  options = args.last.is_a?(Hash) ? args.pop : {}
17
17
  response = get("interactions",options)
18
- response['results']
18
+ response
19
19
  end
20
20
 
21
21
  def create_interaction(*args)
@@ -15,7 +15,7 @@ module Assistly
15
15
  def macros(*args)
16
16
  options = args.last.is_a?(Hash) ? args.pop : {}
17
17
  response = get("macros",options)
18
- response['results']
18
+ response
19
19
  end
20
20
 
21
21
  # Returns extended information on a single macro
@@ -15,7 +15,7 @@ module Assistly
15
15
  def topics(*args)
16
16
  options = args.last.is_a?(Hash) ? args.pop : {}
17
17
  response = get("topics",options)
18
- response['results']
18
+ response
19
19
  end
20
20
 
21
21
  # Returns extended information on a single topic
@@ -31,7 +31,7 @@ module Assistly
31
31
  def users(*args)
32
32
  options = args.last.is_a?(Hash) ? args.pop : {}
33
33
  response = get('users', options)
34
- response['results'].collect{|result| result.user}
34
+ response
35
35
  end
36
36
  end
37
37
  end
@@ -1,4 +1,4 @@
1
1
  module Assistly
2
2
  # The version of the gem
3
- VERSION = '0.2.0'.freeze unless defined?(::Assistly::VERSION)
3
+ VERSION = '0.2.1'.freeze unless defined?(::Assistly::VERSION)
4
4
  end
@@ -25,8 +25,8 @@ describe Assistly::Client do
25
25
  it "should return the articles" do
26
26
  articles = @client.articles(1)
27
27
 
28
- articles.should be_a Array
29
- articles.first.article.id.should == 13
28
+ articles.results.should be_a Array
29
+ articles.results.first.article.id.should == 13
30
30
  end
31
31
 
32
32
  end
@@ -25,9 +25,9 @@ describe Assistly::Client do
25
25
  it "should return up to 100 cases worth of extended information" do
26
26
  cases = @client.cases
27
27
 
28
- cases.should be_a Array
29
- cases.first.case.id.should == 1
30
- cases.first.case.user.name.should == "Jeremy Suriel"
28
+ cases.results.should be_a Array
29
+ cases.results.first.case.id.should == 1
30
+ cases.results.first.case.user.name.should == "Jeremy Suriel"
31
31
  end
32
32
 
33
33
  end
@@ -25,8 +25,8 @@ describe Assistly::Client do
25
25
  it "should return up to 100 customers worth of extended information" do
26
26
  customers = @client.customers
27
27
 
28
- customers.should be_a Array
29
- customers.first.customer.first_name.should == "Jeremy"
28
+ customers.results.should be_a Array
29
+ customers.results.first.customer.first_name.should == "Jeremy"
30
30
  end
31
31
 
32
32
  end
@@ -166,8 +166,8 @@ describe Assistly::Client do
166
166
  it "should return up to 100 users worth of extended information" do
167
167
  interactions = @client.interactions
168
168
 
169
- interactions.should be_a Array
170
- interactions.last.interaction.user.name.should == "Agent Jeremy"
169
+ interactions.results.should be_a Array
170
+ interactions.results.last.interaction.user.name.should == "Agent Jeremy"
171
171
  end
172
172
 
173
173
  end
@@ -25,8 +25,8 @@ describe Assistly::Client do
25
25
  it "should return up to 100 macros worth of extended information" do
26
26
  macros = @client.macros
27
27
 
28
- macros.should be_a Array
29
- macros.first.macro.id.should == 11
28
+ macros.results.should be_a Array
29
+ macros.results.first.macro.id.should == 11
30
30
  end
31
31
 
32
32
  end
@@ -25,8 +25,8 @@ describe Assistly::Client do
25
25
  it "should return up to 100 topics worth of extended information" do
26
26
  topics = @client.topics
27
27
 
28
- topics.should be_a Array
29
- topics.first.topic.id.should == 1
28
+ topics.results.should be_a Array
29
+ topics.results.first.topic.id.should == 1
30
30
  end
31
31
 
32
32
  end
@@ -47,8 +47,8 @@ describe Assistly::Client do
47
47
 
48
48
  it "should return up to 100 users worth of extended information" do
49
49
  users = @client.users
50
- users.should be_a Array
51
- users.first.name.should == "Test User"
50
+ users.results.should be_a Array
51
+ users.results.first.user.name.should == "Test User"
52
52
  end
53
53
 
54
54
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: assistly
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Chris Warren
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-16 00:00:00 Z
18
+ date: 2011-04-18 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: json
@@ -308,7 +308,6 @@ files:
308
308
  - .gemtest
309
309
  - .gitignore
310
310
  - .rspec
311
- - .travis.yml
312
311
  - .yardopts
313
312
  - Gemfile
314
313
  - HISTORY.mkd
@@ -1,7 +0,0 @@
1
- rvm:
2
- - 1.8.7
3
- - 1.9.1
4
- - 1.9.2
5
- - jruby
6
- - rbx
7
- - ree