scryfall 0.2.8 → 0.2.10
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 +4 -4
- data/README.md +8 -0
- data/lib/scryfall/api.rb +0 -0
- data/lib/scryfall/base.rb +0 -0
- data/lib/scryfall/cards.rb +7 -7
- data/lib/scryfall/error_handler.rb +0 -0
- data/lib/scryfall/errors.rb +0 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fab73fcde05766d59ea69d824cb1875abf95ce216e95d86c6bf394fda4dbbf5
|
4
|
+
data.tar.gz: ea3d75a1e42fba00497c4b8c93f6be1be57d0106ca87aeddf016c2e83eb11d6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1683614a83630d47312424165139e0c2b46adada2e118b89e2bd0382ff63b777d0fe8c710b270e63a124889c3026979654be85ec5d387e1e96e2a604cc3b98ab
|
7
|
+
data.tar.gz: 6e11d6f4f52ecb98bad64e26b043d8f06d1b7b9d6bc6c3ed19bdc4086c0658b23764e3d61193c061ecc5b261eb54b4e395590c37298bc0c6c927306f7e5ece29
|
data/README.md
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
# scryfall-rails
|
2
2
|
[](https://badge.fury.io/rb/scryfall)
|
3
|
+
|
4
|
+
Master
|
3
5
|
[](https://circleci.com/gh/jlcarruda/scryfall-rails/tree/master)
|
4
6
|
|
7
|
+
Development
|
8
|
+
[](https://circleci.com/gh/jlcarruda/scryfall-rails/tree/development)
|
9
|
+
|
5
10
|
A simple gem that utilizes the Scryfall API to get Magic: the Gathering card information.
|
6
11
|
|
7
12
|
|
@@ -26,6 +31,9 @@ The Scryfall module have classes for each query on the Scryfall API. Each class
|
|
26
31
|
At first, there are only a few methods available:
|
27
32
|
|
28
33
|
# ::Cards
|
34
|
+
|
35
|
+
Using ```require "scryfall/cards"```, you will have access to the ```Scryfall::Cards``` class. It encapsulates the logics on the API that returns a set of cards, or an object representing a single one.
|
36
|
+
|
29
37
|
### Named (fuzzy and exact)
|
30
38
|
|
31
39
|
It searches for cards named almost as the string passed (fuzzy), or with the exact name as the string passed (exact)
|
data/lib/scryfall/api.rb
CHANGED
File without changes
|
data/lib/scryfall/base.rb
CHANGED
File without changes
|
data/lib/scryfall/cards.rb
CHANGED
@@ -2,11 +2,11 @@ module Scryfall
|
|
2
2
|
require 'scryfall/base'
|
3
3
|
class Cards < Base
|
4
4
|
def self.named_fuzzy(cardname, **args)
|
5
|
-
api.get '/cards/named', { fuzzy: cardname }, args
|
5
|
+
api.get '/cards/named', { fuzzy: cardname }, **args
|
6
6
|
end
|
7
7
|
|
8
8
|
def self.named_exact(cardname, **args)
|
9
|
-
api.get '/cards/named', { exact: cardname }, args
|
9
|
+
api.get '/cards/named', { exact: cardname }, **args
|
10
10
|
end
|
11
11
|
|
12
12
|
def self.search(query, **args)
|
@@ -16,23 +16,23 @@ module Scryfall
|
|
16
16
|
params['page'] = args.page
|
17
17
|
end
|
18
18
|
|
19
|
-
api.get '/cards/search', params, args
|
19
|
+
api.get '/cards/search', params, **args
|
20
20
|
end
|
21
21
|
|
22
22
|
def self.with_mtgo_id(id, **args)
|
23
|
-
api.get "/cards/mtgo/#{id}", {}, args
|
23
|
+
api.get "/cards/mtgo/#{id}", {}, **args
|
24
24
|
end
|
25
25
|
|
26
26
|
def self.with_arena_id(id, **args)
|
27
|
-
api.get "/cards/arena/#{id}", {}, args
|
27
|
+
api.get "/cards/arena/#{id}", {}, **args
|
28
28
|
end
|
29
29
|
|
30
30
|
def self.with_tcgplayer_id(id, **args)
|
31
|
-
api.get "/cards/tcgplayer/#{id}", {}, args
|
31
|
+
api.get "/cards/tcgplayer/#{id}", {}, **args
|
32
32
|
end
|
33
33
|
|
34
34
|
def self.with_id(id, **args)
|
35
|
-
api.get "/cards/#{id}", {}, args
|
35
|
+
api.get "/cards/#{id}", {}, **args
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end
|
File without changes
|
data/lib/scryfall/errors.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scryfall
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- João Lucas
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '4'
|
34
34
|
type: :runtime
|
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: '
|
40
|
+
version: '4'
|
41
41
|
description: A simple way to connect with Scryfall API and get MTG Card info easily
|
42
42
|
email: jlcarruda3@gmail.com
|
43
43
|
executables: []
|
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
70
|
- !ruby/object:Gem::Version
|
71
71
|
version: '0'
|
72
72
|
requirements: []
|
73
|
-
rubygems_version: 3.
|
73
|
+
rubygems_version: 3.1.2
|
74
74
|
signing_key:
|
75
75
|
specification_version: 4
|
76
76
|
summary: A gem made to contact Scryfall API
|