Title: | Interface to 'typeform' Results |
---|---|
Description: | An R interface to the 'typeform' <https://typeform.com> application program interface. Also provides functions for downloading your results. |
Authors: | Colin Gillespie [aut, cre], Jamie Owen [aut] |
Maintainer: | Colin Gillespie <[email protected]> |
License: | GPL-2 | GPL-3 |
Version: | 2.1.0 |
Built: | 2025-01-09 05:25:50 UTC |
Source: | https://github.com/csgillespie/rtypeform |
A function that checks the api response
check_api_response(resp, content)
check_api_response(resp, content)
resp |
A response |
content |
The content |
Theme functions
Theme API functions
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)
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)
name |
See https://developer.typeform.com/create/reference/create-theme/ |
api |
Default |
background_href |
See https://developer.typeform.com/create/reference/create-theme/ |
background_layout |
See https://developer.typeform.com/create/reference/create-theme/ |
background_brightness |
See https://developer.typeform.com/create/reference/create-theme/ |
colors_answer |
See https://developer.typeform.com/create/reference/create-theme/ |
colors_background |
See https://developer.typeform.com/create/reference/create-theme/ |
colors_button |
See https://developer.typeform.com/create/reference/create-theme/ |
colors_question |
See https://developer.typeform.com/create/reference/create-theme/ |
font |
See https://developer.typeform.com/create/reference/create-theme/ |
has_transparent_button |
See https://developer.typeform.com/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. |
Delete the specified typeform.
delete_form(form_id, api = NULL)
delete_form(form_id, api = NULL)
form_id |
The form id of the typeform you want the results for. |
api |
Default |
Delete entries in a type form- use with care!
delete_responses(form_id, api = NULL, included_tokens = NULL)
delete_responses(form_id, api = NULL, included_tokens = NULL)
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 |
If successful, the function will return (invisibily) TRUE
If the entry typeform_api2
exists in your
.Renviron
return that value. Otherwise, raise an error.
get_api(api = NULL)
get_api(api = NULL)
api |
Default |
In version 1 of the typeform API, rtypeform looked for the key typeform_api
,
A function to get authorization
get_authorization(api)
get_authorization(api)
api |
An authentication key |
Returns alias, email and language.
get_me(api = NULL)
get_me(api = NULL)
api |
Default |
This function returns a two column data frame containing the typeform names and their associated ids.
get_number_of_forms(api = NULL, search = "", workspace_id = NULL) get_forms( api = NULL, page = 1, page_size = 10, search = "", workspace_id = NULL )
get_number_of_forms(api = NULL, search = "", workspace_id = NULL) get_forms( api = NULL, page = 1, page_size = 10, search = "", workspace_id = NULL )
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. |
A list containing content and the response.
Return a tibble containing the current team members. The total number of seats is attached via an attribute.
get_number_of_seats(api = NULL) get_teams(api = NULL)
get_number_of_seats(api = NULL) get_teams(api = NULL)
api |
Default |
A tibble containing details on workspaces
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)
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)
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 |
A function that allows you to get a response from the server.
get_response(api, url)
get_response(api, url)
api |
An authentication key |
url |
The URL of the site |
Download results for a particular typeform questionnaire.
get_responses( form_id, api = NULL, page_size = 25, since = NULL, until = NULL, after = NULL, before = NULL, completed = NULL, query = NULL, fields = NULL )
get_responses( form_id, api = NULL, page_size = 25, since = NULL, until = NULL, after = NULL, before = NULL, completed = NULL, query = NULL, fields = NULL )
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 |
A list. The first value is meta information. Subsequent elements are questions..
https://developer.typeform.com/responses/reference/retrieve-responses/
Create a token object using the client id and secret options set, together with the defined scopes.
make_new_token()
make_new_token()
A function that allows you to post an update to the server
post_response(api, url, body = NULL, ...)
post_response(api, url, body = NULL, ...)
api |
An authentication key |
url |
The URL of the site |
body |
The infrormation sent out to the server. e.g. the title |
... |
Other arguments |
Define access scopes for an application. See https://developer.typeform.com/get-started/scopes/ for more information on what scopes are allowed and their permissions.
Set option for rtypeform client id, secret
rtypeform_set_scope(scopes = NULL) rtypeform_set_client_id(id = NULL) rtypeform_set_client_secret(secret = NULL) rtypeform_set_token(token)
rtypeform_set_scope(scopes = NULL) rtypeform_set_client_id(id = NULL) rtypeform_set_client_secret(secret = NULL) rtypeform_set_token(token)
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 |
rtypeform_set_scope(scopes = c("forms:read"))
rtypeform_set_scope(scopes = c("forms:read"))