albion-api 0.2.1 → 0.2.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/lib/albion-api.rb +1 -0
- data/lib/albion-api/guild_members.rb +32 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e77115f319abce3929645ec9ef8fab98cc93cd0c
|
4
|
+
data.tar.gz: f04729098443ac64ad77f966a9a517426223ba0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a2e525ca6f49ba8112b23f7c91d095cf76d48ee28f0a974f2ac7ff2968aec25a20dfb72b35a2de6593005f0949bca692915b1f7b10c3b4159a3ad89c7fc30d4
|
7
|
+
data.tar.gz: 0d70dd2892e4bff3640ed5873b8b2564deb86da92ee18095143cbcc61c56b435bcb5102fc1b2a744b157a9fb3c0bbe6aca8722388551a7c093c94e5cee70a990
|
data/lib/albion-api.rb
CHANGED
@@ -0,0 +1,32 @@
|
|
1
|
+
module AlbionApi
|
2
|
+
# the class for getting the members of a Guild
|
3
|
+
class GuildMembers < AlbionRequest
|
4
|
+
def initialize(guild_api_id)
|
5
|
+
@guild_api_id = guild_api_id
|
6
|
+
end
|
7
|
+
|
8
|
+
def find
|
9
|
+
response = self.class.get("/guilds/#{@guild_api_id}/members")
|
10
|
+
Response.new(response)
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
attr_accessor :guild_api_id
|
16
|
+
|
17
|
+
# the response class
|
18
|
+
class Response
|
19
|
+
def initialize(response)
|
20
|
+
@_members = JSON.parse(response.body)
|
21
|
+
end
|
22
|
+
|
23
|
+
def members
|
24
|
+
@_members
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
attr_accessor :_members
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: albion-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyle Montag
|
@@ -17,6 +17,7 @@ extensions: []
|
|
17
17
|
extra_rdoc_files: []
|
18
18
|
files:
|
19
19
|
- lib/albion-api.rb
|
20
|
+
- lib/albion-api/guild_members.rb
|
20
21
|
- lib/albion-api/guild_search.rb
|
21
22
|
- lib/albion-api/user_killboard.rb
|
22
23
|
- lib/albion-api/user_search.rb
|