View source: R/deprecated_database.R
| create_gsheet_db | R Documentation |
Used to match deprecated 'login_server' function. Use gsheet_tables_create()
to create 'googlesheet'-based database for new 'RegLogServer' object.
create_gsheet_db(name = NULL, credentials = NULL, credentials_pass_hashed)
name |
specify name for 'googlesheet' file. Defaults to random name. |
credentials |
you can pass credentials data to create already populated tables. Provide data.frame object containing variables: timestamp, user_id, user_mail and user_pass. If there are multiple records with the same user_id, the most recent will be kept only. |
credentials_pass_hashed |
mandatory when putting some credentials data. Are the passwords already hashed with 'scrypt' package? Takes TRUE (if hashed) or FALSE (if not hashed and need hashing) |
id of the 'googlesheet' file. After creation you need to provide it to login_server().
if(googlesheets4::gs4_has_token()){
gsheet.id <- create_gsheet_db()
database <- gsheet_get_db(gsheet.id)
# you can then pass 'gsheet.id' to you 'login_server' call
#
# login_server(db_method = "gsheet",
# gsheet_file = gsheet.id,
# ...)
#
print(database)
googledrive::drive_trash(gsheet.id)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.