Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a0b008a
commit 67f0f26
Showing
30 changed files
with
454 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,27 @@ | ||
Package: rtypeform | ||
Type: Package | ||
Package: rtypeform | ||
Title: Interface to 'typeform' Results | ||
Version: 2.0.0 | ||
Authors@R: person(given = "Colin", | ||
family = "Gillespie", | ||
email = "csgillespie@gmail.com", | ||
role = c("aut", "cre")) | ||
Version: 2.0.1 | ||
Authors@R: | ||
person(given = "Colin", | ||
family = "Gillespie", | ||
role = c("aut", "cre"), | ||
email = "csgillespie@gmail.com") | ||
Maintainer: Colin Gillespie <csgillespie@gmail.com> | ||
Description: An R interface to the 'typeform' | ||
<https://typeform.com> application program interface. Also provides | ||
functions for downloading your results. | ||
License: GPL-2 | GPL-3 | ||
URL: https://github.com/csgillespie/rtypeform | ||
BugReports: https://github.com/csgillespie/rtypeform/issues | ||
Description: An R interface to the 'typeform' <https://typeform.com> application program interface. | ||
Also provides functions for downloading your results. | ||
License: GPL-2 | GPL-3 | ||
LazyData: TRUE | ||
Imports: jsonlite, httr, purrr, utils, tibble, dplyr, glue, lubridate, | ||
tidyr | ||
Imports: assertthat, dplyr, glue, httr, jsonlite, lubridate, purrr, | ||
tibble, tidyr, utils | ||
Suggests: testthat | ||
RoxygenNote: 6.1.0 | ||
Encoding: UTF-8 | ||
LazyData: TRUE | ||
RoxygenNote: 7.1.0 | ||
NeedsCompilation: no | ||
Packaged: 2018-08-28 21:30:54 UTC; ncsg3 | ||
Packaged: 2020-03-23 19:43:14 UTC; ncsg3 | ||
Author: Colin Gillespie [aut, cre] | ||
Repository: CRAN | ||
Date/Publication: 2018-08-28 21:40:02 UTC | ||
Date/Publication: 2020-03-23 20:00:03 UTC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,40 @@ | ||
81a646d38b2e3b6db553d7f3ffd2e38c *DESCRIPTION | ||
fd0c5ea391a1e3797a2dfe644dc09102 *NAMESPACE | ||
90b88bd7adc9edc9bbdcbe98f3e40177 *NEWS.md | ||
64db7919b8e760fbf63a2bb97c2c75c8 *DESCRIPTION | ||
b47b07927acac276bdc62867fe0602dd *NAMESPACE | ||
64328b76fb13007b6dcd1362f5fd6528 *NEWS.md | ||
635941dbbd7270c4c0c635937c8b6dda *R/auth.R | ||
ec4f83eeeeae26a3c802e16ffb00c2b4 *R/delete_form.R | ||
ec8572ee036f7a2cd93a1ab42ed57517 *R/delete_responses.R | ||
e9cc7ce1c8c9e1203aff715b872f9344 *R/get_api.R | ||
30e2114d899a902b828a133c5b69dddc *R/get_form.R | ||
448c1de06a5f5849cc44f5eaa83e6d3d *R/get_forms.R | ||
bf1204cf35dff4755fdd64d8802343dc *R/delete_responses.R | ||
fed4ca2e94ebd53398ee0b8c57d285ad *R/get_api.R | ||
f4253d36bfbe6232e55c10b4a3bf9f92 *R/get_form.R | ||
2009cfe179335606d1d0d43e6195d4be *R/get_forms.R | ||
f5454863a2f9e48f5d9464646004fabb *R/get_me.R | ||
a82692f1b62a313e8990ca6fe0895321 *R/get_responses.R | ||
d7a6d109f7ae20e34c68a0d48d365864 *R/httr_responses.R | ||
ab4d23e720b02aaa19acf97462413e5f *R/rest_argument_formatting.R | ||
44cf772e70695b3184a75c6d9e8939e3 *R/get_responses.R | ||
12822260c363e197956490e36655dc54 *R/httr_responses.R | ||
a73a3fcb2639f70c62d416b7ef99c52f *R/options.R | ||
20e5fb77416585c28da4a4690932adb5 *R/rest_argument_formatting.R | ||
b87db923050475b3d983984b85c22979 *R/teams.R | ||
8f444fcabda656089a58bae128a6950c *R/themes.R | ||
8e8866720070cc63a9d3d7a50a848b8b *R/workspaces.R | ||
327d3794c779ad639c6c433427d4aaf7 *R/zzz.R | ||
392e294251744f4b708f1f110f50929f *README.md | ||
0cb161b78d9f53744e8d36486b68f081 *man/create_theme.Rd | ||
5ba71666b6518164bf63ffb38f83b03b *R/themes.R | ||
df7ddd5764f9bfb9987d09d46c44f925 *R/workspaces.R | ||
ecba08dfe5c3f3a583dcb46e6a78fa3d *README.md | ||
790fd12460b0df9d3a8849fbe2e36faf *man/check_api_response.Rd | ||
fd0c0105e44f7e8a7fb88eaa2a992bb8 *man/create_theme.Rd | ||
c85b5c659797d93c9500d50f929579cd *man/delete_form.Rd | ||
1170d23090953608163aae72731d6de9 *man/delete_responses.Rd | ||
e8c3146bdfd477782c289737b9998fa7 *man/get_api.Rd | ||
6b381b23da1a19526413e3337c479795 *man/get_forms.Rd | ||
14ddb1358a450a29860fda1590ac8683 *man/get_authorization.Rd | ||
6fcd8f725fa5ee83555ad4005022bdb1 *man/get_forms.Rd | ||
81715703a1b68bcac259da599f447dca *man/get_me.Rd | ||
c5df267cd29636263e3a3dee1a4f48bb *man/get_responses.Rd | ||
83094a8c848d2792d7079b56bbf02711 *man/get_response.Rd | ||
3e0b01eb43f79f7b5e8b2ae465b7c90b *man/get_responses.Rd | ||
68d55f545cedd37ece882b040bfc4dce *man/get_teams.Rd | ||
52362534a13d5fec3bce790fe966f967 *man/get_workspaces.Rd | ||
d01d39f6588c7f4667064023813e009b *man/get_workspaces.Rd | ||
e2da0017130b8f7f6ce41280113aaa05 *man/make_new_token.Rd | ||
239a728954424430702f5123295d376b *man/post_response.Rd | ||
e3143a85be9ee7f4d12635175cc3eb4b *man/rtypeform_set_scope.Rd | ||
fdd4d6b2f737f7cb02bf00b0bb2af68b *tests/testthat.R | ||
e9d07d124d972d20f7d2a6b7d119e206 *tests/testthat/form.rds | ||
1b514e8eac315a08da3094c47a594048 *tests/testthat/test_api_response.R | ||
5c6649ba2648e22ecf58c91910e0f515 *tests/testthat/test_get_forms.R | ||
20a712abc32c32c14e6c4d8853a985bc *tests/testthat/test_get_responses.R | ||
3e1effe7d783ee66b046d128bc5235ba *tests/testthat/test_api_response.R | ||
4898c69b4c1ee54890fb589e51434dda *tests/testthat/test_get_forms.R | ||
d2c1c21687ea2f97d1456eff5d6765fe *tests/testthat/test_get_responses.R | ||
8fd9aab8902e5a44a860c8416e4e9a0b *tests/testthat/test_teams.R | ||
b59ff56421e4b521cf6628584174ca16 *tests/testthat/test_workspaces.R |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#' Create an OAuth token | ||
#' | ||
#' Create a token object using the client id and secret options set, together | ||
#' with the defined scopes. | ||
#' | ||
#' @importFrom httr oauth_app oauth2.0_token oauth_endpoint | ||
#' @export | ||
make_new_token = function() { | ||
key = getOption("rtypeform.client_id", "") | ||
secret = getOption("rtypeform.client_secret", "") | ||
scope = getOption("rtypeform.scopes_selected", "") | ||
|
||
if (key == "" || is.null(key)) { | ||
stop("option('rtypeform.client_id') has not been set") | ||
} | ||
if (secret == "" || is.null(secret)) { | ||
stop("option('rtypeform.client_secret') has not been set") | ||
} | ||
if ((length(scope) == 1 && scope == "") || is.null(scope)) { | ||
stop("option('rtypeform.scopes_selected') has not been set") | ||
} | ||
|
||
app = oauth_app("typeform", key = key, secret = secret) | ||
endpoint = oauth_endpoint(authorize = "https://api.typeform.com/oauth/authorize", | ||
access = "https://api.typeform.com/oauth/token") | ||
|
||
typeform_token = oauth2.0_token(endpoint = endpoint, | ||
app = app, | ||
scope = scope) | ||
typeform_token | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,3 @@ get_form = function(form_id, api = NULL) { | |
content = get_response(api = api, url) | ||
content | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.