View source: R/parse-response.R
parse_response.wikidiff2 | R Documentation |
Wikipedia's APIs provide data using a range of different json schemas. This generic function converts the data into a convenient formats for use in an R data frame.
## S3 method for class 'wikidiff2'
parse_response(response)
parse_response(response)
## Default S3 method:
parse_response(response)
## S3 method for class 'row_list'
parse_response(response)
response |
The data retrieved from Wikipedia. |
A vector the same length as the response. Generally, this will be a simple vector, a tibble::tbl_df or a list of tibble::tbl_df objects.
parse_response(wikidiff2)
: Simplify a wikidiff2 response to a dataframe of
textual differences, discarding display data
parse_response(default)
: By default, create a list of nested tbl_dfs
parse_response(row_list)
: Many of the endpoints return a list of named
values for each page, which can easily be row-bound. They often contain
nested data, however, which is automatically unnested by dplyr::bind_rows.
Hence this more basic approach.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.