class CocRb::Location
Public Class Methods
get_LocationId(_limit:false, status:false)
click to toggle source
This method will get all the location ID including country name and country code.
# File lib/cocRb/location.rb, line 40 def self.get_LocationId(_limit:false, status:false) get res = @conn.get("v1/locations") do |req| req.params[:limit] = _limit if _limit end if status res.status else val = res.body convert = JSON.parse(val) end end
get_LocationInfo(locationId:, status:false)
click to toggle source
This method gets detailed location information, takes Location
ID as a paramter.
Paramter Data Type => Integer
# File lib/cocRb/location.rb, line 56 def self.get_LocationInfo(locationId:, status:false) get res = @conn.get("v1/locations/#{locationId}") if status res.status else val = res.body convert = JSON.parse(val) end end
get_LocationRankClan(locationId:, _limit:false, status:false)
click to toggle source
This method gets all the Ranked clans for a particular Location
, Takes Location
id as a paramter.
Paramter Data Type => Integer
# File lib/cocRb/location.rb, line 70 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 if status res.status else val = res.body convert = JSON.parse(val) end end
get_LocationRankClanVersus(locationId:, _limit:false, status:false)
click to toggle source
This method gets all the Ranked clans for Builder Base Clan
Versus Trophies, Takes Location
id as a paramter.
Paramter Data Type => Integer
# File lib/cocRb/location.rb, line 100 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 if status res.status else val = res.body convert = JSON.parse(val) end end
get_LocationRankPlayer(locationId:, _limit:false, status:false)
click to toggle source
This method gets all the Ranked palyers for a particular Location
, Takes Location
id as a paramter.
Paramter Data Type => Integer
# File lib/cocRb/location.rb, line 85 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 if status res.status else val = res.body convert = JSON.parse(val) end end
get_LocationRankPlayerVersus(locationId:, _limit:false, status:false)
click to toggle source
This method gets all the Ranked players for Builder Base Player
Versus Trophies, Takes Location
id as a paramter.
Paramter Data Type => Integer
# File lib/cocRb/location.rb, line 115 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 if status res.status else val = res.body convert = JSON.parse(val) end end