{-# LANGUAGE OverloadedStrings #-}

-- |
-- Module      : Todos
-- Description : Queries about todos for users
-- Copyright   : (c) Rob Stewart, Heriot-Watt University, 2019
-- License     : BSD3
-- Maintainer  : robstewart57@gmail.com
-- Stability   : stable
module GitLab.API.Todos where

import GitLab.Types
import GitLab.WebRequests.GitLabWebCalls

-- | returns all pending todos for the user, as defined by the access token.
todos :: GitLab [Todo]
todos :: GitLab [Todo]
todos = GitLab (Either (Response ByteString) (Maybe [Todo]))
-> GitLab [Todo]
forall a b. GitLab (Either a (Maybe b)) -> GitLab b
gitlabUnsafe (Text
-> [GitLabParam]
-> GitLab (Either (Response ByteString) (Maybe [Todo]))
forall a.
FromJSON a =>
Text
-> [GitLabParam] -> GitLab (Either (Response ByteString) (Maybe a))
gitlabGetOne Text
"/todos" [])