wanikani 1.0 → 1.1
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/wanikani/critical_items.rb +9 -0
- data/lib/wanikani/level.rb +7 -0
- data/lib/wanikani/recent_unlocks.rb +8 -0
- data/lib/wanikani/srs.rb +7 -0
- data/lib/wanikani/study_queue.rb +7 -0
- data/lib/wanikani/user.rb +7 -0
- data/lib/wanikani/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28088c83ce02711efa92d71f7344a944f1ba4405
|
4
|
+
data.tar.gz: 4dfa330aed8eb1992bd9cd151d59aa1c348f1e05
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3dd296641a5f18baf0b2f97994b972c7c443b066d337c78bbc7d8bb55b4e24a8bb3dabe19a3a17ffa4b56938e2b7961349813dd9f1ef599a0e6e0734cc88565e
|
7
|
+
data.tar.gz: 7d2da20dbbe55e90a3806db4d6e25cc49ac6d25fa2cc6e570b5c14f0563b53dae611ec78c1b3a3de6c6883f57ed6199bc4347286951f58a615d0258deded1d6b
|
@@ -10,5 +10,14 @@ module Wanikani
|
|
10
10
|
api_response = Wanikani.api_response("critical-items", percentage)
|
11
11
|
return api_response["requested_information"]
|
12
12
|
end
|
13
|
+
|
14
|
+
# Gets the full response of the Critical Items List API call.
|
15
|
+
#
|
16
|
+
# @param [Integer] percentage maximum percentage
|
17
|
+
# @return [Hash] Full response from the Critical Items List API call.
|
18
|
+
def self.full_response(percentage = 75)
|
19
|
+
raise ArgumentError, "Percentage must be an Integer between 0 and 100" if !percentage.between?(0, 100)
|
20
|
+
return Wanikani.api_response("critical-items", percentage)
|
21
|
+
end
|
13
22
|
end
|
14
23
|
end
|
data/lib/wanikani/level.rb
CHANGED
@@ -10,6 +10,13 @@ module Wanikani
|
|
10
10
|
return api_response["requested_information"].merge(current_level)
|
11
11
|
end
|
12
12
|
|
13
|
+
# Gets the full response of the Level Progression API call.
|
14
|
+
#
|
15
|
+
# @return [Hash] Full response from the Level Progression API call.
|
16
|
+
def self.full_response
|
17
|
+
return Wanikani.api_response("level-progression")
|
18
|
+
end
|
19
|
+
|
13
20
|
private
|
14
21
|
|
15
22
|
def self.method_missing(name, *args)
|
@@ -10,6 +10,14 @@ module Wanikani
|
|
10
10
|
return api_response["requested_information"]
|
11
11
|
end
|
12
12
|
|
13
|
+
# Gets the full response of the Recents Unlocks List API call.
|
14
|
+
#
|
15
|
+
# @param [Integer] limit the total number of items returned.
|
16
|
+
# @return [Hash] Full response from the Recent Unlocks List API call.
|
17
|
+
def self.full_response(limit = 10)
|
18
|
+
return Wanikani.api_response("recent-unlocks", limit)
|
19
|
+
end
|
20
|
+
|
13
21
|
private
|
14
22
|
|
15
23
|
def self.method_missing(name, *args)
|
data/lib/wanikani/srs.rb
CHANGED
@@ -35,5 +35,12 @@ module Wanikani
|
|
35
35
|
|
36
36
|
items_by_type.flatten
|
37
37
|
end
|
38
|
+
|
39
|
+
# Gets the full response of the SRS Distribution API call.
|
40
|
+
#
|
41
|
+
# @return [Hash] Full response from the SRS Distribution API call.
|
42
|
+
def self.full_response
|
43
|
+
return Wanikani.api_response("srs-distribution")
|
44
|
+
end
|
38
45
|
end
|
39
46
|
end
|
data/lib/wanikani/study_queue.rb
CHANGED
@@ -22,5 +22,12 @@ module Wanikani
|
|
22
22
|
def self.reviews_available?
|
23
23
|
return !self.queue["reviews_available"].zero?
|
24
24
|
end
|
25
|
+
|
26
|
+
# Gets the full response of the Study Queue API call.
|
27
|
+
#
|
28
|
+
# @return [Hash] Full response from the Study Queue API call.
|
29
|
+
def self.full_response
|
30
|
+
return Wanikani.api_response("study-queue")
|
31
|
+
end
|
25
32
|
end
|
26
33
|
end
|
data/lib/wanikani/user.rb
CHANGED
@@ -33,6 +33,13 @@ module Wanikani
|
|
33
33
|
return build_gravatar_url(hash, options)
|
34
34
|
end
|
35
35
|
|
36
|
+
# Gets the full response of the User Information API call.
|
37
|
+
#
|
38
|
+
# @return [Hash] Full response from the User Information API call.
|
39
|
+
def self.full_response
|
40
|
+
return Wanikani.api_response("user-information")
|
41
|
+
end
|
42
|
+
|
36
43
|
private
|
37
44
|
|
38
45
|
def self.build_gravatar_url(hash, options)
|
data/lib/wanikani/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wanikani
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dennis Martinez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '1.
|
61
|
+
version: '1.2'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '1.
|
68
|
+
version: '1.2'
|
69
69
|
description: Use WaniKani's (https://www.wanikani.com/) API in your Ruby applications
|
70
70
|
email: dennis@dennmart.com
|
71
71
|
executables: []
|
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
101
|
version: '0'
|
102
102
|
requirements: []
|
103
103
|
rubyforge_project:
|
104
|
-
rubygems_version: 2.
|
104
|
+
rubygems_version: 2.4.5
|
105
105
|
signing_key:
|
106
106
|
specification_version: 4
|
107
107
|
summary: Add Japanese Kanji learning goodness to your Ruby projects!
|