airtable

package module
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 9 Imported by: 0

README

Go Airtable

Build Status Go Report Card Docs License

Go helpes for the Airtable API.

Documentation

Index

Constants

View Source
const AirtableAPIBaseURL = "https://api.airtable.com/v0/"

Variables

This section is empty.

Functions

This section is empty.

Types

type AirtableAPIClient

type AirtableAPIClient struct {
	BaseID     string
	TableName  string
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

func NewAirtableAPIClient

func NewAirtableAPIClient(token, baseID, tableName string) *AirtableAPIClient

func (*AirtableAPIClient) GetRecordID

func (client *AirtableAPIClient) GetRecordID(opts *ListOpts) (string, error)

func (*AirtableAPIClient) ListRecords

func (client *AirtableAPIClient) ListRecords(opts *ListOpts, res any) ([]byte, *http.Response, error)

func (*AirtableAPIClient) SetToken

func (client *AirtableAPIClient) SetToken(token string)

type ListOpts

type ListOpts struct {
	Fields       []string
	FilterIn     map[string]string
	FilterOut    map[string]string
	View         string
	ViewGridView bool
}

type TableGenericRecord

type TableGenericRecord struct {
	ID     string                 `json:"id"`
	Fields map[string]interface{} `json:"fields"`
}

type TableGenericRecordList

type TableGenericRecordList struct {
	Records []TableGenericRecord `json:"records"`
	Offset  string               `json:"offset"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL