Class: Scoreoid::Player
- Inherits:
-
Object
- Object
- Scoreoid::Player
- Defined in:
- lib/scoreoid/player.rb
Overview
Represents the game players.
Class Method Summary collapse
-
.count(params = {}) ⇒ Integer
Get the number of players for a game.
-
.create(params = {}) ⇒ Hash
Create a new player for a game.
-
.edit(params = {}) ⇒ Hash
Edit player information.
-
.update_field(params = {}) ⇒ Hash
Updates a players field.
Class Method Details
.count(params = {}) ⇒ Integer
Get the number of players for a game.
22 23 24 |
# File 'lib/scoreoid/player.rb', line 22 def self.count(params={}) Scoreoid::API.query_and_parse('countPlayers', params)['players'] end |
.create(params = {}) ⇒ Hash
Create a new player for a game.
78 79 80 |
# File 'lib/scoreoid/player.rb', line 78 def self.create(params={}) Scoreoid::API.query_and_parse('createPlayer', params) end |
.edit(params = {}) ⇒ Hash
Edit player information.
134 135 136 |
# File 'lib/scoreoid/player.rb', line 134 def self.edit(params={}) Scoreoid::API.query_and_parse('editPlayer', params) end |
.update_field(params = {}) ⇒ Hash
Updates a players field.
155 156 157 |
# File 'lib/scoreoid/player.rb', line 155 def self.update_field(params={}) Scoreoid::API.query_and_parse('updatePlayerField', params) end |