-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Bindings to the beeminder.com JSON API
--
--
-- http://beeminder.com is a tool for incentivizing yourself to
-- accomplish your quantifiable goals. This package provides Haskell
-- bindings to beeminder's JSON API.
@package beeminder-api
@version 1.0
module Network.Beeminder
user :: UserParameters -> Beeminder User
goal :: GoalParameters -> Beeminder Goal
allGoals :: AllGoalsParameters -> Beeminder [Goal]
createGoal :: CreateGoalParameters -> Beeminder Goal
points :: PointsParameters -> Beeminder [Point]
createPoint :: CreatePointParameters -> Beeminder Point
createPointNotify :: CreatePointParameters -> Beeminder Point
createPoints :: CreatePointsParameters -> Beeminder [Point]
createPointsNotify :: CreatePointsParameters -> Beeminder [Point]
updatePoint :: UpdatePointParameters -> Beeminder Point
deletePoint :: DeletePointParameters -> Beeminder Point
data Beeminder a
type Token = ByteString
-- | Run a beeminder computation with the given authentication token,
-- possibly returning a result.
runBeeminder :: Token -> Beeminder a -> IO (Maybe a)
data UserGoals
-- | just the short names (use JustTheSlugs)
Slugs :: [Text] -> UserGoals
-- | information about all currently existing goals (use
-- EverythingCurrent)
Hashes :: [Goal] -> UserGoals
-- | created or updated goals first, then IDs of deleted goals (use
-- Diff)
Diff :: [Goal] -> [Text] -> UserGoals
-- | the _UpdatedAt value is the upper bound of all updates -- even
-- nested ones to goals, points, etc.
data User
User :: Text -> Text -> UserGoals -> Text -> Integer -> User
[uName] :: User -> Text
[uTimezone] :: User -> Text
[uGoals] :: User -> UserGoals
[uID] :: User -> Text
[uUpdatedAt] :: User -> Integer
data Point
Point :: Integer -> Double -> Text -> Maybe Text -> Text -> Integer -> Point
[pTimestamp] :: Point -> Integer
[pValue] :: Point -> Double
[pComment] :: Point -> Text
[pRequestID] :: Point -> Maybe Text
[pID] :: Point -> Text
[pUpdatedAt] :: Point -> Integer
data Goal
Goal :: Text -> Text -> Integer -> Burner -> Text -> Target -> TimeFrame -> Text -> Text -> Integer -> Double -> Bool -> [Point] -> Integer -> Integer -> Integer -> Double -> Integer -> Double -> Integer -> Direction -> Direction -> Integer -> (Integer, Double, Double) -> (Text, Text, Text) -> Bool -> Bool -> Bool -> Contract -> [Target] -> Aggregate -> Set Behavior -> Goal
[gID] :: Goal -> Text
[gGoal] :: Goal -> Text
[gUpdatedAt] :: Goal -> Integer
[gBurner] :: Goal -> Burner
[gTitle] :: Goal -> Text
[gTarget] :: Goal -> Target
[gRatePeriod] :: Goal -> TimeFrame
-- | URL of graph image TODO: can this be computed from gID?
[gGraph] :: Goal -> Text
-- | URL of graph thumb TODO: can this be computed from gID?
[gThumb] :: Goal -> Text
-- | assuming no more data reported
[gLoseDate] :: Goal -> Integer
-- | how many seconds before gLoseDate to FREAK OUT
[gPanic] :: Goal -> Double
-- | is graph still rendering?
[gQueued] :: Goal -> Bool
-- | empty unless you explicitly ask for it not to be
[gPoints] :: Goal -> [Point]
[gPointCount] :: Goal -> Integer
[gPledge] :: Goal -> Integer
[gStartDate] :: Goal -> Integer
[gStartValue] :: Goal -> Double
[gCurrentDate] :: Goal -> Integer
[gCurrentValue] :: Goal -> Double
[gReportedDate] :: Goal -> Integer
-- | which side of the road is good?
[gYaw] :: Goal -> Direction
-- | which way is the road going? TODO: can this be inferred from gRate?
-- (what happens when a downward-sloping graph gets dialed to an upward
-- slope?)
[gSlope] :: Goal -> Direction
[gLane] :: Goal -> Integer
-- | date, value, and rate??? TODO: can this be inferred from gTarget (or
-- vice versa)? if not, what's the difference??
[gMathIsHard] :: Goal -> (Integer, Double, Double)
[gSummary] :: Goal -> (Text, Text, Text)
[gWon] :: Goal -> Bool
[gFrozen] :: Goal -> Bool
[gLost] :: Goal -> Bool
-- | the current pledge (TODO: can this be inferred from gPledge or vice
-- versa?) and the date of a scheduled future stepdown, if any
[gContract] :: Goal -> Contract
[gRoad] :: Goal -> [Target]
-- | what to do with multiple points on a given day
[gAggregate] :: Goal -> Aggregate
[gBehavior] :: Goal -> Set Behavior
data Burner
Front :: Burner
Back :: Burner
data LevelOfGoalDetail
-- | minimal detail: just the "slug" (the part that goes in a URL)
JustTheSlugs :: LevelOfGoalDetail
-- | details about all the currently existing goals
EverythingCurrent :: LevelOfGoalDetail
-- | maximal detail: report even about goals that have been deleted
DiffSince :: Integer -> Bool -> LevelOfGoalDetail
-- | a Unix timestamp; show all the changes since that timestamp (new
-- points, deleted goals, etc.)
[since] :: LevelOfGoalDetail -> Integer
-- | when True, return only each goal's latest data point and a
-- subset of the attributes for each goal
[skinny] :: LevelOfGoalDetail -> Bool
data TimeFrame
Year :: TimeFrame
Month :: TimeFrame
Week :: TimeFrame
Day :: TimeFrame
Hour :: TimeFrame
data Aggregate
Last :: Aggregate
First :: Aggregate
All :: Aggregate
Min :: Aggregate
Max :: Aggregate
Mean :: Aggregate
Sum :: Aggregate
data Direction
Up :: Direction
Down :: Direction
data Behavior
-- | interpret rate as multiplicative rather than additive
Exponential :: Behavior
-- | plot values as the sum of the points
Cumulative :: Behavior
-- | treat zero as an odomoter reset rather than a literal 0
Odometer :: Behavior
-- | initial data point goes at the road edge (not center)
Edgy :: Behavior
-- | use points (not just rate) when computing road width
Noisy :: Behavior
-- | use steppy-like line when rendering the graph
StepLine :: Behavior
-- | show the optimistic rosy dots when rendering the graph
Rosy :: Behavior
-- | graph the moving average
MovingAverage :: Behavior
-- | render the turquoise confidence area
Aura :: Behavior
-- | garbage collect this goal after a bit
Ephemeral :: Behavior
-- | only the owner can see the goal
Secret :: Behavior
-- | only the owner can see the points
SecretPoints :: Behavior
data Target
MissingDate :: Double -> Double -> Target
[tValue] :: Target -> Double
[tRate] :: Target -> Double
MissingValue :: Integer -> Double -> Target
[tDate] :: Target -> Integer
[tRate] :: Target -> Double
MissingRate :: Integer -> Double -> Target
[tDate] :: Target -> Integer
[tValue] :: Target -> Double
data GoalType
Hustler :: GoalType
Biker :: GoalType
FatLoser :: GoalType
Gainer :: GoalType
Inboxer :: GoalType
Drinker :: GoalType
class HasID a
_ID :: HasID a => Simple Lens a Text
class HasUpdatedAt a
_UpdatedAt :: HasUpdatedAt a => Simple Lens a Integer
class HasName a
_Name :: HasName a => Simple Lens a Text
class HasTimezone a
_Timezone :: HasTimezone a => Simple Lens a Text
class HasUsername a
_Username :: HasUsername a => Simple Lens a (Maybe Text)
class HasGoals a
_Goals :: HasGoals a => Simple Lens a UserGoals
class HasGoalsFilter a
_GoalsFilter :: HasGoalsFilter a => Simple Lens a (Maybe Burner)
class HasLevelOfDetail a
_LevelOfDetail :: HasLevelOfDetail a => Simple Lens a LevelOfGoalDetail
class HasPointCount a
_PointCount :: HasPointCount a => Simple Lens a (Maybe Integer)
class HasTimestamp a
_Timestamp :: HasTimestamp a => Simple Lens a Integer
class HasValue a
_Value :: HasValue a => Simple Lens a Double
class HasComment a
_Comment :: HasComment a => Simple Lens a Text
class HasRequestID a
_RequestID :: HasRequestID a => Simple Lens a (Maybe Text)
class HasGoal a
_Goal :: HasGoal a => Simple Lens a Text
class HasPointRequest a
_PointRequest :: HasPointRequest a => Simple Lens a PointRequest
class HasPointRequests a
_PointRequests :: HasPointRequests a => Simple Lens a [PointRequest]
class HasGetPoints a
_GetPoints :: HasGetPoints a => Simple Lens a Bool
class HasTitle a
_Title :: HasTitle a => Simple Lens a Text
class HasType a
_Type :: HasType a => Simple Lens a GoalType
class HasTarget a
_Target :: HasTarget a => Simple Lens a Target
class HasBehavior a
_Behavior :: HasBehavior a => Simple Lens a (Set Behavior)
class HasPanic a
_Panic :: HasPanic a => Simple Lens a Double
-- | Set the timestamp to the current time.
now :: (MonadIO m, HasTimestamp a) => a -> m a
gType :: Goal -> Maybe GoalType
instance Control.Monad.Base.MonadBase GHC.Types.IO Network.Beeminder.Beeminder
instance Control.Monad.Trans.Resource.Internal.MonadResource Network.Beeminder.Beeminder
instance Control.Monad.Catch.MonadThrow Network.Beeminder.Beeminder
instance Control.Monad.Reader.Class.MonadReader Network.Beeminder.BeeminderEnvironment Network.Beeminder.Beeminder
instance Control.Monad.IO.Class.MonadIO Network.Beeminder.Beeminder
instance GHC.Base.Monad Network.Beeminder.Beeminder
instance GHC.Base.Applicative Network.Beeminder.Beeminder
instance GHC.Base.Functor Network.Beeminder.Beeminder
instance Control.Monad.Trans.Control.MonadBaseControl GHC.Types.IO Network.Beeminder.Beeminder