Skip to content

Instantly share code, notes, and snippets.

@vanpelt
Last active December 11, 2015 04:18
Show Gist options
  • Save vanpelt/4543691 to your computer and use it in GitHub Desktop.
Save vanpelt/4543691 to your computer and use it in GitHub Desktop.
Overview of TheCount

http://github.com/dolores/TheCount currently provides a restful service for job and unit counts as well as job and worker conversions. Below are the counts currently defined endpoints and sample payloads.

/job_counts?ids=

{"forgiven"=>18,
  "golden_nuggets"=>336,
  "judged_nuggets"=>1574,
  "frontloaded_tainted_nuggets"=>-400,
  "id"=>152965,
  "missed"=>10,
  "frontloaded_tainted"=>-400,
  "judgments"=>1574,
  "golden"=>336,
  "contested"=>8}

/unit_counts?ids=

{"ephemeral"=>true,
  "tainted"=>0,
  "id"=>236438286,
  "missed"=>0,
  "judgments"=>10,
  "job_id"=>152965,
  "contested"=>0}

/job_conversions?ids=

{"id"=>152966, 
 "values"=>
  {"canceled"=>0.0, "converted"=>380.7266}}

/worker_conversions?ids=

 {"id"=>14635858, 
  "values"=>
    {"canceled"=>0.0, "converted"=>21.4198}}

It's important to note that worker_conversions is not used in builder, while the rest of the counts are. There is a seperate restful app for exposing contributor conversion stats, http://github.com/dolores/Phoenix. It exposes the following endpoints that I'm aware of:

/dashboard/:id/stats

{
  "accuracy" => 0.876, "jobs" => 31, "judgments" => 0, "channel" => "prodege", "earnings" => 763,
  "bonuses" => 125, "recent-activity" => sample_recent_activity, "golds" => 1000,
  "missed" => 124, "adjusted_earnings:cents" => 1000, "adjusted_earnings:swagbucks" => 789,
  "adjusted_bonuses:cents" => 250, "recent_activity" =>
     [{"job" =>  1, "time" =>  1340931685, "trust" =>  0.75, "earnings" =>  400, "assignments" =>  20}, {"job" =>  2, "time" =>  1340931777, "trust" =>  0.95, "earnings" =>  250, "assignments" =>  50}]
},

The stats that buildr uses are the most important, but we need to find what it means for this project to complete complete and define a timeline around it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment