Skip to content

Commit 45001dc

Browse files
committed
hello match.userdelete()
1 parent 34c5f3c commit 45001dc

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/esdb/match.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module ESDB
22
class Match < ESDB::Resource
3-
# HAX
3+
44
# Does the match have any summary data?
55
def summaries?
66
hash = self.to_hash
@@ -16,9 +16,6 @@ def replays?
1616
self.replays_count && self.replays_count > 0
1717
end
1818

19-
# TODO: when there is ample time, I want to generalize stuff like this via
20-
# something like Hashie, but Hashie::Mash just didn't work out right away
21-
# it's complicated.. the fact that we have a key called "map" alone..
2219
def map
2320
Hashie::Mash.new(self.to_hash['map'])
2421
end
@@ -39,5 +36,10 @@ def teams
3936
def duration_minutes
4037
return (duration_seconds / 60.0).round
4138
end
39+
40+
def userdelete(user_id)
41+
resp = RestClient.post(url + '/userdelete', :access_token => ESDB.api_key, :user_id => user_id)
42+
JSON.parse(resp)
43+
end
4244
end
4345
end

0 commit comments

Comments
 (0)