summaryrefslogtreecommitdiff
path: root/lib/sampling/README.md
diff options
context:
space:
mode:
authorguntasgrewal <guntasgrewal@gmail.com>2014-04-27 20:47:42 -0400
committerguntasgrewal <guntasgrewal@gmail.com>2014-04-27 20:47:42 -0400
commit4d47e5e7b5d838173dd3ab68c293c03e03811392 (patch)
tree594659a4fbc6cbc1afd188f94f8196e203cabe31 /lib/sampling/README.md
parentdf1cda1faab97f4c424efdcf8b6822f98b73adb8 (diff)
parent9d0be853cef35412c0bfe92c80502fd9da7947f1 (diff)
Merge branch 'master' of https://github.com/LukeShu/leaguer
Diffstat (limited to 'lib/sampling/README.md')
-rw-r--r--lib/sampling/README.md15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/sampling/README.md b/lib/sampling/README.md
index 28c603e..731f1d1 100644
--- a/lib/sampling/README.md
+++ b/lib/sampling/README.md
@@ -1,28 +1,41 @@
-Files in this directory should be modules implementing the following
+Sampling interface
+==================
+
+Files in this directory should be _modules_ implementing the following
interface:
- `works_with?(Game) => Boolean`
+
Returns whether or not this sampling method works with the
specified game.
- `uses_remote?() => Boolean`
+
Return whether or not this sampling method requires remote IDs for
users.
- `set_remote_name(User, Game, String)`
+
Set the remote ID for a user for the specified game. It is safe to
assume that this sampling method `works_with?` that game.
- `get_remote_name(Object)`
+
When given an object from `RemoteUsername#value`, give back a
human-readable/editable name to display.
- `sampling_start(Match)`
+
Fetch the statistics for a match.
+
- `sampling_done?(Match) => Boolean`
+
Returns whether or not statistics have been completely collected
yet.
- `render_user_interaction(Match, User) => String`
+
Returns HTML to render on a page.
+
- `handle_user_interaction(Match, User, Hash params)`
+
Handles params from the form generated by
`#user_interaction_render`.