mkmapi 0.1.7 → 0.1.8
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 → README.md} +17 -13
- data/lib/mkmapi/marketplace.rb +2 -2
- data/lib/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60f2fe81fd10630fc9f978545bd3f26eae090537fffb5540c08df5f691e1d398
|
4
|
+
data.tar.gz: c0b45b5b5965b46dbdb3b18f36a05870c980dd5848a17895536d7d3a0c11f694
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f0a8c9d40b3b11a86a8894e88ca3ecc652abe1bc1bfc9488877663cbf3ca25479e5b24ff223769c03939ef5aca62cabdad956f3c02d5bf5c94d17255c07c256
|
7
|
+
data.tar.gz: 519623f93e297eacdb5390e4b121461cabf23b74bc4dcad67fda4c54d9d7eabb7872f7b3a48c1b7c63e8991b32682d5338825081bd1e0292dcada37942448093
|
data/{README → README.md}
RENAMED
@@ -1,16 +1,16 @@
|
|
1
|
-
|
1
|
+
# Mkmapi
|
2
2
|
|
3
|
-
Ruby interface to the
|
3
|
+
Ruby interface to the cardmarket.eu
|
4
4
|
|
5
|
-
|
5
|
+
## Usage
|
6
6
|
|
7
7
|
You'll need an OAuth credentials for a dedicated app from Mkmapi.
|
8
8
|
|
9
|
-
|
9
|
+
**Add to your Gemfile**
|
10
10
|
|
11
|
-
gem 'mkmapi'
|
11
|
+
gem 'mkmapi'
|
12
12
|
|
13
|
-
Create a session
|
13
|
+
**Create a session**
|
14
14
|
|
15
15
|
session = Mkmapi.auth({
|
16
16
|
consumer_key: "xxxx",
|
@@ -19,16 +19,16 @@ Create a session
|
|
19
19
|
token_secret: "xxxx",
|
20
20
|
})
|
21
21
|
|
22
|
-
Retrieve your account's data
|
22
|
+
**Retrieve your account's data**
|
23
23
|
|
24
24
|
me = session.account # => Mkmapi::Account
|
25
25
|
me.id # => 1234
|
26
26
|
me.username # => 'your_user_name'
|
27
27
|
|
28
|
-
|
28
|
+
## TODO
|
29
29
|
|
30
|
-
*
|
31
|
-
*
|
30
|
+
* Domain models
|
31
|
+
* Documentation
|
32
32
|
* Account Management
|
33
33
|
* Market Place Information (partially)
|
34
34
|
* Order Management
|
@@ -36,7 +36,7 @@ Retrieve your account's data
|
|
36
36
|
* Stock Management
|
37
37
|
* Wants List Management
|
38
38
|
|
39
|
-
|
39
|
+
## Contributing to Mkmapi
|
40
40
|
|
41
41
|
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
42
42
|
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
@@ -45,6 +45,10 @@ Retrieve your account's data
|
|
45
45
|
* Commit and push until you are happy with your contribution.
|
46
46
|
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
47
47
|
|
48
|
-
|
48
|
+
## References
|
49
|
+
Cardmarket RESTful API Documentation: https://api.cardmarket.com/ws/documentation/API_2.0:Main_Page
|
49
50
|
|
50
|
-
|
51
|
+
## Contributors
|
52
|
+
|
53
|
+
[<img src="https://github.com/arjenbrandenburgh.png?size=72" alt="arjenbrandenburgh" width="72">](https://github.com/arjenbrandenburgh)
|
54
|
+
[<img src="https://github.com/knaveofdiamonds.png?size=72" alt="knaveofdiamonds" width="72">](https://github.com/knaveofdiamonds)
|
data/lib/mkmapi/marketplace.rb
CHANGED
@@ -4,8 +4,8 @@ require "stringio"
|
|
4
4
|
|
5
5
|
module Mkmapi
|
6
6
|
class Marketplace < Struct.new(:agent)
|
7
|
-
def priceguide
|
8
|
-
json_data = agent.get("priceguide")
|
7
|
+
def priceguide(game_id = 1)
|
8
|
+
json_data = agent.get("priceguide?idGame=#{game_id}")
|
9
9
|
|
10
10
|
if (json_data && json_data["priceguidefile"])
|
11
11
|
data = Base64.decode64(json_data["priceguidefile"])
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mkmapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arjen Brandenburgh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -119,7 +119,7 @@ files:
|
|
119
119
|
- ".gitignore"
|
120
120
|
- Gemfile
|
121
121
|
- LICENSE
|
122
|
-
- README
|
122
|
+
- README.md
|
123
123
|
- Rakefile
|
124
124
|
- lib/mkmapi.rb
|
125
125
|
- lib/mkmapi/agent.rb
|