ApiWrapperFor8x8 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +21 -0
- data/.rspec +2 -0
- data/ApiWrapperFor8x8.gemspec +30 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +30 -0
- data/Rakefile +11 -0
- data/lib/ApiWrapperFor8x8.rb +8 -0
- data/lib/ApiWrapperFor8x8/agent.rb +9 -0
- data/lib/ApiWrapperFor8x8/agents.rb +31 -0
- data/lib/ApiWrapperFor8x8/channel.rb +31 -0
- data/lib/ApiWrapperFor8x8/connection.rb +97 -0
- data/lib/ApiWrapperFor8x8/error.rb +27 -0
- data/lib/ApiWrapperFor8x8/version.rb +3 -0
- data/spec/.rspec +2 -0
- data/spec/agent_spec.rb +0 -0
- data/spec/agents_spec.rb +36 -0
- data/spec/channel_spec.rb +40 -0
- data/spec/connection_spec.rb +93 -0
- data/spec/spec_helper.rb +16 -0
- data/spec/version_spec.rb +5 -0
- metadata +186 -0
data/.gitignore
ADDED
data/.rspec
ADDED
@@ -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 File.expand_path('../lib/ApiWrapperFor8x8/version', __FILE__)
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "ApiWrapperFor8x8"
|
8
|
+
spec.version = ApiWrapperFor8x8::VERSION
|
9
|
+
spec.authors = ["daifu"]
|
10
|
+
spec.email = ["daifu.ye@gmail.com"]
|
11
|
+
spec.description = %q{8x8 Phone System api wrapper to handle reporting.}
|
12
|
+
spec.summary = %q{8x8 Phone System api wrapper}
|
13
|
+
spec.homepage = "https://github.com/daifu/api-wrapper-for-8x8"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
spec.add_development_dependency "rspec", ">= 2.11.0"
|
24
|
+
spec.add_development_dependency "debugger"
|
25
|
+
|
26
|
+
spec.add_dependency "bundler" , ">= 1.0.0"
|
27
|
+
spec.add_dependency "httparty", ">= 0.9.0"
|
28
|
+
spec.add_dependency "json" , "~> 1.8.0"
|
29
|
+
|
30
|
+
end
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 daifu
|
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.
|
data/README.md
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# Api Wrapper For 8x8 phonesystem reporting api
|
2
|
+
|
3
|
+
Since 8x8 phone system api suck, and here is the ruby gem that act as the
|
4
|
+
api wrapper to make your life a little bit easier.
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Add this line to your application's Gemfile:
|
9
|
+
|
10
|
+
gem 'ApiWrapperFor8x8'
|
11
|
+
|
12
|
+
And then execute:
|
13
|
+
|
14
|
+
$ bundle
|
15
|
+
|
16
|
+
Or install it yourself as:
|
17
|
+
|
18
|
+
$ gem install ApiWrapperFor8x8
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
|
22
|
+
TODO: Write usage instructions here
|
23
|
+
|
24
|
+
## Contributing
|
25
|
+
|
26
|
+
1. Fork it
|
27
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
28
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
29
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
30
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
module ApiWrapperFor8x8
|
2
|
+
module Agents
|
3
|
+
include ApiWrapperFor8x8::Agent
|
4
|
+
|
5
|
+
def agent_list(params={})
|
6
|
+
get('/stats/agents.json', params)
|
7
|
+
end
|
8
|
+
|
9
|
+
def agents_detail(params={}, filtered_options={})
|
10
|
+
details = []
|
11
|
+
filtered_agents(agent_list(params), filtered_options).each do |agent|
|
12
|
+
details << agent_detail(agent['agent-id'], params)
|
13
|
+
end
|
14
|
+
details.flatten
|
15
|
+
end
|
16
|
+
|
17
|
+
def filtered_agents(agent_list, filtered_options)
|
18
|
+
if filtered_options.size == 0
|
19
|
+
return list
|
20
|
+
end
|
21
|
+
agent_list.select do |agent|
|
22
|
+
flag = true
|
23
|
+
filtered_options.each do |key, value|
|
24
|
+
flag = false unless (agent[key] && agent[key] == value)
|
25
|
+
end
|
26
|
+
flag
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module ApiWrapperFor8x8
|
2
|
+
module Channel
|
3
|
+
|
4
|
+
def channel_list(options={})
|
5
|
+
get "/stats/channels.json", options
|
6
|
+
end
|
7
|
+
|
8
|
+
# Get one details on the channel
|
9
|
+
# guid: the id of the channel
|
10
|
+
# options: {
|
11
|
+
# 'd' => date range
|
12
|
+
# 'tz' => time zone
|
13
|
+
# 'media-type' => {media-type, including T, }
|
14
|
+
# 'n' => {offset} limited 50 records per request,
|
15
|
+
# 'queue-id' => {queue-id for agent for query variables}
|
16
|
+
# }
|
17
|
+
# filter_options is to filtered out the attributes from the object
|
18
|
+
def channel_details(guid, params_options={}, filtered_options={})
|
19
|
+
get("/stats/channels/#{guid}/statistics.json", params_options, filtered_options)
|
20
|
+
end
|
21
|
+
|
22
|
+
# It is easier for geting the sum of a value from the
|
23
|
+
# an array of records with the restriction you can set
|
24
|
+
def channel_sum_x(x, guid=0, params_options={}, filtered_options={})
|
25
|
+
details = channel_details(guid, params_options, filtered_options)
|
26
|
+
sum = details.map {|detail| detail[x]}.inject(:+) if details
|
27
|
+
sum || 0
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,97 @@
|
|
1
|
+
module ApiWrapperFor8x8
|
2
|
+
class Connection
|
3
|
+
include HTTParty
|
4
|
+
|
5
|
+
include ApiWrapperFor8x8::Channel
|
6
|
+
include ApiWrapperFor8x8::Agents
|
7
|
+
|
8
|
+
RECORDS_LIMIT = 50
|
9
|
+
MAX_TRY = 3
|
10
|
+
VALID_SEGMENT = ['channels', 'agents', 'statistics']
|
11
|
+
|
12
|
+
base_uri "#{ENV['PHONE_SYSTEM_URL']}"
|
13
|
+
format :json
|
14
|
+
|
15
|
+
def initialize(creds={})
|
16
|
+
@configuration = {}
|
17
|
+
ApiWrapperFor8x8::Connection.api_token_keys.each do |key|
|
18
|
+
@configuration[key] = creds[key].to_s
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def request(method, url, options={})
|
23
|
+
raise "Please set usranme and password" unless api_token_keys_valid?
|
24
|
+
options[:basic_auth] = @configuration
|
25
|
+
self.class.__send__(method, url, options).parsed_response
|
26
|
+
end
|
27
|
+
|
28
|
+
def api_token_keys_valid?
|
29
|
+
return ApiWrapperFor8x8::Connection.api_token_keys.detect {|key| @configuration[key] == ''} == nil
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.api_token_keys
|
33
|
+
[:username, :password].freeze
|
34
|
+
end
|
35
|
+
|
36
|
+
def get(url, params={}, filtered_opts={})
|
37
|
+
offset = params[:n] || 1
|
38
|
+
params[:n] = offset unless params[:n]
|
39
|
+
|
40
|
+
unless params.empty?
|
41
|
+
url = "#{url}?#{serialize_param(params)}"
|
42
|
+
end
|
43
|
+
|
44
|
+
tries = 1
|
45
|
+
resp = []
|
46
|
+
begin
|
47
|
+
resp_tmp = get_stat(request(:get, url, {}), url)
|
48
|
+
resp.concat(apply_filter(resp_tmp, filtered_opts)) if resp_tmp
|
49
|
+
tries += 1
|
50
|
+
|
51
|
+
# update the url to increase the offset
|
52
|
+
offset += RECORDS_LIMIT
|
53
|
+
url.gsub!(/n=[0-9]*/, "n=#{offset}")
|
54
|
+
end while (size_of(resp_tmp) >= RECORDS_LIMIT && tries <= MAX_TRY)
|
55
|
+
resp
|
56
|
+
end
|
57
|
+
|
58
|
+
def serialize_param(params)
|
59
|
+
params.sort.map {|key, value| URI.escape("#{key}=#{value}")}.join('&')
|
60
|
+
end
|
61
|
+
|
62
|
+
def size_of(details)
|
63
|
+
details ||= []
|
64
|
+
details.size
|
65
|
+
end
|
66
|
+
|
67
|
+
def validate_and_extract_url(url)
|
68
|
+
uri = URI(url)
|
69
|
+
last_seg = uri.path.split('/').last
|
70
|
+
if last_seg =~ /(#{VALID_SEGMENT.join('|')})\.json$/
|
71
|
+
return last_seg.split('.').first
|
72
|
+
else
|
73
|
+
raise ApiWrapperFor8x8::ResponseError.new(nil, "URL path is incorrect! please double check your url.")
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
def get_stat(resp, url)
|
78
|
+
if root_name = validate_and_extract_url(url)
|
79
|
+
return [] if (resp && resp.size == 0)
|
80
|
+
return resp[root_name][root_name[0...-1]]
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
def apply_filter(list, filtered_options)
|
85
|
+
if filtered_options.size == 0
|
86
|
+
return list
|
87
|
+
end
|
88
|
+
list.select do |ele|
|
89
|
+
flag = true
|
90
|
+
filtered_options.each do |key, value|
|
91
|
+
flag = false unless (ele[key] && ele[key] == value)
|
92
|
+
end
|
93
|
+
flag
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module ApiWrapperFor8x8
|
2
|
+
class ResponseError < Exception
|
3
|
+
attr_reader :response
|
4
|
+
|
5
|
+
def initialize(response, message=nil)
|
6
|
+
self.set_backtrace(caller[1..-1]) if self.backtrace.nil?
|
7
|
+
@response = response
|
8
|
+
super((message || @response.message))
|
9
|
+
end
|
10
|
+
|
11
|
+
def code
|
12
|
+
@response.code
|
13
|
+
end
|
14
|
+
|
15
|
+
def common_solutions
|
16
|
+
if @response.code.to_i == 401
|
17
|
+
"Check your credentials and make sure they are correct and not expired"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def detailed_message
|
22
|
+
if @response.is_a? Hash
|
23
|
+
@response[:error][:message] if @response[:error]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/spec/.rspec
ADDED
data/spec/agent_spec.rb
ADDED
File without changes
|
data/spec/agents_spec.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe ApiWrapperFor8x8::Agents do
|
4
|
+
describe "agent_list" do
|
5
|
+
it "should GET /stats/agents.json" do
|
6
|
+
@api.should_receive(:get).with('/stats/agents.json', {})
|
7
|
+
@api.agent_list
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
describe "agents_detail" do
|
12
|
+
it "should receive an array of agent with their details" do
|
13
|
+
agent_id = 'agentId'
|
14
|
+
agents = [{'agent-id' => agent_id}]
|
15
|
+
resp = {'statistics' => {'statistic' => agents}}
|
16
|
+
agent_details = [{'agent-id' => agent_id, 'accepted-count' => 23}]
|
17
|
+
@api.stub(:agent_list)
|
18
|
+
expect(@api).to receive(:filtered_agents).with(agents, {}).and_return(agents)
|
19
|
+
expect(@api).to receive(:agent_list).with({}).and_return(agents)
|
20
|
+
expect(@api).to receive(:agent_detail).with(agent_id, {}).and_return(agent_details)
|
21
|
+
@api.agents_detail.should == agent_details
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
describe "filtered_agents" do
|
26
|
+
before :each do
|
27
|
+
@agent1 = {"agent-id" => "a", "enabled" => 'Y'}
|
28
|
+
@agent2 = {"agent-id" => 'b', "enabled" => 'D'}
|
29
|
+
@agent_lists = [@agent1, @agent2]
|
30
|
+
end
|
31
|
+
it "should filter agents with enabled" do
|
32
|
+
@api.filtered_agents(@agent_lists, {"enabled" => "Y"}).should == [@agent1]
|
33
|
+
@api.filtered_agents(@agent_lists, {"enabled" => "D"}).should == [@agent2]
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe ApiWrapperFor8x8::Channel do
|
4
|
+
before :each do
|
5
|
+
@resp = [{'accepted-count' => 3, 'entered-count' => 10, 'queue-name' => 'inbound'}, {'accepted-count' => 2, 'entered-count' => 5, 'queue-name' => 'outbound'}]
|
6
|
+
@filters = {'queue-name' => 'inbound'}
|
7
|
+
end
|
8
|
+
|
9
|
+
describe "channel_list" do
|
10
|
+
it "should GET /stats/channels.json" do
|
11
|
+
@api.should_receive(:get).with('/stats/channels.json', {})
|
12
|
+
@api.channel_list
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
|
17
|
+
describe "GET channel_details statistics" do
|
18
|
+
it "should GET /stats/channels/guid/statistics.json without options" do
|
19
|
+
@api.should_receive(:get).with('/stats/channels/1/statistics.json', {}, {})
|
20
|
+
@api.channel_details(1)
|
21
|
+
end
|
22
|
+
|
23
|
+
it "should GET channel details with date range" do
|
24
|
+
date_range = {:d => Time.now.iso8601+','+(Time.now-3600).iso8601}
|
25
|
+
@api.should_receive(:get).with('/stats/channels/1/statistics.json', date_range, {})
|
26
|
+
@api.channel_details(1, date_range)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe "channel_sum_x" do
|
31
|
+
before :each do
|
32
|
+
expect(@api).to receive(:get).with('/stats/channels/0/statistics.json', {}, {}).and_return(@resp)
|
33
|
+
end
|
34
|
+
|
35
|
+
it "should Get the sum of x" do
|
36
|
+
sum = @api.channel_sum_x('accepted-count')
|
37
|
+
sum.should == 5
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,93 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe ApiWrapperFor8x8::Connection do
|
4
|
+
before do
|
5
|
+
@net_http_response = Net::HTTPOK.new('1.1', 200, 'OK')
|
6
|
+
@net_http_response.stub(:body => '{}')
|
7
|
+
@httparty_response = double("HTTPartyResponse", :parsed_response => {}, :body => '{}', :success? => true)
|
8
|
+
end
|
9
|
+
describe "GET" do
|
10
|
+
describe "connection method" do
|
11
|
+
it "should have valid key tokens" do
|
12
|
+
@api.api_token_keys_valid?.should == true
|
13
|
+
end
|
14
|
+
|
15
|
+
it "should have invalid key tokens" do
|
16
|
+
@conn = ApiWrapperFor8x8::Connection.new({:username => '', :password => nil})
|
17
|
+
@conn.api_token_keys_valid?.should == false
|
18
|
+
end
|
19
|
+
|
20
|
+
it "should have incorrect url" do
|
21
|
+
url = "/stats/agent.json"
|
22
|
+
lambda {
|
23
|
+
@api.validate_and_extract_url(url)
|
24
|
+
}.should raise_error(ApiWrapperFor8x8::ResponseError)
|
25
|
+
end
|
26
|
+
|
27
|
+
it "should have correct url" do
|
28
|
+
urls = ["/stats/agents.json", "/stats/channels.json", "/stats/statistics.json"]
|
29
|
+
urls.each do |url|
|
30
|
+
@api.validate_and_extract_url(url).size.should > 0
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
describe "get_stat" do
|
36
|
+
before :each do
|
37
|
+
expect(@api).to receive(:validate_and_extract_url).with('').and_return('statistics')
|
38
|
+
@resp1 = {'statistics' => {'statistic' => []}}
|
39
|
+
@resp2 = {'statistics' => {'statistic' => [{}, {}]}}
|
40
|
+
end
|
41
|
+
|
42
|
+
it "should get empty stat" do
|
43
|
+
@api.get_stat(@resp1, '').should == []
|
44
|
+
end
|
45
|
+
|
46
|
+
it "should get correct stat" do
|
47
|
+
@api.get_stat(@resp2, '').should == [{}, {}]
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
describe "get" do
|
52
|
+
it "should have more than 50 records from the response" do
|
53
|
+
@api.stub(:request)
|
54
|
+
@api.stub(:parsed_response)
|
55
|
+
url = '/stats/channels/1/statistics.json'
|
56
|
+
params = {:n => 1}
|
57
|
+
expect(@api).to receive(:get_stat).exactly(ApiWrapperFor8x8::Connection::MAX_TRY)
|
58
|
+
.and_return([{}]*(ApiWrapperFor8x8::Connection::RECORDS_LIMIT))
|
59
|
+
@api.get(url, {:n => 1}).size.should == ApiWrapperFor8x8::Connection::RECORDS_LIMIT * ApiWrapperFor8x8::Connection::MAX_TRY
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
describe "apply_filter" do
|
64
|
+
before :each do
|
65
|
+
@resp = [{'accepted-count' => 3, 'entered-count' => 10, 'queue-name' => 'inbound'}, {'accepted-count' => 2, 'entered-count' => 5, 'queue-name' => 'outbound'}]
|
66
|
+
@filters = {'queue-name' => 'inbound'}
|
67
|
+
end
|
68
|
+
context "with filter options" do
|
69
|
+
it "should gat a list of hash that meet the filter options" do
|
70
|
+
list = @api.apply_filter(@resp, @filters)
|
71
|
+
list.size.should == 1
|
72
|
+
list[0]['queue-name'].should == 'inbound'
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
context "without filter option" do
|
77
|
+
it "should get a list of original hash" do
|
78
|
+
list = @api.apply_filter(@resp, {})
|
79
|
+
list.size.should == @resp.size
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
|
85
|
+
it "should get /stats/agents.json" do
|
86
|
+
url = "/stats/agents.json"
|
87
|
+
@api.should_receive(:get_stat).with(@httparty_response, url).and_return([{}])
|
88
|
+
@api.should_receive(:request).with(:get, url, {}).and_return(@httparty_response)
|
89
|
+
@api.get(url)
|
90
|
+
end
|
91
|
+
|
92
|
+
end
|
93
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rspec'
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'rspec/expectations'
|
5
|
+
require 'httparty'
|
6
|
+
require 'json'
|
7
|
+
|
8
|
+
Dir[File.dirname(__FILE__)+'/../lib/ApiWrapperFor8x8/*.rb'].each{|file| require file}
|
9
|
+
|
10
|
+
RSpec.configure do |config|
|
11
|
+
config.mock_with :rspec
|
12
|
+
|
13
|
+
config.before(:each) do
|
14
|
+
@api = ApiWrapperFor8x8::Connection.new({:username => ENV['PHONE_SYSTEM_UN'], :password => ENV['PHONE_SYSTEM_TOKEN']})
|
15
|
+
end
|
16
|
+
end
|
metadata
ADDED
@@ -0,0 +1,186 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ApiWrapperFor8x8
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- daifu
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-08-25 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: bundler
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '1.3'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.3'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rake
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rspec
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 2.11.0
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.11.0
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: debugger
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: bundler
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: 1.0.0
|
86
|
+
type: :runtime
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: 1.0.0
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: httparty
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: 0.9.0
|
102
|
+
type: :runtime
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 0.9.0
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: json
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ~>
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 1.8.0
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ~>
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: 1.8.0
|
126
|
+
description: 8x8 Phone System api wrapper to handle reporting.
|
127
|
+
email:
|
128
|
+
- daifu.ye@gmail.com
|
129
|
+
executables: []
|
130
|
+
extensions: []
|
131
|
+
extra_rdoc_files: []
|
132
|
+
files:
|
133
|
+
- .gitignore
|
134
|
+
- .rspec
|
135
|
+
- ApiWrapperFor8x8.gemspec
|
136
|
+
- Gemfile
|
137
|
+
- LICENSE.txt
|
138
|
+
- README.md
|
139
|
+
- Rakefile
|
140
|
+
- lib/ApiWrapperFor8x8.rb
|
141
|
+
- lib/ApiWrapperFor8x8/agent.rb
|
142
|
+
- lib/ApiWrapperFor8x8/agents.rb
|
143
|
+
- lib/ApiWrapperFor8x8/channel.rb
|
144
|
+
- lib/ApiWrapperFor8x8/connection.rb
|
145
|
+
- lib/ApiWrapperFor8x8/error.rb
|
146
|
+
- lib/ApiWrapperFor8x8/version.rb
|
147
|
+
- spec/.rspec
|
148
|
+
- spec/agent_spec.rb
|
149
|
+
- spec/agents_spec.rb
|
150
|
+
- spec/channel_spec.rb
|
151
|
+
- spec/connection_spec.rb
|
152
|
+
- spec/spec_helper.rb
|
153
|
+
- spec/version_spec.rb
|
154
|
+
homepage: https://github.com/daifu/api-wrapper-for-8x8
|
155
|
+
licenses:
|
156
|
+
- MIT
|
157
|
+
post_install_message:
|
158
|
+
rdoc_options: []
|
159
|
+
require_paths:
|
160
|
+
- lib
|
161
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
162
|
+
none: false
|
163
|
+
requirements:
|
164
|
+
- - ! '>='
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
168
|
+
none: false
|
169
|
+
requirements:
|
170
|
+
- - ! '>='
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '0'
|
173
|
+
requirements: []
|
174
|
+
rubyforge_project:
|
175
|
+
rubygems_version: 1.8.24
|
176
|
+
signing_key:
|
177
|
+
specification_version: 3
|
178
|
+
summary: 8x8 Phone System api wrapper
|
179
|
+
test_files:
|
180
|
+
- spec/.rspec
|
181
|
+
- spec/agent_spec.rb
|
182
|
+
- spec/agents_spec.rb
|
183
|
+
- spec/channel_spec.rb
|
184
|
+
- spec/connection_spec.rb
|
185
|
+
- spec/spec_helper.rb
|
186
|
+
- spec/version_spec.rb
|