flowcommerce 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,19 @@
1
+ module FlowCommerce
2
+
3
+ def FlowCommerce.client(token, opts = {})
4
+ if token.empty?
5
+ raise "ERROR: Token is required"
6
+ end
7
+
8
+ base_url = opts[:base_url].to_s.strip
9
+ auth = Io::Flow::Catalog::V0::HttpClient::Authorization.basic(token)
10
+
11
+ if base_url.empty?
12
+ Io::Flow::Catalog::V0::Client.at_base_url(:authorization => auth)
13
+ else
14
+ Io::Flow::Catalog::V0::Client.new(base_url, :authorization => auth)
15
+ end
16
+ end
17
+
18
+
19
+ end
@@ -0,0 +1,6 @@
1
+ dir = File.dirname(__FILE__)
2
+
3
+ load File.join(dir, 'clients/flow_common_v0_client.rb')
4
+ load File.join(dir, 'clients/flow_catalog_v0_client.rb')
5
+
6
+ load File.join(dir, 'flow_commerce/client.rb')
metadata ADDED
@@ -0,0 +1,76 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: flowcommerce
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Flow Commerce, Inc.
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-03-11 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: json
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bigdecimal
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: Native ruby client for the Flow REST API. Detailed information at http://apidoc.me/flow
42
+ email: tech@flow.io
43
+ executables: []
44
+ extensions: []
45
+ extra_rdoc_files: []
46
+ files:
47
+ - README.md
48
+ - lib/clients/flow_catalog_v0_client.rb
49
+ - lib/clients/flow_common_v0_client.rb
50
+ - lib/flow_commerce/client.rb
51
+ - lib/flowcommerce.rb
52
+ homepage: https://github.com/flowcommerce/ruby-sdk
53
+ licenses:
54
+ - MIT
55
+ metadata: {}
56
+ post_install_message:
57
+ rdoc_options: []
58
+ require_paths:
59
+ - lib
60
+ required_ruby_version: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - '>='
63
+ - !ruby/object:Gem::Version
64
+ version: '0'
65
+ required_rubygems_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ requirements: []
71
+ rubyforge_project:
72
+ rubygems_version: 2.0.14
73
+ signing_key:
74
+ specification_version: 4
75
+ summary: Native ruby client for the Flow REST API.
76
+ test_files: []