The function pollster_api is the lower-level function for making a request to the Huffpost Pollster API.
There is also a function for each methods provided by the API.
pollster_api(path, query = NULL, version = "v2", response_type = NULL, as = "parsed", ...) pollster_polls(cursor = NULL, tags = NULL, question = NULL, sort = c("created_at", "updated_at"), ...) pollster_polls_slug(slug, ...) pollster_questions(cursor = NULL, tags = NULL, election_date = NULL, ...) pollster_questions_slug(slug, ...) pollster_questions_responses_clean(slug, ...) pollster_questions_responses_raw(slug, ...) pollster_charts(cursor = NULL, tags = NULL, election_date = NULL, ...) pollster_charts_slug(slug, ...) pollster_charts_polls(slug, ...) pollster_charts_trendlines(slug, ...) pollster_tags(...)
"/".list."json", "tsv", or "xml". Some endpoints are json/xml, and some are tsv.content.GET.A pollster_api object which is a list with elements
content:The parsed content of the response,
url:The URL of the request,
response:The request object returned by GET.
pollster_polls: Get polls. See https://app.swaggerhub.com/swagger-ui/#!/default/get_polls.
pollster_polls_slug: Get a single poll. See https://app.swaggerhub.com/swagger-ui/#!/default/get_polls_slug.
pollster_questions: Get questions. See https://app.swaggerhub.com/swagger-ui/#!/default/get_questions.
pollster_questions_slug: Get a poll question. See https://app.swaggerhub.com/swagger-ui/#!/default/get_questions_slug.
pollster_questions_responses_clean: Get a table where each row where each row is a single poll question + subpopulation and columns are response labels. See https://app.swaggerhub.com/swagger-ui/#!/default/get_questions_slug_poll_responses_clean_tsv.
pollster_questions_responses_raw: Get a table where each row is single poll question + subpopulation + response. See https://app.swaggerhub.com/swagger-ui/#!/default/get_questions_slug_poll_responses_raw_tsv.
pollster_charts: Return a list of charts. See hrefhttps://app.swaggerhub.com/swagger-ui/#!/default/get_chartsAPI Docs.
pollster_charts_slug: Get a chart. See hrefhttps://app.swaggerhub.com/swagger-ui/#!/default/get_charts_slugAPI Docs.
pollster_charts_polls: Get table with one row per poll used in a chart. See https://app.swaggerhub.com/swagger-ui/#!/default/get_charts_slug_pollster_chart_poll_questions_tsv.
pollster_charts_trendlines: Get table with the trendline estimates used in a chart. See https://app.swaggerhub.com/swagger-ui/#!/default/get_charts_slug_pollster_trendlines_tsv.
pollster_tags: Return the list of tags used in polls, questions, and charts. See https://app.swaggerhub.com/swagger-ui/#!/default/get_tags.