Skip to content
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

pages body #32

Open
jcorelli opened this issue Nov 5, 2018 · 2 comments
Open

pages body #32

jcorelli opened this issue Nov 5, 2018 · 2 comments

Comments

@jcorelli
Copy link

jcorelli commented Nov 5, 2018

get_course_item(courseid,'pages') does not bring back the body field. How can I get the html code from the page?

@jonovik
Copy link
Contributor

jonovik commented Aug 19, 2019

library(tidyverse)
library(rcanvas)

COURSE_NAME <- "<insert word(s) from course name here>"
PAGE_TITLE <- "<insert word(s) from page title here>"

course_id <- get_course_list() %>% 
  filter(name %>% str_detect(COURSE_NAME)) %>% 
  pull(id)
page_url <- get_course_items(course_id, "pages") %>% 
  filter(title %>% str_detect(PAGE_TITLE)) %>% 
  pull(url)
body <- get_wpage(course_id, page_url) %>% 
  pull(body)

# rcanvas version: 0.0.0.9001 2019-08-14 local (daranzolin/rcanvas@31f7eab)

@scottkosty
Copy link
Contributor

@jcorelli Did the above comment answer your question?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants