cantook 0.0.3 → 0.0.4
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/lib/cantook/base.rb +5 -2
- data/lib/cantook/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: 8f2fcc88549b583a38aafb51c0b03047928c1bb7
|
4
|
+
data.tar.gz: 9be02f0ae31395d99bd6977e63d4034f4571f8f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35c92813573e7e5e87401f296aa7df5009d7af837ddc1f8e114bbe7651dc5beaf81d16c3a6fb1601c1533d5d91072b48d0f28e692eb7f57c4fb92e935e153c97
|
7
|
+
data.tar.gz: 612c2083689e5a0fae64431c0beba5667c387015e8ac610b21acf7c1fc2566806f376b4c998f06bd70c71f265c490eafd6c6916ebceca1285cd9937a764ef21b
|
data/lib/cantook/base.rb
CHANGED
@@ -23,7 +23,8 @@ module Cantook
|
|
23
23
|
:format,
|
24
24
|
:response,
|
25
25
|
:query,
|
26
|
-
:sale_state
|
26
|
+
:sale_state,
|
27
|
+
:currency
|
27
28
|
|
28
29
|
# @param [Hash] params
|
29
30
|
# @option params [String] :username - your Cantook API username
|
@@ -33,6 +34,7 @@ module Cantook
|
|
33
34
|
# @option params [String] :isbn - ISBN of the publication you are selling
|
34
35
|
# @option params [String] :format - format of the publication being sold, eg 'epub' or 'mobi'
|
35
36
|
# @option params [String] :sale_state - use 'test' for test/development, nil for production (real sales)
|
37
|
+
# @option params [String] :currency - 3-letter ISO-4217 code
|
36
38
|
def initialize(params = {})
|
37
39
|
@username = params[:username]
|
38
40
|
@password = params[:password]
|
@@ -41,13 +43,14 @@ module Cantook
|
|
41
43
|
@isbn = params[:isbn]
|
42
44
|
@format = params[:format]
|
43
45
|
@sale_state = params[:sale_state]
|
46
|
+
@currency = params[:isbn]
|
44
47
|
@base_url = "https://#{platform}/api/organisations/#{organisation_id}"
|
45
48
|
@auth = { username: username, password: password }
|
46
49
|
end
|
47
50
|
|
48
51
|
# @return [Hash] A basic hash of options common to all Cantook requests
|
49
52
|
def base_options
|
50
|
-
{ format: format, isbn: isbn, sale_state: sale_state }
|
53
|
+
{ format: format, isbn: isbn, sale_state: sale_state, currency: currency }
|
51
54
|
end
|
52
55
|
private :base_options
|
53
56
|
|
data/lib/cantook/version.rb
CHANGED