bricklink 0.0.1 → 0.1.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6eb3d1505ac84f896ce4f6f42df0feae50571018a0321c0c64955d9e2776d950
4
- data.tar.gz: edcbbd7497dbf33dd33857fcd709cbe5a2932d242b07e2cfc42917f8dea62906
3
+ metadata.gz: adf2186ae8f759f4e3e4ace8995f2fd27d1a5882758cfc9c156077301263b3e8
4
+ data.tar.gz: 282f59bdf2a4ffc6a748ac1165e6a80f92027971d61d130a19f1477a347c8b35
5
5
  SHA512:
6
- metadata.gz: f8d3c517e6b4005a2020883b5a9bfd0fdb98f6182e44c3964001eb9c8fa51a624e55652159263931344591f45051988a8eea48aafc6a60175bfbad69d2c5cf20
7
- data.tar.gz: f7690c6e20c0d5b34dbddd8e349431434e768a62583dd0ac41f8064274ec23827ad80a3b917b43666aa44652bb0da0b98dc135444193e7af44fb4b94b3ee9dbf
6
+ metadata.gz: 2e7f617ec29686cc688b8053bbf6c69e0c05b9558206d9c0a42ecd23aa788e3f74687100f7accdf949a6885f614ac15b0d10a8d922f0a9e7a008b6d1c34b440e
7
+ data.tar.gz: 32624d51c802e0dc758ac44fb27cea5ce4fc8c276bd8bcedc594fce601be7b00236eaf07ba2383c169fef38a5f3374119c27032e56829444739deb61127965d8
data/Gemfile CHANGED
@@ -1,4 +1,5 @@
1
1
  source 'https://rubygems.org'
2
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
2
3
 
3
- # Specify your gem's dependencies in brickset.gemspec
4
+ # Specify your gem's dependencies in bricklink.gemspec
4
5
  gemspec
@@ -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
@@ -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
- # bricklink
2
- Ruby client for BrickLink API
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).
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -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__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -6,8 +6,7 @@ require 'bricklink/version'
6
6
 
7
7
  Gem::Specification.new do |spec|
8
8
  spec.name = 'bricklink'
9
- spec.version = '0.0.1'
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
@@ -1,4 +1,8 @@
1
1
  require 'dotenv/load'
2
2
  require 'byebug' if ENV['ENV'] == 'development'
3
3
  require 'bricklink/version'
4
- require 'bricklink/client'
4
+ require 'bricklink/client'
5
+
6
+ module BrickLink
7
+ class Error < StandardError; end
8
+ end
@@ -12,7 +12,14 @@ module Bricklink
12
12
  end
13
13
 
14
14
  def get_price_guide item_number, options = {}
15
- call_api "/items/SET/#{item_number}/price", options
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
@@ -1,3 +1,3 @@
1
1
  module Bricklink
2
- VERSION = "0.0.1"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -0,0 +1,9 @@
1
+ RSpec.describe Bricklink do
2
+ it "has a version number" do
3
+ expect(Bricklink::VERSION).not_to be nil
4
+ end
5
+
6
+ it "does something useful" do
7
+ expect(false).to eq(true)
8
+ end
9
+ end
@@ -1,3 +1,4 @@
1
+ require 'bundler/setup'
1
2
  require 'bricklink'
2
3
 
3
4
  # This file was generated by the `rspec --init` command. Conventionally, all
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.0.1
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-07 00:00:00.000000000 Z
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: '0'
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: '0'
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: '0'
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: '0'
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