marvellous 0.1.0 → 0.1.2
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 +36 -1
- data/lib/marvellous/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9583cf3bf961c82a50566fb8b768a32a7c889d26
|
|
4
|
+
data.tar.gz: 8652109fa64a1cf2374531171b725a156c1d1566
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cf5164bffd1451eb1f01fd024ce78523c6ee17d0101edbef392f58094caf4400c9cbb314a8538625165e003bcf1d01e156e534a641ec17c43647769acb15d251
|
|
7
|
+
data.tar.gz: 577636ce124cfe678bef9ceca22d48a2dd8ebc474bea8ef18d17c02c0eee8f56537960e8ecf549362f7cd4fce88b01b62a28746fb22274f1722d96a8bb152795
|
data/README.md
CHANGED
|
@@ -1,2 +1,37 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Marvellous
|
|
2
2
|
Marvel API Gem
|
|
3
|
+
|
|
4
|
+
Ruby wrapper for Marvel Comics API.
|
|
5
|
+
|
|
6
|
+
## Installation
|
|
7
|
+
|
|
8
|
+
Add this line to your application's Gemfile:
|
|
9
|
+
|
|
10
|
+
gem 'marvellous'
|
|
11
|
+
|
|
12
|
+
And then execute:
|
|
13
|
+
|
|
14
|
+
$ bundle
|
|
15
|
+
|
|
16
|
+
Or install it yourself as:
|
|
17
|
+
|
|
18
|
+
$ gem install marvellous
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
Please register first in the [Marvel Comics Developer
|
|
23
|
+
Portal](http://developer.marvel.com/) to get your API credentials (a public key
|
|
24
|
+
and a private key, you'll need them both to configure and instantiate a client).
|
|
25
|
+
|
|
26
|
+
### Instantiate a client
|
|
27
|
+
|
|
28
|
+
```ruby
|
|
29
|
+
client = Marvellous::Client.new( :public_key => 'abcd1234', :private_key => '5678efgh')
|
|
30
|
+
|
|
31
|
+
# fetch a list of characters (https://developer.marvel.com/docs#!/public/getCreatorCollection_get_0)
|
|
32
|
+
client.characters # by default pagination of 10 items is implemented
|
|
33
|
+
client.characters({page_size: 20, page_num: 2}) # to change the default pagination settings
|
|
34
|
+
client.characters({paginate: false}) # to turn off pagination
|
|
35
|
+
|
|
36
|
+
# fetch a single character by characterId (https://developer.marvel.com/docs#!/public/getCreatorCollection_get_0)
|
|
37
|
+
client.character({id: 1009610})
|
data/lib/marvellous/version.rb
CHANGED