lib/cocRb/location.rb in cocRb-0.1.4 vs lib/cocRb/location.rb in cocRb-0.1.5
- old
+ new
@@ -48,11 +48,13 @@
val = res.body
convert = JSON.parse(val)
end
end
- # This method gets detailed location information takes Location as a paramter
+ # This method gets detailed location information, takes Location ID as a paramter.
+ #
+ # *Paramter Data Type* => _Integer_
def self.get_LocationInfo(locationId:, status:false)
get
res = @conn.get("v1/locations/#{locationId}")
if status
res.status
@@ -60,11 +62,13 @@
val = res.body
convert = JSON.parse(val)
end
end
-
+ # This method gets all the Ranked clans for a particular Location, Takes Location id as a paramter.
+ #
+ # *Paramter Data Type* => _Integer_
def self.get_LocationRankClan(locationId:, _limit:false, status:false)
get
res = @conn.get("v1/locations/#{locationId}/rankings/clans") do |req|
req.params[:limit] = _limit if _limit
end
@@ -73,11 +77,13 @@
else
val = res.body
convert = JSON.parse(val)
end
end
-
+ # This method gets all the Ranked palyers for a particular Location, Takes Location id as a paramter.
+ #
+ # *Paramter Data Type* => _Integer_
def self.get_LocationRankPlayer(locationId:, _limit:false, status:false)
get
res = @conn.get("v1/locations/#{locationId}/rankings/players") do |req|
req.params[:limit] = _limit if _limit
end
@@ -86,11 +92,13 @@
else
val = res.body
convert = JSON.parse(val)
end
end
-
+ # This method gets all the Ranked clans for Builder Base Clan Versus Trophies, Takes Location id as a paramter.
+ #
+ # *Paramter Data Type* => _Integer_
def self.get_LocationRankClanVersus(locationId:, _limit:false, status:false)
get
res = @conn.get("v1/locations/#{locationId}/rankings/clans-versus") do |req|
req.params[:limit] = _limit if _limit
end
@@ -99,10 +107,12 @@
else
val = res.body
convert = JSON.parse(val)
end
end
-
+ # This method gets all the Ranked players for Builder Base Player Versus Trophies, Takes Location id as a paramter.
+ #
+ # *Paramter Data Type* => _Integer_
def self.get_LocationRankPlayerVersus(locationId:, _limit:false, status:false)
get
res = @conn.get("v1/locations/#{locationId}/rankings/players-versus") do |req|
req.params[:limit] = _limit if _limit
end