diff options
Diffstat (limited to 'spec/src')
| -rw-r--r-- | spec/src/Thermoprint/API.hs | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/spec/src/Thermoprint/API.hs b/spec/src/Thermoprint/API.hs index f5b7bee..d854e73 100644 --- a/spec/src/Thermoprint/API.hs +++ b/spec/src/Thermoprint/API.hs | |||
| @@ -83,7 +83,7 @@ instance ToText UTCTime where | |||
| 83 | 83 | ||
| 84 | type ThermoprintAPI = "printers" :> Get '[JSON] (Map PrinterId PrinterStatus) | 84 | type ThermoprintAPI = "printers" :> Get '[JSON] (Map PrinterId PrinterStatus) | 
| 85 | :<|> "jobs" :> ( | 85 | :<|> "jobs" :> ( | 
| 86 | QueryParam "printer" PrinterId | 86 | QueryParam "printer" PrinterId -- TODO: this is silly, introduce data Range a = Range { rMin :: a, rMax :: a } | 
| 87 | :> QueryParam "min" JobId | 87 | :> QueryParam "min" JobId | 
| 88 | :> QueryParam "max" JobId | 88 | :> QueryParam "max" JobId | 
| 89 | :> QueryParam "minTime" UTCTime | 89 | :> QueryParam "minTime" UTCTime | 
| @@ -94,16 +94,16 @@ type ThermoprintAPI = "printers" :> Get '[JSON] (Map PrinterId PrinterStatus) | |||
| 94 | :<|> "job" :> Capture "jobId" JobId :> ( | 94 | :<|> "job" :> Capture "jobId" JobId :> ( | 
| 95 | Get '[JSON] Printout | 95 | Get '[JSON] Printout | 
| 96 | :<|> "status" :> Get '[JSON] JobStatus | 96 | :<|> "status" :> Get '[JSON] JobStatus | 
| 97 | :<|> Delete '[] () | 97 | :<|> Delete '[PlainText] () | 
| 98 | ) | 98 | ) | 
| 99 | :<|> "drafts" :> ( | 99 | :<|> "drafts" :> ( | 
| 100 | Get '[JSON] (Map DraftId (Maybe DraftTitle)) | 100 | Get '[JSON] (Map DraftId (Maybe DraftTitle)) | 
| 101 | :<|> QueryParam "title" DraftTitle :> ReqBody '[JSON] Printout :> Post '[JSON] DraftId | 101 | :<|> QueryParam "title" DraftTitle :> ReqBody '[JSON] Printout :> Post '[JSON] DraftId | 
| 102 | ) | 102 | ) | 
| 103 | :<|> "draft" :> Capture "draftId" DraftId :> ( | 103 | :<|> "draft" :> Capture "draftId" DraftId :> ( | 
| 104 | QueryParam "title" DraftTitle :> ReqBody '[JSON] Printout :> Put '[] () | 104 | QueryParam "title" DraftTitle :> ReqBody '[JSON] Printout :> Put '[PlainText] () | 
| 105 | :<|> Get '[JSON] (Maybe DraftTitle, Printout) | 105 | :<|> Get '[JSON] (Maybe DraftTitle, Printout) | 
| 106 | :<|> Delete '[] () | 106 | :<|> Delete '[PlainText] () | 
| 107 | :<|> QueryParam "printer" PrinterId :> Post '[JSON] JobId | 107 | :<|> QueryParam "printer" PrinterId :> Post '[JSON] JobId | 
| 108 | ) | 108 | ) | 
| 109 | 109 | ||
