alice_karma v0.3.1 Alice.Handlers.Karma

Allows Alice to keep track of karma points for arbitrary terms

Summary

Functions

karma best 10 - get the top terms (amount is optional)

term~~ - check the karma for a term

All of the commands handled by this module

term-- - decrease the karma for a term

Deletes the entries in the state for a specific key

karma empty term - clear the karma for a single term

karma empty all the karma and yes I actually really mean to do this - clear the karma for all terms

Get the state from an Alice.Conn struct, namespaced to this module

term++ - increase the karma for a term

Match all commands in this module

Match all routes in this module

Update the state of an Alice.Conn struct, namespaced to this module

All of the routes handled by this module

karma worst 10 - get the lowest terms (amount is optional)

Functions

best(conn)

karma best 10 - get the top terms (amount is optional)

check(conn)

term~~ - check the karma for a term

commands()

All of the commands handled by this module

decrement(conn)

term-- - decrease the karma for a term

delete_state(conn, key)

Deletes the entries in the state for a specific key.

empty(conn)

karma empty term - clear the karma for a single term

empty_all(conn)

karma empty all the karma and yes I actually really mean to do this - clear the karma for all terms

get_state(conn, key, default \\ nil)

Get the state from an Alice.Conn struct, namespaced to this module

increment(conn)

term++ - increase the karma for a term

match_commands(conn)

Match all commands in this module

match_routes(conn)

Match all routes in this module

put_state(conn, key, value)

Update the state of an Alice.Conn struct, namespaced to this module

routes()

All of the routes handled by this module

worst(conn)

karma worst 10 - get the lowest terms (amount is optional)