| Type: | Package | 
| Title: | Interface to 'typeform' Results | 
| Version: | 2.1.1 | 
| Maintainer: | Colin Gillespie <csgillespie@gmail.com> | 
| Description: | An R interface to the 'typeform' https://www.typeform.com/ application program interface. Also provides functions for downloading your results. | 
| License: | GPL-2 | GPL-3 | 
| URL: | https://github.com/csgillespie/rtypeform, http://csgillespie.github.io/rtypeform/ | 
| BugReports: | https://github.com/csgillespie/rtypeform/issues | 
| Imports: | dplyr (≥ 1.0.0), glue, httr, jsonlite, lubridate, purrr, rlang, tidyr | 
| Suggests: | testthat | 
| Encoding: | UTF-8 | 
| RoxygenNote: | 7.3.2 | 
| NeedsCompilation: | no | 
| Packaged: | 2025-01-28 15:56:18 UTC; colin | 
| Author: | Colin Gillespie [aut, cre], Jamie Owen [aut] | 
| Repository: | CRAN | 
| Date/Publication: | 2025-01-29 09:30:02 UTC | 
Check api response
Description
A function that checks the api response
Usage
check_api_response(resp, content)
Arguments
resp | 
 A response  | 
content | 
 The content  | 
Theme functions
Description
Theme API functions
Usage
create_theme(
  name,
  api = NULL,
  background_href = NULL,
  background_layout = "fullscreen",
  background_brightness = 0,
  colors_answer = "#4FB0AE",
  colors_background = "#FFFFFF",
  colors_button = "#4FB0AE",
  colors_question = "#3D3D3D",
  font = "Source Sans Pro",
  has_transparent_button = TRUE
)
get_theme(theme_id, api = NULL)
get_themes(api = NULL, page = 1, page_size = 10)
update_theme(
  theme_id,
  name,
  api = NULL,
  background_href = NULL,
  background_layout = "fullscreen",
  background_brightness = 0,
  colors_answer = "#4FB0AE",
  colors_background = "#FFFFFF",
  colors_button = "#4FB0AE",
  colors_question = "#3D3D3D",
  font = "Source Sans Pro",
  has_transparent_button = TRUE
)
delete_theme(theme_id, api = NULL)
Arguments
name | 
 See https://www.typeform.com/developers/create/reference/create-theme/  | 
api | 
 Default   | 
background_href | 
 See https://www.typeform.com/developers/create/reference/create-theme/  | 
background_layout | 
 See https://www.typeform.com/developers/create/reference/create-theme/  | 
background_brightness | 
 See https://www.typeform.com/developers/create/reference/create-theme/  | 
colors_answer | 
 See https://www.typeform.com/developers/create/reference/create-theme/  | 
colors_background | 
 See https://www.typeform.com/developers/create/reference/create-theme/  | 
colors_button | 
 See https://www.typeform.com/developers/create/reference/create-theme/  | 
colors_question | 
 See https://www.typeform.com/developers/create/reference/create-theme/  | 
font | 
 See https://www.typeform.com/developers/create/reference/create-theme/  | 
has_transparent_button | 
 See https://www.typeform.com/developers/create/reference/create-theme/  | 
theme_id | 
 The theme id  | 
page | 
 The page of results to retrieve. Default 1 is the first page of results.  | 
page_size | 
 Number of results to retrieve per page. Default is 10. Maximum is 200.  | 
Deletes a typeform
Description
Delete the specified typeform.
Usage
delete_form(form_id, api = NULL)
Arguments
form_id | 
 The form id of the typeform you want the results for.  | 
api | 
 Default   | 
Delete Responses
Description
Delete entries in a type form- use with care!
Usage
delete_responses(form_id, api = NULL, included_tokens = NULL)
Arguments
form_id | 
 The form id of the typeform you want the results for.  | 
api | 
 Default   | 
included_tokens | 
 A vector of tokens to delete. Maximum 1000. Token ids
can be extracted from the meta data frame via   | 
Value
If successful, the function will return (invisibly) TRUE
Retrieve API key from Renviron
Description
If the entry typeform_api2 exists in your
.Renviron return that value. Otherwise, raise an error.
Usage
get_api(api = NULL)
Arguments
api | 
 Default   | 
Details
In version 1 of the typeform API, rtypeform looked for the key typeform_api,
Get Authorization
Description
A function to get authorization
Usage
get_authorization(api)
Arguments
api | 
 An authentication key  | 
Retrieve your own account information.
Description
Returns alias, email and language.
Usage
get_me(api = NULL)
Arguments
api | 
 Default   | 
Fetch all available typeforms
Description
This function returns a two column data frame containing the typeform names and their associated ids.
Usage
get_number_of_forms(api = NULL, search = "", workspace_id = NULL)
get_forms(
  api = NULL,
  page = 1,
  page_size = 10,
  search = "",
  workspace_id = NULL
)
Arguments
api | 
 Default   | 
search | 
 Returns items that contain the specified string.  | 
workspace_id | 
 Retrieve typeforms for the specified workspace.  | 
page | 
 The page of results to retrieve. Default 1 is the first page of results.  | 
page_size | 
 Number of results to retrieve per page. Default is 10. Maximum is 200.  | 
Value
A list containing content and the response.
Get team members
Description
Return a tibble containing the current team members. The total number of seats is attached via an attribute.
Usage
get_number_of_seats(api = NULL)
get_teams(api = NULL)
Arguments
api | 
 Default   | 
Available workspaces
Description
A tibble containing details on workspaces
Usage
get_number_of_workspace(api = NULL, search = NULL)
get_workspaces(api = NULL, search = NULL, page = 1, page_size = 10)
create_workspace(workspace_name, api = NULL)
get_workspace(workspace_id, api = NULL)
update_workspace(
  workspace_id,
  api = NULL,
  workspace_name = NULL,
  add_members = NULL,
  remove_members = NULL
)
delete_workspace(workspace_id, api = NULL)
Arguments
api | 
 Default   | 
search | 
 Returns items that contain the specified string.  | 
page | 
 The page of results to retrieve. Default 1 is the first page of results.  | 
page_size | 
 Number of results to retrieve per page. Default is 10. Maximum is 200.  | 
workspace_name | 
 The name workspace name  | 
workspace_id | 
 Retrieve typeforms for the specified workspace.  | 
add_members | 
 Email address  | 
remove_members | 
 Email address  | 
Get response
Description
A function that allows you to get a response from the server.
Usage
get_response(api, url)
Arguments
api | 
 An authentication key  | 
url | 
 The URL of the site  | 
Download questionnaire results
Description
Download results for a particular typeform questionnaire.
Usage
get_responses(
  form_id,
  api = NULL,
  page_size = 25,
  since = NULL,
  until = NULL,
  after = NULL,
  before = NULL,
  completed = NULL,
  query = NULL,
  fields = NULL
)
Arguments
form_id | 
 The form id of the typeform you want the results for.  | 
api | 
 Default   | 
page_size | 
 Maximum number of responses. Default value is 25. Maximum value is 1000.  | 
since | 
 default   | 
until | 
 default   | 
after | 
 default   | 
before | 
 default   | 
completed | 
 default   | 
query | 
 Limit request to only responses that that include the specified term.  | 
fields | 
 Not implemented. Pull requests welcome  | 
Value
A list. The first value is meta information. Subsequent elements are questions..
See Also
Create an OAuth token
Description
Create a token object using the client id and secret options set, together with the defined scopes.
Usage
make_new_token()
Post response
Description
A function that allows you to post an update to the server
Usage
post_response(api, url, body = NULL, ...)
Arguments
api | 
 An authentication key  | 
url | 
 The URL of the site  | 
body | 
 The information sent out to the server. e.g. the title  | 
... | 
 Other arguments  | 
Set access scopes for OAuth access
Description
Define access scopes for an application. See https://www.typeform.com/developers/get-started/scopes/ for more information on what scopes are allowed and their permissions.
Set option for rtypeform client id, secret
Usage
rtypeform_set_scope(scopes = NULL)
rtypeform_set_client_id(id = NULL)
rtypeform_set_client_secret(secret = NULL)
rtypeform_set_token(token)
Arguments
scopes | 
 A character vector of scopes  | 
id | 
 A client id from a typeform registered application  | 
secret | 
 A client secret from a typeform registered application  | 
token | 
 Either a string of a personal access token,
or an OAuth token returned by   | 
Examples
rtypeform_set_scope(scopes = c("forms:read"))