binarybeast 0.1.3.pre → 0.1.4.pre
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.
- data/README.md +22 -13
- data/lib/binarybeast/tourney.rb +6 -6
- data/lib/binarybeast/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -25,20 +25,20 @@ there are several options you can use when creating a tourney:
|
|
25
25
|
:title => String
|
26
26
|
:description => String
|
27
27
|
:public => Integer
|
28
|
-
:
|
29
|
-
:
|
28
|
+
:game_code => String
|
29
|
+
:type_id => Integer
|
30
30
|
:elimination => Integer
|
31
|
-
:
|
32
|
-
:
|
33
|
-
:
|
31
|
+
:team_mode => Integer
|
32
|
+
:group_count => Integer
|
33
|
+
:teams_from_group => Integer
|
34
34
|
:location => String
|
35
|
-
:
|
36
|
-
:
|
37
|
-
:
|
38
|
-
:
|
39
|
-
:
|
35
|
+
:max_teams => Integer
|
36
|
+
:replay_uploads => Integer
|
37
|
+
:replay_downloads => Integer
|
38
|
+
:auto_start => Integer
|
39
|
+
:return_data => Integer
|
40
40
|
|
41
|
-
however, only :title => String is required
|
41
|
+
however, only :title => String is required for creating a new tourney object.
|
42
42
|
|
43
43
|
## Create a new Tournament on BinaryBeast
|
44
44
|
|
@@ -47,8 +47,7 @@ however, only :title => String is required or :tourneyid => String if you want t
|
|
47
47
|
|
48
48
|
## Fetching a existing Tournament from BinaryBeast
|
49
49
|
|
50
|
-
@tourney = Binarybeast::Tourney.
|
51
|
-
@tourney.load
|
50
|
+
@tourney = Binarybeast::Tourney.load(:id => "xSC21212194")
|
52
51
|
|
53
52
|
## Current implemented Functions
|
54
53
|
|
@@ -67,6 +66,8 @@ more to come soon....
|
|
67
66
|
|
68
67
|
## Some stuff you should know
|
69
68
|
|
69
|
+
### :force => true
|
70
|
+
|
70
71
|
The BinaryBeast API sends back JSON from every request. However, if you use this gem we catch the JSON Data and proccess it. If you want to have a direct access to the API you can go with something like this:
|
71
72
|
|
72
73
|
@tourney = Binarybeast::Tourney.new(:title => "Test")
|
@@ -76,3 +77,11 @@ the :force => true tells the function to give you the callback from the binarybe
|
|
76
77
|
|
77
78
|
response["Result"]
|
78
79
|
=> 200
|
80
|
+
|
81
|
+
## Changelog
|
82
|
+
|
83
|
+
### Version: 0.1.3.pre
|
84
|
+
|
85
|
+
* Added Eigenclass to Tourney, so you can call Binarybeast::Tourney.load(:id => "").
|
86
|
+
* Changed variable names to use underscore naming convention rather than all lower case naming.
|
87
|
+
* Added a call function to the Binarybeast module. You are now able to call Binarybeast.call() to make a raw API call to Binarybeast. Returns a JSON parsed array.
|
data/lib/binarybeast/tourney.rb
CHANGED
@@ -105,13 +105,13 @@ module Binarybeast
|
|
105
105
|
# ----------------
|
106
106
|
|
107
107
|
def update(options={:force => false})
|
108
|
-
response = self.class.get("", :query => {:
|
108
|
+
response = self.class.get("", :query => {:TourneyID => self.id, :APIKey => self.api_key, :APIService => "Tourney.TourneyUpdate.Settings",
|
109
109
|
:Title => self.title, :Public => self.publish, :game_code => self.game_code,
|
110
|
-
:
|
111
|
-
:
|
112
|
-
:
|
113
|
-
:Location => self.location, :
|
114
|
-
:
|
110
|
+
:TypeID => self.type_id, :Elimination => self.elimination,
|
111
|
+
:TeamMode => self.team_mode, :GroupCount => self.group_count,
|
112
|
+
:TeamsFromGroup => self.teams_from_group, :DateStart => self.date_start,
|
113
|
+
:Location => self.location, :MaxTeams => self.max_teams, :ReplayUploads => self.replay_uploads,
|
114
|
+
:ReplayDownloads => self.replay_downloads, :Description => self.description, :ReturnData => self.return_data})
|
115
115
|
options[:force] ? response : response["Result"] == 200 ? true : false
|
116
116
|
end
|
117
117
|
|
data/lib/binarybeast/version.rb
CHANGED