Class: ZombieBattleground::Api::Requests::GetMatchRequest

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Validations, RequestHelper, ValidationHelper
Defined in:
lib/zombie_battleground/api/requests/get_match_request.rb

Overview

Request validator for GetMatch

Constant Summary

Constants included from RequestHelper

RequestHelper::BLACKLISTED_INSTANCE_VARIABLES

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#idInteger

Match’s id

Examples:

request.id #=> 1

Returns:

  • (Integer)


28
29
30
# File 'lib/zombie_battleground/api/requests/get_match_request.rb', line 28

def id
  @id
end

Instance Method Details

#paramsHash

Match does not take params, return an empty Hash

Examples:

request.params # => {}

Returns:

  • (Hash)


54
55
56
# File 'lib/zombie_battleground/api/requests/get_match_request.rb', line 54

def params
  {}
end

#uriString

The URI for the endpoint

Examples:

request.uri # => "match/1"

Returns:

  • (String)


41
42
43
# File 'lib/zombie_battleground/api/requests/get_match_request.rb', line 41

def uri
  "match/#{id}"
end