diff --git a/README.md b/README.md index 627d2ed..4a65e36 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ Table of contents - [Get record by ID](#get-record-by-id) - [Update records](#update-records) - [Delete record](#delete-record) + - [Bulk delete records](#bulk-delete-records) - [Special thanks](#special-thanks) @@ -138,6 +139,17 @@ if err != nil { } ``` +### Bulk delete records + +To delete up to 10 records + +```Go +records, err := table.DeleteRecords([]string{"recordID1", "recordsID2"}) +if err != nil { + // Handle error +} +``` + ## Special thanks Inspired by [Go Trello API](github.com/adlio/trello) \ No newline at end of file diff --git a/table.go b/table.go index 3ceeec1..70bfb29 100644 --- a/table.go +++ b/table.go @@ -46,7 +46,7 @@ func (t *Table) GetRecordsWithParams(params url.Values) (*Records, error) { return records, nil } -// AddRecords method to lines to table (up to 10 in one request) +// AddRecords method to add lines to table (up to 10 in one request) // https://airtable.com/{yourDatabaseID}/api/docs#curl/table:{yourTableName}:create func (t *Table) AddRecords(records *Records) (*Records, error) { result := new(Records) @@ -61,7 +61,7 @@ func (t *Table) AddRecords(records *Records) (*Records, error) { return result, err } -// UpdateRecords full updates records +// UpdateRecords full update records func (t *Table) UpdateRecords(records *Records) (*Records, error) { response := new(Records) err := t.client.post(t.dbName, t.tableName, records, response)