boundio 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in boundio.gemspec
4
+ gemspec
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
data/bin/boundio ADDED
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ lib_dir = File.join(File.dirname(__FILE__), '..', 'lib')
4
+ $LOAD_PATH.unshift lib_dir if File.directory?(lib_dir)
5
+
6
+ require 'boundio'
7
+
8
+ client = Boundio::Client.new(ENV["BOUNDIO_USER_SERIAL_ID"], ENV["BOUNDIO_API_KEY"])
9
+ puts client.call(ARGV[0], ARGV[1]).inspect
data/boundio.gemspec ADDED
@@ -0,0 +1,24 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "boundio/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "boundio"
7
+ s.version = Boundio::VERSION
8
+ s.authors = ["Paul McMahon"]
9
+ s.email = ["paul@mobalean.com"]
10
+ s.homepage = "http://boundio.jp"
11
+ s.summary = %q{Wrapper for Boundio API}
12
+ s.description = %q{Boundio is KDDI's telephony API. This is a simple wrapper for it.}
13
+
14
+ s.rubyforge_project = "boundio"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
20
+
21
+ # specify any dependencies here; for example:
22
+ # s.add_development_dependency "rspec"
23
+ s.add_runtime_dependency "rest-client"
24
+ end
@@ -0,0 +1,12 @@
1
+ module Boundio
2
+ class Client
3
+ def initialize(user_serial_id, api_key)
4
+ @user_serial_id, @api_key = user_serial_id, api_key
5
+ end
6
+
7
+ def call(tel_to, cast)
8
+ RestClient.post "https://boundio.jp/api/vd1/#{@user_serial_id}/call",
9
+ :key => @api_key, :tel_to => tel_to, :cast => cast
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,3 @@
1
+ module Boundio
2
+ VERSION = "0.0.1"
3
+ end
data/lib/boundio.rb ADDED
@@ -0,0 +1,7 @@
1
+ require "boundio/version"
2
+ require "boundio/client"
3
+ require "rest-client"
4
+
5
+ module Boundio
6
+ # Your code goes here...
7
+ end
metadata ADDED
@@ -0,0 +1,65 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: boundio
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Paul McMahon
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-02-25 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rest-client
16
+ requirement: &75284790 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *75284790
25
+ description: Boundio is KDDI's telephony API. This is a simple wrapper for it.
26
+ email:
27
+ - paul@mobalean.com
28
+ executables:
29
+ - boundio
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - .gitignore
34
+ - Gemfile
35
+ - Rakefile
36
+ - bin/boundio
37
+ - boundio.gemspec
38
+ - lib/boundio.rb
39
+ - lib/boundio/client.rb
40
+ - lib/boundio/version.rb
41
+ homepage: http://boundio.jp
42
+ licenses: []
43
+ post_install_message:
44
+ rdoc_options: []
45
+ require_paths:
46
+ - lib
47
+ required_ruby_version: !ruby/object:Gem::Requirement
48
+ none: false
49
+ requirements:
50
+ - - ! '>='
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ required_rubygems_version: !ruby/object:Gem::Requirement
54
+ none: false
55
+ requirements:
56
+ - - ! '>='
57
+ - !ruby/object:Gem::Version
58
+ version: '0'
59
+ requirements: []
60
+ rubyforge_project: boundio
61
+ rubygems_version: 1.8.10
62
+ signing_key:
63
+ specification_version: 3
64
+ summary: Wrapper for Boundio API
65
+ test_files: []