pokemon_tcg_sdk 2.5.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +11 -0
- data/README.md +8 -4
- data/Rakefile +1 -1
- data/lib/pokemon_tcg_sdk/card.rb +2 -2
- data/lib/pokemon_tcg_sdk/query_builder.rb +1 -1
- data/lib/pokemon_tcg_sdk/representers/card_representer.rb +1 -0
- data/lib/pokemon_tcg_sdk/representers/set_representer.rb +2 -0
- data/lib/pokemon_tcg_sdk/set.rb +2 -2
- data/lib/pokemon_tcg_sdk/version.rb +1 -1
- data/pokemon_tcg_sdk.gemspec +0 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7adbc58810fc030db16f7d4dd39b5e7b3b92436a
|
4
|
+
data.tar.gz: 13f38896f518634a223ca1b24fb4bad02a5ae8b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67e70378fbc2f402d255c666d3ab24df6a8e06145e057b31582f9c5f8cd376768fdc071e249e28a38a4d6c2907dc440315f7f9ada3acc8c500d9629bf11004af
|
7
|
+
data.tar.gz: c62805025b350dfcf4ad80c92e76ea5456fdafd9ebdbe51695bd6938a9546ebb714d9e6dd411bd847fbf0c3ba2ef2bb24776cd3fa7d6801834668f058250bc16
|
data/.travis.yml
CHANGED
@@ -1,4 +1,15 @@
|
|
1
|
+
env:
|
2
|
+
global:
|
3
|
+
- CC_TEST_REPORTER_ID=c14dfc2c8a10a029ac3706d2c2c86f63f663a1445df6213e013a42cbc9a55e74
|
1
4
|
language: ruby
|
2
5
|
rvm:
|
3
6
|
- 2.3.0
|
4
7
|
before_install: gem install bundler -v 1.12.5
|
8
|
+
before_script:
|
9
|
+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
10
|
+
- chmod +x ./cc-test-reporter
|
11
|
+
- ./cc-test-reporter before-build
|
12
|
+
script:
|
13
|
+
- rake test
|
14
|
+
after_script:
|
15
|
+
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
[![Build Status](https://travis-ci.org/PokemonTCG/pokemon-tcg-sdk-ruby.svg?branch=master)](https://travis-ci.org/PokemonTCG/pokemon-tcg-sdk-ruby)
|
5
5
|
[![Dependency Status](https://gemnasium.com/badges/github.com/PokemonTCG/pokemon-tcg-sdk-ruby.svg)](https://gemnasium.com/github.com/PokemonTCG/pokemon-tcg-sdk-ruby)
|
6
6
|
[![Code Climate](https://codeclimate.com/github/PokemonTCG/pokemon-tcg-sdk-ruby/badges/gpa.svg)](https://codeclimate.com/github/PokemonTCG/pokemon-tcg-sdk-ruby)
|
7
|
-
[![Coverage
|
7
|
+
[![Test Coverage](https://api.codeclimate.com/v1/badges/ee9d7d6ee5f8276729bc/test_coverage)](https://codeclimate.com/github/PokemonTCG/pokemon-tcg-sdk-ruby/test_coverage)
|
8
8
|
|
9
9
|
This is the Pokémon TCG SDK Ruby implementation. It is a wrapper around the Pokémon TCG API of [pokemontcg.io](http://pokemontcg.io/).
|
10
10
|
|
@@ -63,6 +63,7 @@ To change the API version (currently defaults to version 1)
|
|
63
63
|
set
|
64
64
|
set_code
|
65
65
|
retreat_cost
|
66
|
+
converted_retreat_cost
|
66
67
|
text
|
67
68
|
types
|
68
69
|
attacks
|
@@ -76,9 +77,12 @@ To change the API version (currently defaults to version 1)
|
|
76
77
|
name
|
77
78
|
series
|
78
79
|
total_cards
|
80
|
+
symbol_url
|
81
|
+
logo_url
|
79
82
|
standard_legal
|
80
83
|
expanded_legal
|
81
84
|
release_date
|
85
|
+
updated_at
|
82
86
|
|
83
87
|
#### Ability
|
84
88
|
|
@@ -112,7 +116,7 @@ To change the API version (currently defaults to version 1)
|
|
112
116
|
|
113
117
|
#### Filter Cards via query parameters
|
114
118
|
|
115
|
-
cards = Pokemon::Card.where(set: 'generations'
|
119
|
+
cards = Pokemon::Card.where(set: 'generations', supertype: 'pokemon')
|
116
120
|
|
117
121
|
#### Find all cards (will take awhile)
|
118
122
|
|
@@ -120,7 +124,7 @@ To change the API version (currently defaults to version 1)
|
|
120
124
|
|
121
125
|
#### Get all cards, but only a specific page of data
|
122
126
|
|
123
|
-
cards = Pokemon::Card.where(page: 5
|
127
|
+
cards = Pokemon::Card.where(page: 5, pageSize: 100)
|
124
128
|
|
125
129
|
#### Find a set by code
|
126
130
|
|
@@ -128,7 +132,7 @@ To change the API version (currently defaults to version 1)
|
|
128
132
|
|
129
133
|
#### Filter sets via query parameters
|
130
134
|
|
131
|
-
sets = Pokemon::Set.where(standardLegal: true)
|
135
|
+
sets = Pokemon::Set.where(standardLegal: true)
|
132
136
|
|
133
137
|
#### Get all Sets
|
134
138
|
|
data/Rakefile
CHANGED
data/lib/pokemon_tcg_sdk/card.rb
CHANGED
@@ -8,7 +8,7 @@ module Pokemon
|
|
8
8
|
attr_accessor :id, :name, :image_url, :image_url_hi_res, :subtype, :supertype, :ability,
|
9
9
|
:hp, :number, :artist, :rarity, :series, :set, :set_code,
|
10
10
|
:retreat_cost, :text, :types, :attacks, :weaknesses, :resistances,
|
11
|
-
:national_pokedex_number, :ancient_trait, :evolves_from
|
11
|
+
:national_pokedex_number, :ancient_trait, :evolves_from, :converted_retreat_cost
|
12
12
|
|
13
13
|
# Get the resource string
|
14
14
|
#
|
@@ -35,7 +35,7 @@ module Pokemon
|
|
35
35
|
# Adds a parameter to the hash of query parameters
|
36
36
|
#
|
37
37
|
# @param args [Hash] the query parameter
|
38
|
-
# @return [
|
38
|
+
# @return [Array<Card>] Array of Card objects
|
39
39
|
def self.where(args)
|
40
40
|
QueryBuilder.new(Card).where(args)
|
41
41
|
end
|
@@ -29,6 +29,7 @@ module Pokemon
|
|
29
29
|
property :set_code, as: :setCode
|
30
30
|
property :national_pokedex_number, as: :nationalPokedexNumber
|
31
31
|
property :evolves_from, as: :evolvesFrom
|
32
|
+
property :converted_retreat_cost, as: :convertedRetreatCost
|
32
33
|
|
33
34
|
collection :retreat_cost, as: :retreatCost
|
34
35
|
collection :text
|
@@ -9,9 +9,11 @@ module Pokemon
|
|
9
9
|
property :series
|
10
10
|
property :ptcgo_code, as: :ptcgoCode
|
11
11
|
property :symbol_url, as: :symbolUrl
|
12
|
+
property :logo_url, as: :logoUrl
|
12
13
|
property :total_cards, as: :totalCards
|
13
14
|
property :standard_legal, as: :standardLegal
|
14
15
|
property :expanded_legal, as: :expandedLegal
|
15
16
|
property :release_date, as: :releaseDate
|
17
|
+
property :updated_at, as: :updatedAt
|
16
18
|
end
|
17
19
|
end
|
data/lib/pokemon_tcg_sdk/set.rb
CHANGED
@@ -6,7 +6,7 @@ module Pokemon
|
|
6
6
|
include SetRepresenter
|
7
7
|
|
8
8
|
attr_accessor :code, :name, :series, :total_cards, :standard_legal, :expanded_legal, :release_date,
|
9
|
-
:symbol_url, :ptcgo_code
|
9
|
+
:symbol_url, :logo_url, :ptcgo_code, :updated_at
|
10
10
|
|
11
11
|
# Get the resource string
|
12
12
|
#
|
@@ -33,7 +33,7 @@ module Pokemon
|
|
33
33
|
# Adds a parameter to the hash of query parameters
|
34
34
|
#
|
35
35
|
# @param args [Hash] the query parameter
|
36
|
-
# @return [
|
36
|
+
# @return [Array<Set>] Array of Set objects
|
37
37
|
def self.where(args)
|
38
38
|
QueryBuilder.new(Set).where(args)
|
39
39
|
end
|
data/pokemon_tcg_sdk.gemspec
CHANGED
@@ -23,7 +23,6 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.add_development_dependency "vcr", "~> 3.0"
|
24
24
|
spec.add_development_dependency "webmock", "~> 2.1"
|
25
25
|
spec.add_development_dependency "simplecov", "~> 0.14"
|
26
|
-
spec.add_development_dependency "coveralls", "0.8.21"
|
27
26
|
spec.add_development_dependency "codeclimate-test-reporter", "~> 0.6"
|
28
27
|
|
29
28
|
spec.add_dependency "roar", "~> 1.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pokemon_tcg_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Backes
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -94,20 +94,6 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0.14'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: coveralls
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - '='
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: 0.8.21
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - '='
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: 0.8.21
|
111
97
|
- !ruby/object:Gem::Dependency
|
112
98
|
name: codeclimate-test-reporter
|
113
99
|
requirement: !ruby/object:Gem::Requirement
|