Laad libraries

library(httr) # om data uit de API te krijgen
library(htmltools) # voor html te genereren

Vraag info op over OGAO-collectie

collection <- content(GET("https://raindrop.io/v1/collection/1051032"))
bookmarks <- content(GET("https://raindrop.io/v1/bookmarks/1051032"))

Access collection en bookmarks-data as R-objects

collection$item$title # print titel van collectie
## [1] "HIVA Arbeid en Organisatie"
length(bookmarks$items) # aantal bookmarks
## [1] 9
bookmarks$items[[2]]$title # title v/d 2e bookmark
## [1] "“Doe niet mee met vakbond en je krijgt extra dag vakantie en smartphone”"
paste(bookmarks$items[[2]]$tags) # tags v/d 2e bookmark
## [1] "uitzendsector"        "sociale verkiezingen" "vakbond"             
## [4] "fascisme"

Resultaat output HTML-stukje

Bookmarks voor collectie van HIVA Arbeid en Organisatie: