estrarb 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 +7 -0
- data/lib/Estra.rb +212 -0
- data/lib/EstraAPI/info.rb +21 -0
- metadata +44 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: eabe5d60b15cd0c3a38e4227df9063cf44b76c39907255ea8ef63de4db4f7de7
|
|
4
|
+
data.tar.gz: 4820085078162f5f4578e447c4b360b47f47464826ec9d7345108c72319236da
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: e2cf0dab1c75cf8838999c074e5e271cd1411c0b622e3f63b517488bf51569b08398df7cdeebc8bd6ce2b56e8a0cc65c8ebe967db21197ef8d4c5f9ff792bc7a
|
|
7
|
+
data.tar.gz: 7a4dd5dfca79d93f817a48ec97dca056d35477444d97e3adad4888961740b39cd45c9035166250069b7a68790d58c94bd0c7417f3b9590bdb373e3576be07ecf
|
data/lib/Estra.rb
ADDED
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
require_relative 'EstraAPI/info.rb'
|
|
2
|
+
include EstraInfo
|
|
3
|
+
|
|
4
|
+
BASE_URL = EstraInfo.BASE_URL
|
|
5
|
+
|
|
6
|
+
module EstraRB
|
|
7
|
+
class Base
|
|
8
|
+
def run
|
|
9
|
+
response = HTTParty.get(BASE_URL + "sfw/run")
|
|
10
|
+
if response.code == 200
|
|
11
|
+
parsed_json = JSON.parse(response.body)
|
|
12
|
+
output = parsed_json["link"]
|
|
13
|
+
return output
|
|
14
|
+
else
|
|
15
|
+
puts "It seems our API is not online for a while. Please try again later."
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def hug
|
|
20
|
+
response = HTTParty.get(BASE_URL + "sfw/hug")
|
|
21
|
+
if response.code == 200
|
|
22
|
+
parsed_json = JSON.parse(response.body)
|
|
23
|
+
output = parsed_json["link"]
|
|
24
|
+
return output
|
|
25
|
+
else
|
|
26
|
+
puts "It seems our API is not online for a while. Please try again later."
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def smile
|
|
31
|
+
response = HTTParty.get(BASE_URL + "sfw/smile")
|
|
32
|
+
if response.code == 200
|
|
33
|
+
parsed_json = JSON.parse(response.body)
|
|
34
|
+
output = parsed_json["link"]
|
|
35
|
+
return output
|
|
36
|
+
else
|
|
37
|
+
puts "It seems our API is not online for a while. Please try again later."
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def neko
|
|
42
|
+
response = HTTParty.get(BASE_URL + "sfw/neko")
|
|
43
|
+
if response.code == 200
|
|
44
|
+
parsed_json = JSON.parse(response.body)
|
|
45
|
+
output = parsed_json["link"]
|
|
46
|
+
return output
|
|
47
|
+
else
|
|
48
|
+
puts "It seems our API is not online for a while. Please try again later."
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def poke
|
|
54
|
+
response = HTTParty.get(BASE_URL + "sfw/poke")
|
|
55
|
+
if response.code == 200
|
|
56
|
+
parsed_json = JSON.parse(response.body)
|
|
57
|
+
output = parsed_json["link"]
|
|
58
|
+
return output
|
|
59
|
+
else
|
|
60
|
+
puts "It seems our API is not online for a while. Please try again later."
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def bite
|
|
66
|
+
response = HTTParty.get(BASE_URL + "sfw/bite")
|
|
67
|
+
if response.code == 200
|
|
68
|
+
parsed_json = JSON.parse(response.body)
|
|
69
|
+
output = parsed_json["link"]
|
|
70
|
+
return output
|
|
71
|
+
else
|
|
72
|
+
puts "It seems our API is not online for a while. Please try again later."
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def slap
|
|
78
|
+
response = HTTParty.get(BASE_URL + "sfw/slap")
|
|
79
|
+
if response.code == 200
|
|
80
|
+
parsed_json = JSON.parse(response.body)
|
|
81
|
+
output = parsed_json["link"]
|
|
82
|
+
return output
|
|
83
|
+
else
|
|
84
|
+
puts "It seems our API is not online for a while. Please try again later."
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def highfive
|
|
90
|
+
response = HTTParty.get(BASE_URL + "sfw/highfive")
|
|
91
|
+
if response.code == 200
|
|
92
|
+
parsed_json = JSON.parse(response.body)
|
|
93
|
+
output = parsed_json["link"]
|
|
94
|
+
return output
|
|
95
|
+
else
|
|
96
|
+
puts "It seems our API is not online for a while. Please try again later."
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def headpat
|
|
102
|
+
response = HTTParty.get(BASE_URL + "sfw/headpat")
|
|
103
|
+
if response.code == 200
|
|
104
|
+
parsed_json = JSON.parse(response.body)
|
|
105
|
+
output = parsed_json["link"]
|
|
106
|
+
return output
|
|
107
|
+
else
|
|
108
|
+
puts "It seems our API is not online for a while. Please try again later."
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
def kill
|
|
113
|
+
response = HTTParty.get(BASE_URL + "nsfw/kill")
|
|
114
|
+
if response.code == 200
|
|
115
|
+
parsed_json = JSON.parse(response.body)
|
|
116
|
+
output = parsed_json["link"]
|
|
117
|
+
return output
|
|
118
|
+
else
|
|
119
|
+
puts "It seems our API is not online for a while. Please try again later."
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
def yuri
|
|
124
|
+
response = HTTParty.get(BASE_URL + "nsfw/yuri")
|
|
125
|
+
if response.code == 200
|
|
126
|
+
parsed_json = JSON.parse(response.body)
|
|
127
|
+
output = parsed_json["link"]
|
|
128
|
+
return output
|
|
129
|
+
else
|
|
130
|
+
puts "It seems our API is not online for a while. Please try again later."
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
def yaoi
|
|
135
|
+
response = HTTParty.get(BASE_URL + "nsfw/yaoi")
|
|
136
|
+
if response.code == 200
|
|
137
|
+
parsed_json = JSON.parse(response.body)
|
|
138
|
+
output = parsed_json["link"]
|
|
139
|
+
return output
|
|
140
|
+
else
|
|
141
|
+
puts "It seems our API is not online for a while. Please try again later."
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
def waifu
|
|
146
|
+
response = HTTParty.get(BASE_URL + "anigames/waifu")
|
|
147
|
+
if response.code == 200
|
|
148
|
+
parsed_json = JSON.parse(response.body)
|
|
149
|
+
output = parsed_json["link"]
|
|
150
|
+
return output
|
|
151
|
+
else
|
|
152
|
+
puts "It seems our API is not online for a while. Please try again later."
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
def husbando
|
|
157
|
+
response = HTTParty.get(BASE_URL + "anigames/husbando")
|
|
158
|
+
if response.code == 200
|
|
159
|
+
parsed_json = JSON.parse(response.body)
|
|
160
|
+
output = parsed_json["link"]
|
|
161
|
+
return output
|
|
162
|
+
else
|
|
163
|
+
puts "It seems our API is not online for a while. Please try again later."
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
def anitruth
|
|
168
|
+
response = HTTParty.get(BASE_URL + "anigames/truth")
|
|
169
|
+
if response.code == 200
|
|
170
|
+
parsed_json = JSON.parse(response.body)
|
|
171
|
+
output = parsed_json["text"]
|
|
172
|
+
return output
|
|
173
|
+
else
|
|
174
|
+
puts "It seems our API is not online for a while. Please try again later."
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
def anidare
|
|
179
|
+
response = HTTParty.get(BASE_URL + "anigames/dare")
|
|
180
|
+
if response.code == 200
|
|
181
|
+
parsed_json = JSON.parse(response.body)
|
|
182
|
+
output = parsed_json["text"]
|
|
183
|
+
return output
|
|
184
|
+
else
|
|
185
|
+
puts "It seems our API is not online for a while. Please try again later."
|
|
186
|
+
end
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
def truth
|
|
190
|
+
response = HTTParty.get(BASE_URL + "games/truth")
|
|
191
|
+
if response.code == 200
|
|
192
|
+
parsed_json = JSON.parse(response.body)
|
|
193
|
+
output = parsed_json["text"]
|
|
194
|
+
return output
|
|
195
|
+
else
|
|
196
|
+
puts "It seems our API is not online for a while. Please try again later."
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
def dare
|
|
201
|
+
response = HTTParty.get(BASE_URL + "games/dare")
|
|
202
|
+
if response.code == 200
|
|
203
|
+
parsed_json = JSON.parse(response.body)
|
|
204
|
+
output = parsed_json["text"]
|
|
205
|
+
return output
|
|
206
|
+
else
|
|
207
|
+
puts "It seems our API is not online for a while. Please try again later."
|
|
208
|
+
end
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
end
|
|
212
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
require 'httparty'
|
|
2
|
+
require 'json'
|
|
3
|
+
|
|
4
|
+
module EstraInfo
|
|
5
|
+
def Version
|
|
6
|
+
response = HTTParty.get("https://estra-api.herokuapp.com/")
|
|
7
|
+
parse_json = JSON.parse(response.body)
|
|
8
|
+
versions = parse_json["Version"].freeze
|
|
9
|
+
return versions
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def BASE_URL
|
|
13
|
+
base_url = 'https://estra-api.herokuapp.com/api/'
|
|
14
|
+
return base_url
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def Data_URL
|
|
18
|
+
data_url = 'https://estra-api.herokuapp.com/'
|
|
19
|
+
return data_url
|
|
20
|
+
end
|
|
21
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: estrarb
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Stawa
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2021-12-26 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description:
|
|
14
|
+
email:
|
|
15
|
+
executables: []
|
|
16
|
+
extensions: []
|
|
17
|
+
extra_rdoc_files: []
|
|
18
|
+
files:
|
|
19
|
+
- lib/Estra.rb
|
|
20
|
+
- lib/EstraAPI/info.rb
|
|
21
|
+
homepage: https://github.com/StawaDev/EstraRuby
|
|
22
|
+
licenses:
|
|
23
|
+
- MIT
|
|
24
|
+
metadata: {}
|
|
25
|
+
post_install_message:
|
|
26
|
+
rdoc_options: []
|
|
27
|
+
require_paths:
|
|
28
|
+
- lib
|
|
29
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - ">="
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '0'
|
|
34
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
35
|
+
requirements:
|
|
36
|
+
- - ">="
|
|
37
|
+
- !ruby/object:Gem::Version
|
|
38
|
+
version: '0'
|
|
39
|
+
requirements: []
|
|
40
|
+
rubygems_version: 3.2.32
|
|
41
|
+
signing_key:
|
|
42
|
+
specification_version: 4
|
|
43
|
+
summary: A Basic Wrapper Anime Image API Created By Stawa
|
|
44
|
+
test_files: []
|