asana: Asana API Client

[ library, mit, utils ] [ Propose Tags ]

Please see README.md


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 1.0.0.0, 1.0.1.0, 1.0.1.1
Change log CHANGELOG.md
Dependencies aeson, aeson-casing, base (>=4.11.1.0 && <5), bytestring, hashable, http-conduit, iso8601-time, microlens, microlens-mtl, monad-logger, mtl, scientific, text, time, unliftio, unliftio-core, unordered-containers [details]
License MIT
Author
Maintainer Freckle Education
Category Utils
Home page https://github.com/freckle/asana-hs#readme
Bug tracker https://github.com/freckle/asana-hs/issues
Source repo head: git clone https://github.com/freckle/asana-hs
Uploaded by PatrickBrisbin at 2023-04-04T19:57:49Z
Distributions NixOS:1.0.1.1
Downloads 240 total (9 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2023-04-04 [all 1 reports]

Readme for asana-1.0.1.0

[back to package description]

Asana

Haskell client for the Asana API.

API Key

  1. Visit Settings > Apps > Developer apps, create a Personal Access Token

Simple Usage

For example, to make a quick script to list all incomplete tasks in a project:

import Asana.Api.Request
import Asana.Api.Task
import Data.Text (pack)
import System.Environment (getEnv)
import Control.Monad.Logger (runStdoutLoggingT)
import Control.Monad.Reader (runReaderT)

main :: IO ()
main = do
  key <- AsanaAccessKey . pack <$> getEnv "ASANA_ACCESS_KEY"

  runStdoutLoggingT $ flip runReaderT key $ do
    let projectId = "..."
    tasks <- getProjectTasks projectId IncompletedTasks
    print tasks

Advanced Usage

This library implements the Has-class pattern for use in a ReaderT-style application.

data App = App
  { -- ...
  , appAsanaAccessKey :: ApiKey
  }

instance HasAsanaAccessKey App where
  asanaAccessKeyL = lens appAsanaAccessKey $ \x y -> x { appAsanaAccessKey = y }

loadApp :: IO App
loadApp = undefined

main :: IO ()
main = do
  app <- loadApp
  runStdoutLoggingT $ runReaderT run app

run :: (MonadLogger m, MonadReader env m, HasAsanaAccessKey env) => m ()
run = undefined

CHANGELOG | LICENSE