ani-api 0.1.0 → 0.1.3
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/ani-api.rb +5 -3
- 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: 74027d203bfc80a163467cf45091182dd41faedf79e329363f1ff289b0daf757
|
|
4
|
+
data.tar.gz: 728435c20a7f389282cf5d7e23cf4ae1316af1b621e257a19fad320304c8767d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 79a6abbd2111044dba351343591ae576eebe9e4f5df06744e7ab9c75e45ca01c596cc09aa88e6897f9d5d6432393076774bec6053bc20148ecf0f38b233cbef3
|
|
7
|
+
data.tar.gz: 5711bc43d8306b4d5f52548f0f95bc990afbcc077f534bbf99e1f9c7ad6e7c464fc6364b901f7324d5c5dd97e80130e045b7a6c04fdacc7b04201d213b8bf54a
|
data/lib/ani-api.rb
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
1
|
require 'net/http'
|
|
3
2
|
require 'json'
|
|
4
3
|
|
|
@@ -18,11 +17,14 @@ class AniApi
|
|
|
18
17
|
duration
|
|
19
18
|
chapters
|
|
20
19
|
volumes
|
|
20
|
+
genres
|
|
21
|
+
averageScore
|
|
21
22
|
title {
|
|
22
23
|
romaji
|
|
23
24
|
english
|
|
24
25
|
native
|
|
25
26
|
}
|
|
27
|
+
description
|
|
26
28
|
seasonYear
|
|
27
29
|
startDate {
|
|
28
30
|
day, month, year
|
|
@@ -40,7 +42,7 @@ class AniApi
|
|
|
40
42
|
response = make_request(query, { id: id })
|
|
41
43
|
@rate_limit = response['X-RateLimit-Remaining'].to_i
|
|
42
44
|
|
|
43
|
-
JSON.parse(response.body)["data"]["Media"]
|
|
45
|
+
JSON.parse(response.body)["data"]["Media"].compact
|
|
44
46
|
end
|
|
45
47
|
|
|
46
48
|
def self.search(title)
|
|
@@ -82,4 +84,4 @@ class AniApi
|
|
|
82
84
|
def self.rate_limit_remaining
|
|
83
85
|
@rate_limit
|
|
84
86
|
end
|
|
85
|
-
end
|
|
87
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ani-api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daniel Fürst
|
|
@@ -33,7 +33,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
33
33
|
- !ruby/object:Gem::Version
|
|
34
34
|
version: '0'
|
|
35
35
|
requirements: []
|
|
36
|
-
rubygems_version:
|
|
36
|
+
rubygems_version: 4.0.16
|
|
37
37
|
specification_version: 4
|
|
38
|
-
summary: A ruby gem that handles communication with the Anilist
|
|
38
|
+
summary: A ruby gem that handles communication with the Anilist API
|
|
39
39
|
test_files: []
|