Title: | An Interface to the 'AppSheet' API |
Version: | 0.1.0 |
Description: | Functionality to add, delete, read and update table records from your 'AppSheet' apps, using the official API https://api.appsheet.com/. |
License: | MIT + file LICENSE |
URL: | https://github.com/calderonsamuel/appsheet |
BugReports: | https://github.com/calderonsamuel/appsheet/issues |
Imports: | cli, httr2, magrittr, purrr, rlang, tibble |
Suggests: | covr, testthat (≥ 3.0.0) |
Config/testthat/edition: | 3 |
Config/testthat/parallel: | true |
Encoding: | UTF-8 |
RoxygenNote: | 7.2.3 |
NeedsCompilation: | no |
Packaged: | 2023-09-15 22:19:37 UTC; dgco93 |
Author: | Samuel Calderon |
Maintainer: | Samuel Calderon <samuel.calderon@uarm.pe> |
Repository: | CRAN |
Date/Publication: | 2023-09-18 13:20:06 UTC |
Appsheet Function
Description
This function interacts with the AppSheet API to perform actions on a specified table. For more info, check the official documentation.
Usage
appsheet(
tableName,
Action = "Find",
Properties = ash_properties(),
Rows = list(),
appId = Sys.getenv("APPSHEET_APP_ID"),
access_key = Sys.getenv("APPSHEET_APP_ACCESS_KEY")
)
Arguments
tableName |
The name of the table to perform actions on. |
Action |
The action to be performed on the table, one of ("Find", "Add", "Delete", "Edit"). Default is "Find", which reads a table. |
Properties |
A list of properties for the action. |
Rows |
A list of rows for the action. Default is an empty list. |
appId |
The AppSheet application ID. Default is retrieved from the APPSHEET_APP_ID environment variable. |
access_key |
The AppSheet application access key. Default is retrieved from the APPSHEET_APP_ACCESS_KEY environment variable. |
Value
A data frame containing the response from the AppSheet API.
Examples
## Not run:
appsheet("my_table")
appsheet("my_table", Properties = ash_properties(Locale = "en-GB"))
## End(Not run)
Build the properties of an Appsheet request
Description
This function exist to provide auto completion. Still, it is likely that users will need to visit the official documentation for further customization.
Usage
ash_properties(
Locale = "en-US",
Location = NULL,
RunAsUserEmail = NULL,
Timezone = NULL,
UserSettings = NULL,
Selector = NULL,
...
)
Arguments
Locale |
Locale of the client making the request.
For example, en-US indicates English, United States.
If this value is not specified, Locale defaults to en-US. |
Location |
Latitude and longitude of the client making the request. If not specified, Location defaults to 0.000000, 0.000000. |
RunAsUserEmail |
User email address of the person taking the action. The action is performed under the user email address you specify. If this value is not specified, the action is performed under the user email address of the application owner. |
Timezone |
Timezone of the client making the request. |
UserSettings |
User setting to be used when performing the action. If not specified, no user settings are used. |
Selector |
Expression to select and format the rows returned. Only valid when Action is "Find". |
... |
Placeholder for future properties to be introduced in the API. |
Details
Any NULL will be internally dropped before performing the request.
Value
A list of properties
Examples
ash_properties()
ash_properties(Locale = "en-GB")
Appsheet request builder
Description
Appsheet request builder
Usage
ash_request(
tableName,
Action = "Find",
Properties = ash_properties(),
Rows = list(),
appId = Sys.getenv("APPSHEET_APP_ID"),
access_key = Sys.getenv("APPSHEET_APP_ACCESS_KEY")
)
Arguments
tableName |
The name of the table to perform actions on. |
Action |
The action to be performed on the table, one of ("Find", "Add", "Delete", "Edit"). Default is "Find", which reads a table. |
Properties |
A list of properties for the action. |
Rows |
A list of rows for the action. Default is an empty list. |
appId |
The AppSheet application ID. Default is retrieved from the APPSHEET_APP_ID environment variable. |
access_key |
The AppSheet application access key. Default is retrieved from the APPSHEET_APP_ACCESS_KEY environment variable. |
Value
An httr2 request