upload: Upload a payload

Description Usage Arguments Details Value Examples

View source: R/push.R

Description

This function uploads events to PSI data server, 'data.psi-mis.org'.

Usage

1
2
3
4
5
6
7
upload(
  df,
  live = FALSE,
  importStrategy = "CREATE",
  dryRun = F,
  skipNotifications = F
)

Arguments

df

A data.frame object, the event payload.

importStrategy

A string specifying the action to apply on the import.It provides options to Save objects of all, new or update import status on the server. One of 'CREATE', 'UPDATE', 'CREATE_AND_UPDATE' and 'DELETE'.The default one is "CREATE".

dryRun

A logical input; Save changes on the server or just return the import summary.By default, The default one is FALSE, to save the changes on the server.

skipNotifications

A logical input; provides an option to send notifications for completed events. The default one is FALSE

Details

upload function uploads individual events to two PSI servers; 'data.psi-mis.org' and 'clone.psi-mis.org'. By default it sends the events to the test server available at 'clone.psi-mis.org'.

Value

An S3 type object with content, path and the response.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
# upload to test erver
upload(x)

# upload to production
upload(x, live = T)

# upload from a list
  upload_sheets <- function(x, live = F) {
x %>%
 map(., function(y) upload(y, live))
}

upload_sheets(x)


## End(Not run)

INyabuto/a360importer documentation built on Jan. 9, 2020, 4:25 p.m.