cocRb 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cocRb/api.rb +1 -0
- data/lib/cocRb/gp.rb +1 -1
- data/lib/cocRb/labels.rb +2 -2
- data/lib/cocRb/league.rb +15 -7
- data/lib/cocRb/location.rb +15 -5
- data/lib/cocRb/player.rb +6 -2
- data/lib/cocRb/utility.rb +2 -2
- data/lib/cocRb/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40977236bb351782aee366e88ea5d90fc6c0fef3dbe4b83f25fdf2b98e574a7f
|
4
|
+
data.tar.gz: f2015c08cb5d3d455a301e6e5d8a46cc82a7ef43098117cb620d729a9bfc8905
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8a652e3b7ed1d1d58260f40907511b5d62e432780e436631fa888c2790d1a6765489dfa222b376ad83b2ebee895c34762379a8c549bc8487c5c6ee5226abed4
|
7
|
+
data.tar.gz: 8b648b62dabbb6508b8a69c5179dda3f30a69d8f916bcc733c3bd32badba4e5182a1b5ad22fb90928c183baa21bfaee58a5b30b201cd725df44a7a17f69a5eba
|
data/lib/cocRb/api.rb
CHANGED
data/lib/cocRb/gp.rb
CHANGED
data/lib/cocRb/labels.rb
CHANGED
@@ -38,7 +38,7 @@ module CocRb
|
|
38
38
|
end
|
39
39
|
|
40
40
|
class Label < Settings
|
41
|
-
|
41
|
+
# This method gets Labels for the Player Profile.
|
42
42
|
def self.get_LabelPlayer(_limit:false, status: false)
|
43
43
|
get
|
44
44
|
res = @conn.get("v1/labels/players") do |req|
|
@@ -52,7 +52,7 @@ class Label < Settings
|
|
52
52
|
convert = JSON.parse(val)
|
53
53
|
end
|
54
54
|
end
|
55
|
-
|
55
|
+
# This method gets Labels for the Clan Profile.
|
56
56
|
def self.get_LabelClan(_limit:false, status: false)
|
57
57
|
get
|
58
58
|
res = @conn.get("v1/labels/clans") do |req|
|
data/lib/cocRb/league.rb
CHANGED
@@ -37,7 +37,7 @@ module CocRb
|
|
37
37
|
end
|
38
38
|
|
39
39
|
class League < Settings
|
40
|
-
|
40
|
+
# This method gets League ID for all the Leagues.
|
41
41
|
def self.get_LeaguesID(_limit:false, status:false)
|
42
42
|
get
|
43
43
|
res = @conn.get('v1/leagues') do |req|
|
@@ -53,8 +53,10 @@ class League < Settings
|
|
53
53
|
|
54
54
|
end
|
55
55
|
end
|
56
|
-
|
57
|
-
|
56
|
+
# This method gets season Info for Legend League, Takes League ID as a parameter.
|
57
|
+
#
|
58
|
+
# *Paramter Data Type* => _Integer_
|
59
|
+
def self.get_Seasons(leagueId:, _limit:false, status:false)
|
58
60
|
get
|
59
61
|
if leagueId != 29000022
|
60
62
|
puts "Not a valid League id,Seasons are only available for Legend League"
|
@@ -71,7 +73,9 @@ def self.get_Seasons(leagueId:, _limit:false, status:false)
|
|
71
73
|
end
|
72
74
|
end
|
73
75
|
end
|
74
|
-
|
76
|
+
# This method gets Season Rank for Legend League, Takes League ID and Season ID as parameter.
|
77
|
+
#
|
78
|
+
# *Paramter Data Types* => _Integer_, _String_
|
75
79
|
def self.get_LeagueSeasonRank(leagueId:, seasonId:, _limit:false, status:false)
|
76
80
|
get
|
77
81
|
if leagueId != 29000022
|
@@ -88,7 +92,9 @@ def self.get_Seasons(leagueId:, _limit:false, status:false)
|
|
88
92
|
end
|
89
93
|
end
|
90
94
|
end
|
91
|
-
|
95
|
+
# This method gets League Info for a particular league ID.
|
96
|
+
#
|
97
|
+
# *Paramter Data Type* => _Integer_
|
92
98
|
def self.get_LeagueInfo(leagueId:, status:false)
|
93
99
|
get
|
94
100
|
res = @conn.get("v1/leagues/#{leagueId}")
|
@@ -101,7 +107,7 @@ end
|
|
101
107
|
end
|
102
108
|
end
|
103
109
|
|
104
|
-
|
110
|
+
# This method gets War League ID.
|
105
111
|
def self.get_WarLeagueId(_limit:false, status:false)
|
106
112
|
get
|
107
113
|
res = @conn.get("v1/warleagues") do |req|
|
@@ -115,7 +121,9 @@ end
|
|
115
121
|
convert = JSON.parse(val)
|
116
122
|
end
|
117
123
|
end
|
118
|
-
|
124
|
+
# This method gets War League Info takes warLeagueId as a paramter.
|
125
|
+
#
|
126
|
+
# *Paramter Data Type* => _Integer_
|
119
127
|
def self.get_WarLeagueInfo(warLeagueId:, status:false)
|
120
128
|
get
|
121
129
|
res = @conn.get("v1/warleagues/#{warLeagueId}")
|
data/lib/cocRb/location.rb
CHANGED
@@ -50,7 +50,9 @@ class Location < Settings
|
|
50
50
|
|
51
51
|
end
|
52
52
|
end
|
53
|
-
# This method gets detailed location information takes Location as a paramter
|
53
|
+
# This method gets detailed location information, takes Location ID as a paramter.
|
54
|
+
#
|
55
|
+
# *Paramter Data Type* => _Integer_
|
54
56
|
def self.get_LocationInfo(locationId:, status:false)
|
55
57
|
get
|
56
58
|
res = @conn.get("v1/locations/#{locationId}")
|
@@ -62,7 +64,9 @@ end
|
|
62
64
|
end
|
63
65
|
end
|
64
66
|
|
65
|
-
|
67
|
+
# This method gets all the Ranked clans for a particular Location, Takes Location id as a paramter.
|
68
|
+
#
|
69
|
+
# *Paramter Data Type* => _Integer_
|
66
70
|
def self.get_LocationRankClan(locationId:, _limit:false, status:false)
|
67
71
|
get
|
68
72
|
res = @conn.get("v1/locations/#{locationId}/rankings/clans") do |req|
|
@@ -75,7 +79,9 @@ end
|
|
75
79
|
convert = JSON.parse(val)
|
76
80
|
end
|
77
81
|
end
|
78
|
-
|
82
|
+
# This method gets all the Ranked palyers for a particular Location, Takes Location id as a paramter.
|
83
|
+
#
|
84
|
+
# *Paramter Data Type* => _Integer_
|
79
85
|
def self.get_LocationRankPlayer(locationId:, _limit:false, status:false)
|
80
86
|
get
|
81
87
|
res = @conn.get("v1/locations/#{locationId}/rankings/players") do |req|
|
@@ -88,7 +94,9 @@ end
|
|
88
94
|
convert = JSON.parse(val)
|
89
95
|
end
|
90
96
|
end
|
91
|
-
|
97
|
+
# This method gets all the Ranked clans for Builder Base Clan Versus Trophies, Takes Location id as a paramter.
|
98
|
+
#
|
99
|
+
# *Paramter Data Type* => _Integer_
|
92
100
|
def self.get_LocationRankClanVersus(locationId:, _limit:false, status:false)
|
93
101
|
get
|
94
102
|
res = @conn.get("v1/locations/#{locationId}/rankings/clans-versus") do |req|
|
@@ -101,7 +109,9 @@ end
|
|
101
109
|
convert = JSON.parse(val)
|
102
110
|
end
|
103
111
|
end
|
104
|
-
|
112
|
+
# This method gets all the Ranked players for Builder Base Player Versus Trophies, Takes Location id as a paramter.
|
113
|
+
#
|
114
|
+
# *Paramter Data Type* => _Integer_
|
105
115
|
def self.get_LocationRankPlayerVersus(locationId:, _limit:false, status:false)
|
106
116
|
get
|
107
117
|
res = @conn.get("v1/locations/#{locationId}/rankings/players-versus") do |req|
|
data/lib/cocRb/player.rb
CHANGED
@@ -37,7 +37,9 @@ end
|
|
37
37
|
end
|
38
38
|
|
39
39
|
class Player < Settings
|
40
|
-
|
40
|
+
# This method gets Player Information, Takes player tag as a paramter
|
41
|
+
#
|
42
|
+
# *Paramter Data Type* => _String_
|
41
43
|
def self.get_PlayerByTag(tag:, status: false)
|
42
44
|
get
|
43
45
|
io = tag
|
@@ -51,7 +53,9 @@ end
|
|
51
53
|
convert = JSON.parse(val)
|
52
54
|
end
|
53
55
|
end
|
54
|
-
|
56
|
+
# This method verifies a player, Takes tag and playertoken as a parameter.
|
57
|
+
#
|
58
|
+
# *Paramter Data Types* => _String_
|
55
59
|
def self.verify_PlayerByToken(tag:, playertoken:)
|
56
60
|
get
|
57
61
|
io = tag
|
data/lib/cocRb/utility.rb
CHANGED
@@ -37,8 +37,8 @@ end
|
|
37
37
|
|
38
38
|
|
39
39
|
class Check < Settings
|
40
|
-
|
41
|
-
def self.
|
40
|
+
# This method gets headers for a particular endpoint. Takes the requestUrl in the configuration block.
|
41
|
+
def self.get_Headers
|
42
42
|
get
|
43
43
|
res = @conn.get(CocRb.configuration.url)
|
44
44
|
res.headers
|
data/lib/cocRb/version.rb
CHANGED