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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 27a4a2dfb6ecd1c9cf8eaf93208b336b236f18df
4
- data.tar.gz: 3dfcc77783905d88224c86e6766b2d946596a3a8
3
+ metadata.gz: e77115f319abce3929645ec9ef8fab98cc93cd0c
4
+ data.tar.gz: f04729098443ac64ad77f966a9a517426223ba0d
5
5
  SHA512:
6
- metadata.gz: 1be6fe51afff75a4d1a99f27db24ac9e423bd118427b670ed96e6747f6aa4223f058190bb514044aea2eef99db5546f62f9580c0851043adb3b3cacc224bf7ab
7
- data.tar.gz: c5e0075dfd7f929c66dd6ebba6700c6019b6cbbebd7e9cfbc34fa03dfc6e241f8dedd27c6c2467deb3e5eb2ee29538300cddca85526182326f8ef0f9bc4451dd
6
+ metadata.gz: 2a2e525ca6f49ba8112b23f7c91d095cf76d48ee28f0a974f2ac7ff2968aec25a20dfb72b35a2de6593005f0949bca692915b1f7b10c3b4159a3ad89c7fc30d4
7
+ data.tar.gz: 0d70dd2892e4bff3640ed5873b8b2564deb86da92ee18095143cbcc61c56b435bcb5102fc1b2a744b157a9fb3c0bbe6aca8722388551a7c093c94e5cee70a990
@@ -18,3 +18,4 @@ end
18
18
  require 'albion-api/user_killboard.rb'
19
19
  require 'albion-api/user_search.rb'
20
20
  require 'albion-api/guild_search.rb'
21
+ require 'albion-api/guild_members.rb'
@@ -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.1
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