Method: BOTR::PlayerView.show

Defined in:
lib/botr/players/player_view.rb

.show(key, **options) ⇒ Object Also known as: find



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/botr/players/player_view.rb', line 9

def show(key, **options)
	json = get_request(options.merge(:method => 'show',
					    			 :player_key => key))
	res = JSON.parse(json.body)

	if json.status == 200
		params = process_show_response(res)
	else
		raise "HTTP Error #{json.status}: #{json.body}"
	end

	return new(params)
end