-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retrieve survey translation #245
Comments
Looks like we could use the GET endpoint for survey translations, with a language code: |
I am new to Qualtrics, and I am working on an R Markdown report for a survey in English (base language) and 2 other add-on languages. This report needs to be done in all three languages and auto-refreshed for future data and survey changes. I did some research, and want to post some findings here to help other people move forward and to have a record for myself.
Example code to get Survey Translations JSON through APIlibrary(qualtRics) |
Thanks, @Celia-C. Yes, if there's demand for this we should add something so these kind of workarounds aren't necessary. BTW, if you really need an non-exported functions in an R package, you can use three colons, i.e., One other thing, @Celia-C -- can you share with us an example of what comes back from this endpoint? That might be useful to plan for what we might do with it/where we might put its output. @juliasilge -- Apparently we've been exporting (Definitely needs better documentation if we keep it, though.) |
Just to reiterate what @jmobrien said, you wouldn't necessarily need to copy the code from the qualtRics package to your own computer; instead you can use survey_url <- qualtRics::generate_url(query = "metadata", surveyID = "SV_3gbwq8aJgqPwQDP")
survey_url <- paste0(survey_url, "translations/", "EN", "/")
resp <- qualtRics:::qualtrics_api_request(verb = "GET", as = "parsed", url = survey_url)
resp
#> $meta
#> $meta$httpStatus
#> [1] "200 - OK"
#>
#> $meta$requestId
#> [1] "03f4f0bb-db1a-4881-8e57-7b3e933c9090"
#>
#>
#> $result
#> $result$QID17_QuestionText
#> [1] "Have you ever contacted customer service about your beskar armor?"
#>
#> $result$SurveyTitle
#> [1] "Online Survey Software | Qualtrics Survey Solutions"
#>
#> $result$QID16_QuestionText
#> [1] "Overall, how satisfied are you with your beskar armor?"
#>
#> $result$QID63_Choice2
#> [1] "Weekly"
#>
#> $result$QID63_Choice1
#> [1] "<span style=\"color:#8e44ad;\">Daily</span>"
#>
#> $result$QID22_QuestionText
#> [1] "If you would like to share any additional comments or experiences about your beskar armor, please enter them below."
#>
#> $result$QID63_Choice5
#> [1] "Do not use"
#>
#> $result$QID63_Choice4
#> [1] "<a href=\"https://www.instagram.com/p/B5qn5ath0ij/?hl=en\">Less often</a>"
#>
#> $result$QID63_Choice3
#> [1] "Once a <span style=\"background-color:#9b59b6;\">month</span>"
#>
#> $result$QID17_Choice2
#> [1] "No"
#>
#> $result$QID16_Choice2
#> [1] "<a href=\"https://www.gq.com/story/werner-herzog-baby-yoda\">Somewhat dissatisfied</a>"
#>
#> $result$QID16_Choice1
#> [1] "<em>Extremely</em> dissatisfied"
#>
#> $result$QID16_Choice4
#> [1] "<a href=\"https://giphy.com/explore/baby-yoda\">Somewhat satisfied</a>"
#>
#> $result$QID16_Choice3
#> [1] "<span style=\"background-color:#e74c3c;\">Neither</span> <span style=\"background-color:#e67e22;\">satisfied</span> <span style=\"background-color:#f1c40f;\">nor</span> <span style=\"background-color:#27ae60;\">dissatisfied</span>"
#>
#> $result$QID17_Choice1
#> [1] "Yes"
#>
#> $result$QID16_Choice5
#> [1] "<strong>Extremely</strong> satisfied"
#>
#> $result$SurveyDescription
#> [1] "Qualtrics sophisticated online survey software solutions make creating online surveys easy. Learn more about Research Suite and get a free account today."
#>
#> $result$QID18_QuestionText
#> [1] "Have all problems been resolved to your complete satisfaction?"
#>
#> $result$QID18_Choice3
#> [1] "No, the problem was not resolved \n<video class=\"qmedia\" controls=\"true\" height=\"168\" preload=\"auto\" width=\"268\"><source src=\"https://i.imgur.com/i40m72o.mp4\" type=\"video/mp4\" /><embed align=\"middle\" autoplay=\"false\" bgcolor=\"white\" class=\"qmedia\" controller=\"true\" height=\"168\" pluginspage=\"http://www.apple.com/quicktime/download/\" src=\"https://i.imgur.com/i40m72o.mp4\" type=\"video/quicktime\" width=\"268\" /></video>\n"
#>
#> $result$QID63_QuestionText
#> [1] "How often do you typically use your beskar armor?"
#>
#> $result$QID18_Choice1
#> [1] "Yes, by the tribe or its representatives \n<video class=\"qmedia\" controls=\"true\" height=\"268\" preload=\"auto\" width=\"268\"><source src=\"https://i.imgur.com/QlAme0q.mp4\" type=\"video/mp4\" /><embed align=\"middle\" autoplay=\"false\" bgcolor=\"white\" class=\"qmedia\" controller=\"true\" height=\"268\" pluginspage=\"http://www.apple.com/quicktime/download/\" src=\"https://i.imgur.com/QlAme0q.mp4\" type=\"video/quicktime\" width=\"268\" /></video>\n"
#>
#> $result$QID18_Choice2
#> [1] "Yes, by me or someone outside the tribe \n<video class=\"qmedia\" controls=\"true\" height=\"268\" preload=\"auto\" width=\"268\"><source src=\"https://i.imgur.com/5sRVO4d.mp4\" type=\"video/mp4\" /><embed align=\"middle\" autoplay=\"false\" bgcolor=\"white\" class=\"qmedia\" controller=\"true\" height=\"268\" pluginspage=\"http://www.apple.com/quicktime/download/\" src=\"https://i.imgur.com/5sRVO4d.mp4\" type=\"video/quicktime\" width=\"268\" /></video>\n"
#>
#> $result$QID19_QuestionText
#> [1] "Why not?" Created on 2022-09-29 with reprex v2.0.2 I am actually wondering if we should export |
Would it be possible to retrieve survey translation? Especially for
extract_colmap
andfetch_survey
?The text was updated successfully, but these errors were encountered: