Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype AsanaAccessKey = AsanaAccessKey {}
- class HasAsanaAccessKey env where
- asanaAccessKeyL :: Lens' env AsanaAccessKey
- newtype Single a = Single {
- sData :: a
- data Page a = Page {}
- data NextPage = NextPage {}
- newtype ApiData a = ApiData {
- adData :: a
- getAll :: (MonadUnliftIO m, MonadLogger m, MonadReader env m, HasAsanaAccessKey env, FromJSON a) => String -> m [a]
- getAllParams :: (MonadUnliftIO m, MonadLogger m, MonadReader env m, HasAsanaAccessKey env, FromJSON a) => String -> [(String, String)] -> m [a]
- getSingle :: (MonadUnliftIO m, MonadLogger m, MonadReader env m, HasAsanaAccessKey env, FromJSON a) => String -> m a
- put :: (MonadUnliftIO m, MonadLogger m, MonadReader env m, HasAsanaAccessKey env, ToJSON a) => String -> a -> m Value
- post :: (MonadUnliftIO m, MonadLogger m, MonadReader env m, HasAsanaAccessKey env, ToJSON a) => String -> a -> m Value
- maxRequests :: Int
Documentation
newtype AsanaAccessKey Source #
Instances
class HasAsanaAccessKey env where Source #
asanaAccessKeyL :: Lens' env AsanaAccessKey Source #
Instances
Type for a single-resource response, containing { data: { ... } }
Type for a list-resource response, containing { data: [{ ... }] }
Instances
Eq a => Eq (Page a) Source # | |
Show a => Show (Page a) Source # | |
Generic (Page a) Source # | |
FromJSON a => FromJSON (Page a) Source # | |
type Rep (Page a) Source # | |
Defined in Asana.Api.Request type Rep (Page a) = D1 ('MetaData "Page" "Asana.Api.Request" "asana-1.0.0.0-JNzL5iyCZIM39EPv9JLtHU" 'False) (C1 ('MetaCons "Page" 'PrefixI 'True) (S1 ('MetaSel ('Just "pData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [a]) :*: S1 ('MetaSel ('Just "pNextPage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe NextPage)))) |
The next_page
element of a paginated response
Instances
Eq NextPage Source # | |
Show NextPage Source # | |
Generic NextPage Source # | |
FromJSON NextPage Source # | |
type Rep NextPage Source # | |
Defined in Asana.Api.Request type Rep NextPage = D1 ('MetaData "NextPage" "Asana.Api.Request" "asana-1.0.0.0-JNzL5iyCZIM39EPv9JLtHU" 'False) (C1 ('MetaCons "NextPage" 'PrefixI 'True) (S1 ('MetaSel ('Just "npOffset") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "npPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "npUri") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))) |
Generic type for un/wrapping an item as { data: item }
getAll :: (MonadUnliftIO m, MonadLogger m, MonadReader env m, HasAsanaAccessKey env, FromJSON a) => String -> m [a] Source #
Naively GET all pages of a paginated resource
getAllParams :: (MonadUnliftIO m, MonadLogger m, MonadReader env m, HasAsanaAccessKey env, FromJSON a) => String -> [(String, String)] -> m [a] Source #
getSingle :: (MonadUnliftIO m, MonadLogger m, MonadReader env m, HasAsanaAccessKey env, FromJSON a) => String -> m a Source #
Get a single resource
put :: (MonadUnliftIO m, MonadLogger m, MonadReader env m, HasAsanaAccessKey env, ToJSON a) => String -> a -> m Value Source #
post :: (MonadUnliftIO m, MonadLogger m, MonadReader env m, HasAsanaAccessKey env, ToJSON a) => String -> a -> m Value Source #
maxRequests :: Int Source #