beeminder-api-1.0: Bindings to the beeminder.com JSON API

Safe HaskellNone
LanguageHaskell2010

Network.Beeminder

Contents

Synopsis

API calls

user :: UserParameters -> Beeminder User Source #

goal :: GoalParameters -> Beeminder Goal Source #

allGoals :: AllGoalsParameters -> Beeminder [Goal] Source #

createGoal :: CreateGoalParameters -> Beeminder Goal Source #

points :: PointsParameters -> Beeminder [Point] Source #

createPoint :: CreatePointParameters -> Beeminder Point Source #

createPointNotify :: CreatePointParameters -> Beeminder Point Source #

createPoints :: CreatePointsParameters -> Beeminder [Point] Source #

createPointsNotify :: CreatePointsParameters -> Beeminder [Point] Source #

updatePoint :: UpdatePointParameters -> Beeminder Point Source #

deletePoint :: DeletePointParameters -> Beeminder Point Source #

The Beeminder monad

runBeeminder :: Token -> Beeminder a -> IO (Maybe a) Source #

Run a beeminder computation with the given authentication token, possibly returning a result.

Foo bar

data UserGoals Source #

Constructors

Slugs [Text]

just the short names (use JustTheSlugs)

Hashes [Goal]

information about all currently existing goals (use EverythingCurrent)

Diff [Goal] [Text]

created or updated goals first, then IDs of deleted goals (use Diff)

data User Source #

the _UpdatedAt value is the upper bound of all updates -- even nested ones to goals, points, etc.

Constructors

User 

data Goal Source #

Constructors

Goal 

Fields

data LevelOfGoalDetail Source #

Constructors

JustTheSlugs

minimal detail: just the "slug" (the part that goes in a URL)

EverythingCurrent

details about all the currently existing goals

DiffSince

maximal detail: report even about goals that have been deleted

Fields

  • since :: Integer

    a Unix timestamp; show all the changes since that timestamp (new points, deleted goals, etc.)

  • skinny :: Bool

    when True, return only each goal's latest data point and a subset of the attributes for each goal

data TimeFrame Source #

Constructors

Year 
Month 
Week 
Day 
Hour 

data Aggregate Source #

Constructors

Last 
First 
All 
Min 
Max 
Mean 
Sum 

data Behavior Source #

Constructors

Exponential

interpret rate as multiplicative rather than additive

Cumulative

plot values as the sum of the points

Odometer

treat zero as an odomoter reset rather than a literal 0

Edgy

initial data point goes at the road edge (not center)

Noisy

use points (not just rate) when computing road width

StepLine

use steppy-like line when rendering the graph

Rosy

show the optimistic rosy dots when rendering the graph

MovingAverage

graph the moving average

Aura

render the turquoise confidence area

Ephemeral

garbage collect this goal after a bit

Secret

only the owner can see the goal

SecretPoints

only the owner can see the points

Lenses

class HasID a where Source #

Methods

_ID :: Simple Lens a Text Source #

class HasName a where Source #

Instances

class HasUsername a where Source #

class HasGoal a where Source #

class HasPointRequest a where Source #

Methods

_PointRequest :: Simple Lens a PointRequest Source #

class HasPointRequests a where Source #

Methods

_PointRequests :: Simple Lens a [PointRequest] Source #

class HasTitle a where Source #

class HasType a where Source #

class HasTarget a where Source #

class HasPanic a where Source #

Utilities

now :: (MonadIO m, HasTimestamp a) => a -> m a Source #

Set the timestamp to the current time.