bricklink 0.0.1 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -1
- data/Gemfile.lock +5 -5
- data/LICENSE.txt +21 -0
- data/README.md +39 -2
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/bricklink.gemspec +7 -7
- data/lib/bricklink.rb +5 -1
- data/lib/bricklink/client.rb +8 -1
- data/lib/bricklink/version.rb +1 -1
- data/spec/bricklink_spec.rb +9 -0
- data/spec/spec_helper.rb +1 -0
- metadata +31 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adf2186ae8f759f4e3e4ace8995f2fd27d1a5882758cfc9c156077301263b3e8
|
4
|
+
data.tar.gz: 282f59bdf2a4ffc6a748ac1165e6a80f92027971d61d130a19f1477a347c8b35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e7f617ec29686cc688b8053bbf6c69e0c05b9558206d9c0a42ecd23aa788e3f74687100f7accdf949a6885f614ac15b0d10a8d922f0a9e7a008b6d1c34b440e
|
7
|
+
data.tar.gz: 32624d51c802e0dc758ac44fb27cea5ce4fc8c276bd8bcedc594fce601be7b00236eaf07ba2383c169fef38a5f3374119c27032e56829444739deb61127965d8
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -2,7 +2,7 @@ PATH
|
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
4
|
bricklink (0.0.1)
|
5
|
-
oauth
|
5
|
+
oauth (~> 0.5)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
@@ -32,10 +32,10 @@ PLATFORMS
|
|
32
32
|
DEPENDENCIES
|
33
33
|
bricklink!
|
34
34
|
bundler (~> 2.0)
|
35
|
-
byebug
|
36
|
-
dotenv
|
37
|
-
rake
|
38
|
-
rspec
|
35
|
+
byebug (~> 11.0)
|
36
|
+
dotenv (~> 2.7)
|
37
|
+
rake (~> 13.0)
|
38
|
+
rspec (~> 3.9)
|
39
39
|
|
40
40
|
BUNDLED WITH
|
41
41
|
2.1.4
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2020 dbwinger
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,2 +1,39 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# Bricklink
|
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/bricklink`. 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
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'bricklink'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install bricklink
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/bricklink.
|
36
|
+
|
37
|
+
## License
|
38
|
+
|
39
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "bricklink"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/bricklink.gemspec
CHANGED
@@ -6,8 +6,7 @@ require 'bricklink/version'
|
|
6
6
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
8
|
spec.name = 'bricklink'
|
9
|
-
spec.version =
|
10
|
-
spec.date = '2020-01-07'
|
9
|
+
spec.version = Bricklink::VERSION
|
11
10
|
spec.summary = "BrickLink API Client"
|
12
11
|
spec.description = "Ruby Client for BrickLink API"
|
13
12
|
spec.authors = ["Daryl Winger"]
|
@@ -19,12 +18,13 @@ Gem::Specification.new do |spec|
|
|
19
18
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
20
19
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
21
20
|
spec.require_paths = ["lib"]
|
21
|
+
spec.platform = Gem::Platform::RUBY
|
22
22
|
|
23
23
|
spec.add_development_dependency 'bundler','~> 2.0'
|
24
|
-
spec.add_development_dependency 'rake'
|
25
|
-
spec.add_development_dependency 'rspec'
|
26
|
-
spec.add_development_dependency 'byebug'
|
27
|
-
spec.add_development_dependency 'dotenv'
|
24
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
25
|
+
spec.add_development_dependency 'rspec', '~> 3.9'
|
26
|
+
spec.add_development_dependency 'byebug', '~> 11.0'
|
27
|
+
spec.add_development_dependency 'dotenv', '~> 2.7'
|
28
28
|
|
29
|
-
spec.add_dependency 'oauth'
|
29
|
+
spec.add_dependency 'oauth', '~> 0.5'
|
30
30
|
end
|
data/lib/bricklink.rb
CHANGED
data/lib/bricklink/client.rb
CHANGED
@@ -12,7 +12,14 @@ module Bricklink
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def get_price_guide item_number, options = {}
|
15
|
-
|
15
|
+
default_params = {
|
16
|
+
'guide type' => 'stock',
|
17
|
+
'new_or_used' => 'N',
|
18
|
+
'country_code' => 'US',
|
19
|
+
'currency_code' => 'USD',
|
20
|
+
'region' => 'north_america'
|
21
|
+
}
|
22
|
+
call_api "/items/SET/#{item_number}/price", default_params.merge(options)
|
16
23
|
end
|
17
24
|
|
18
25
|
protected
|
data/lib/bricklink/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bricklink
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daryl Winger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -28,75 +28,77 @@ dependencies:
|
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
33
|
+
version: '13.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
40
|
+
version: '13.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '3.9'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '3.9'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: byebug
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
61
|
+
version: '11.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
68
|
+
version: '11.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: dotenv
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '2.7'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '2.7'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: oauth
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
89
|
+
version: '0.5'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
96
|
+
version: '0.5'
|
97
97
|
description: Ruby Client for BrickLink API
|
98
98
|
email: dbwinger@gmail.com
|
99
|
-
executables:
|
99
|
+
executables:
|
100
|
+
- console
|
101
|
+
- setup
|
100
102
|
extensions: []
|
101
103
|
extra_rdoc_files: []
|
102
104
|
files:
|
@@ -104,11 +106,16 @@ files:
|
|
104
106
|
- Gemfile
|
105
107
|
- Gemfile.lock
|
106
108
|
- LICENSE
|
109
|
+
- LICENSE.txt
|
107
110
|
- README.md
|
111
|
+
- Rakefile
|
112
|
+
- bin/console
|
113
|
+
- bin/setup
|
108
114
|
- bricklink.gemspec
|
109
115
|
- lib/bricklink.rb
|
110
116
|
- lib/bricklink/client.rb
|
111
117
|
- lib/bricklink/version.rb
|
118
|
+
- spec/bricklink_spec.rb
|
112
119
|
- spec/lib/client_spec.rb
|
113
120
|
- spec/spec_helper.rb
|
114
121
|
homepage: https://github.com/dbwinger/bricklink
|
@@ -135,5 +142,6 @@ signing_key:
|
|
135
142
|
specification_version: 4
|
136
143
|
summary: BrickLink API Client
|
137
144
|
test_files:
|
145
|
+
- spec/bricklink_spec.rb
|
138
146
|
- spec/lib/client_spec.rb
|
139
147
|
- spec/spec_helper.rb
|