shanon 0.1.2 → 0.2.0

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
2
  SHA1:
3
- metadata.gz: c1474207b017d79213bc4ea7d893c602097cac62
4
- data.tar.gz: a88bdc20f92aa93433b843faec3d9a956aa60c24
3
+ metadata.gz: 8ea43b55b0c79d948fd1f041a103f2ea936940af
4
+ data.tar.gz: 978c91174eca5dc9303aafe21e85886dbf835b71
5
5
  SHA512:
6
- metadata.gz: fdcd18eb93675f19d4f50f28cd418f1f04be8c843135d6c9dc8a0bb5571d02a3bef535c026d65a45c626003d46d87091121aaa1a75db94519de044a45b76e4da
7
- data.tar.gz: 4c82c2b56590b6d405b095cd21fad4533e89b02a07c07edd1ef182f18b1b8adeac8248796388dfc3ebc94249a630792e9f8cb206b876c888d4283ab32a7a470d
6
+ metadata.gz: 28e164efc1dc09e15f78d98116f6250e2c6436dd8e056877ba45c496ff1dec83f80f0f5acd0c9d05c245737aaf4e4cc0baec14ee4103bd545fcc713c6af4fa6f
7
+ data.tar.gz: e4ef971859dfe064a9cdd3d6fe3830f34d579c1f94f578ae096e90a6f6244bbae410a3400c42b0249922d995d972adcfa3eecb538fa9ed2818db1b65d19edcc1
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
+ Gemfile.lock
1
2
  /.bundle/
2
3
  /.yardoc
3
4
  /_yardoc/
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
- # Shanon
1
+ # Shanon Ruby Client [![Build Status](https://travis-ci.org/takuyan/shanon-ruby.svg?branch=master)](https://travis-ci.org/takuyan/shanon-ruby)
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/shanon`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ A Ruby client for the [Shanon Marketing Platform APIs](http://apidoc.shanon.co.jp/ja/api/).
6
4
 
7
5
  ## Installation
8
6
 
data/bin/console CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'bundler/setup'
4
- require 'shanon/ruby'
4
+ require 'shanon'
5
5
 
6
6
  # You can add fixtures and/or initialization code here to make experimenting
7
7
  # with your gem easier. You can also use a different console, if you like.
@@ -0,0 +1,22 @@
1
+ module Shanon
2
+ module Clients
3
+ # http://apidoc.shanon.co.jp/ja/api/visitor/enquete/get.html
4
+ class EnqueteClient < Shanon::AbstractClient
5
+ include Authenticatable
6
+
7
+ PATH = '/services/rest/visitor/enquete'.freeze
8
+
9
+ def get(opts={})
10
+ params = params_with_signature(opts)
11
+ response = conn.get PATH, params
12
+ parse(response.body)
13
+ end
14
+
15
+ private
16
+
17
+ def parse(xml)
18
+ ::Ox.parse(xml)
19
+ end
20
+ end
21
+ end
22
+ end
@@ -1,3 +1,3 @@
1
1
  module Shanon
2
- VERSION = '0.1.2'
2
+ VERSION = '0.2.0'
3
3
  end
data/lib/shanon.rb CHANGED
@@ -3,8 +3,9 @@ require 'shanon/version'
3
3
  require 'shanon/config'
4
4
  require 'shanon/abstract_client'
5
5
  require 'shanon/authenticatable'
6
- require 'shanon/clients/authentication_client'
7
- require 'shanon/clients/visitor_client'
6
+
7
+ # clients
8
+ Dir[File.join(File.dirname(__FILE__), 'shanon/clients/*_client.rb')].each {|f| require f }
8
9
 
9
10
  module Shanon
10
11
  # Your code goes here...
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shanon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takuya Kato
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-05 00:00:00.000000000 Z
11
+ date: 2018-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -128,6 +128,7 @@ files:
128
128
  - lib/shanon/abstract_client.rb
129
129
  - lib/shanon/authenticatable.rb
130
130
  - lib/shanon/clients/authentication_client.rb
131
+ - lib/shanon/clients/enquete_client.rb
131
132
  - lib/shanon/clients/visitor_client.rb
132
133
  - lib/shanon/config.rb
133
134
  - lib/shanon/version.rb