Skip to content

Instantly share code, notes, and snippets.

@smach
Forked from msukmanowsky/parsely_api.r
Last active August 29, 2015 14:15
Show Gist options
  • Save smach/051cd9de9ebf8bf9def1 to your computer and use it in GitHub Desktop.
Save smach/051cd9de9ebf8bf9def1 to your computer and use it in GitHub Desktop.
install.packages("jsonlite", dependencies = TRUE)
install.packages("RCurl", dependencies = TRUE)
library("jsonlite")
library("RCurl")
base_url <- "https://api.parsely.com/v2"
apikey <- "computerworld.com"
api_secret <- "YOUR SECRET KEY"
# Get top posts
url = paste(base_url, "/analytics/posts?apikey=", apikey, "&secret=", secret, sep = "")
top_posts <- getURL(url)
top_posts <- jsonlite::fromJSON(top_posts)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment