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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 677b2fcfff53c05ddb5f59305e1940b4e20d19718af145f360041c0a2357a343
4
- data.tar.gz: d95a7ef479806fb6db59fb3b3b071c6a82cc2d05c5a1e31b0fbc8d3b9a402016
3
+ metadata.gz: 40977236bb351782aee366e88ea5d90fc6c0fef3dbe4b83f25fdf2b98e574a7f
4
+ data.tar.gz: f2015c08cb5d3d455a301e6e5d8a46cc82a7ef43098117cb620d729a9bfc8905
5
5
  SHA512:
6
- metadata.gz: 9d149fa8289060dfea9ee62638567f0426613dcbe23860971d9655406eb521eab5c69aed10e46e1f51736b7aa3c7239c830b15fe5110eb4dd343bba7466c889e
7
- data.tar.gz: 2395f768180735e2bca893d8e764c92a038b6d735890d6b7c4b8e7be5b47c4abddbebc234d6ead51f647624892d91c6a47677c9291edb0f02c3e8a1298670b46
6
+ metadata.gz: d8a652e3b7ed1d1d58260f40907511b5d62e432780e436631fa888c2790d1a6765489dfa222b376ad83b2ebee895c34762379a8c549bc8487c5c6ee5226abed4
7
+ data.tar.gz: 8b648b62dabbb6508b8a69c5179dda3f30a69d8f916bcc733c3bd32badba4e5182a1b5ad22fb90928c183baa21bfaee58a5b30b201cd725df44a7a17f69a5eba
data/lib/cocRb/api.rb CHANGED
@@ -35,6 +35,7 @@ end
35
35
  end
36
36
 
37
37
  class ClashApi < Settings
38
+ # This method can call any of the API endpoint except the player verifier endpoint.Takes requestUrl in the configuration block.
38
39
  def self.call_API(status: false)
39
40
  get
40
41
  res = @conn.get(CocRb.configuration.url)
data/lib/cocRb/gp.rb CHANGED
@@ -39,7 +39,7 @@ class Settings
39
39
  end
40
40
 
41
41
  class GoldPass < Settings
42
-
42
+ # This method gets GoldPass Information.
43
43
  def self.get_GoldPassInfo(status: false)
44
44
  get
45
45
  res = @conn.get("v1/goldpass/seasons/current")
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
- def self.get_Seasons(leagueId:, _limit:false, status:false)
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}")
@@ -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.check_headers
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CocRb
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.5"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocRb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Crusader123