Skip to content

tfwright/mr_badger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MrBadger

CircleCI

Achievement tracking for Elixir apps

Installation

The package can be installed by adding mr_badger to your list of dependencies in mix.exs:

def deps do
  [
    {:mr_badger, "~> 0.1.0"}
  ]
end

Usage

defmodule MyBadges do
  use MrBadger

  award(:my_first_badge, {user, :action}) do
    user.done_action?
  end
end

MyBadges.badges_earned({user, :action})
# => [:my_first_badge]

MyBadges.earns_my_first_badge?({user, :action})
# => true

MyBadges.earns_my_first_badge?({user, :another_action})
# => false

Docs can be found at https://hexdocs.pm/mr_badger.

About

Achievement tracker for Elixir apps

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages