Safe Haskell | None |
---|---|
Language | Haskell2010 |
- module Airtable.Table
- data AirtableOptions = AirtableOptions {}
- defaultAirtableOptions :: AirtableOptions
- airtableOptionsToWreqOptions :: AirtableOptions -> Options
- tableNameToUrl :: AirtableOptions -> TableName -> String
- getRecords :: (HasCallStack, FromJSON a) => AirtableOptions -> TableName -> IO (Table a)
- createRecord :: (HasCallStack, ToJSON a, FromJSON a) => AirtableOptions -> TableName -> a -> IO (Record a)
- updateRecord :: ToJSON a => AirtableOptions -> TableName -> RecordID -> a -> IO ()
- deleteRecord :: AirtableOptions -> TableName -> RecordID -> IO ()
Documentation
module Airtable.Table
Configuration for Airtable requests.
airtableOptionsToWreqOptions :: AirtableOptions -> Options Source #
Produce Wreq options from AirtableOptions
tableNameToUrl :: AirtableOptions -> TableName -> String Source #
Produce a request URL to a table.
API
getRecords :: (HasCallStack, FromJSON a) => AirtableOptions -> TableName -> IO (Table a) Source #
Retrieve the records for a table from airtable.com given its name. Handles pagination correctly.
createRecord :: (HasCallStack, ToJSON a, FromJSON a) => AirtableOptions -> TableName -> a -> IO (Record a) Source #
Upload a record to a given table. Returns the newly created RecordID
.
updateRecord :: ToJSON a => AirtableOptions -> TableName -> RecordID -> a -> IO () Source #
Update a record on a given table, using the supplied fields (a
).
deleteRecord :: AirtableOptions -> TableName -> RecordID -> IO () Source #
Delete a record on a table.