Name: AirtableR
Owner: Zapier
Description: R wrapper to the Airtable API
Forked from: jsng/AirtableR
Created: 2016-05-20 19:12:23.0
Updated: 2016-05-20 19:12:25.0
Pushed: 2016-06-27 16:07:38.0
Size: 30
Language: R
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
R wrapper to the Airtable API
For more information on the Airtable API see: http://api.airtable.com/
vtools::install_github("jsng/AirtableR")
brary(AirtableR)
Firstly, you should enter your Airtable API key.
rtable <- Airtable(
base = "<YOUR BASE NAME>", # e.g "appZNrwXN7bsOU0ta"
tables = c("archive", "items") # table names
dn't find env var AIRTABLE_KEY. See ?airtable_key for more details.
se enter your KEY and press enter:
You can also set Airtable API Key in .Renviron
file.
ABLE_KEY=<YOUR API KEY HERE>
cords <- airtable$archive$list_records()
r(records)
of 363
List of 3
$ id : chr "rec0E97Ze9J6iyLBW"
$ fields :List of 19
..$ permalink : chr "nogarifilm"
..$ is_live : chr "true"
..$ amount : int 700000
..$ count : int 13
..$ start_date : chr "2016-02-02"
cord <- airtable$archive$retrieve_record("rec0E97Ze9J6iyLBW")
r(record)
of 3
d : chr "rec0E97Ze9J6iyLBW"
ields :List of 19
$ permalink : chr "nogarifilm"
$ is_live : chr "true"
$ amount : int 700000
$ count : int 13
$ start_date : chr "2016-02-02"
rtable$archive$create_record(fields = list(field_name = "foo"))
onse [https://api.airtable.com/v0/<YOUR BASE NAME>/archive/<RECORD_ID>]
te: 2016-03-13 12:57
atus: 200
ntent-Type: application/json; charset=utf-8
ze: 41 B
suing a PATCH request
rtable$archive$update_record("<RECORD_ID>", fields = list(field_name = "bar"))
onse [https://api.airtable.com/v0/<YOUR BASE NAME>/archive/<RECORD_ID>]
te: 2016-03-13 12:57
atus: 200
ntent-Type: application/json; charset=utf-8
ze: 41 B
suing a PUT request
rtable$archive$update_record("<RECORD_ID>", fields = list(field_name = "foobar"), method = "put")
onse [https://api.airtable.com/v0/<YOUR BASE NAME>/archive/<RECORD_ID>]
te: 2016-03-13 12:57
atus: 200
ntent-Type: application/json; charset=utf-8
ze: 41 B
rtable$archive$delete_record("<RECORD_ID>")
onse [https://api.airtable.com/v0/<YOUR BASE NAME>/archive/<RECORD_ID>]
te: 2016-03-13 12:57
atus: 200
ntent-Type: application/json; charset=utf-8
ze: 41 B