View source: R/get_ly_interpellations.R
get_ly_interpellations | R Documentation |
Fetches and parses interpellation records from the Legislative Yuan API. Supports filtering by legislator, term, session and keyword search. Returns structured data including metadata and detailed interpellation records.
get_ly_interpellations(
page = 1,
limit = 20,
legislator = NULL,
term = NULL,
session_period = NULL,
session_times = NULL,
meet_id = NULL,
query = NULL,
show_progress = TRUE
)
page |
An integer specifying the page number (default: 1) |
limit |
An integer specifying the number of records per page (default: 20) |
legislator |
A string specifying the legislator's name |
term |
An integer specifying the legislative term number |
session_period |
An integer specifying the session period |
session_times |
An integer specifying the session times |
meet_id |
A string specifying the meeting ID (e.g., "院會-9-2-1") |
query |
A string to search in interpellation reasons or content |
show_progress |
A logical value indicating whether to show progress bar (default: TRUE) |
A list with two components:
A list containing pagination and filter information:
Total number of records found
Total number of pages
Current page number
Number of records per page
List of filters applied
A data frame containing interpellation records:
Interpellation ID
Date when printed
Interpellation reason
Detailed content
Comma-separated list of legislators
Meeting ID
Legislative term
Session period
Session times
URL to the parliamentary record
https://ly.govapi.tw/ for API documentation
## Not run:
# Get interpellations by legislator
zhao_records <- get_ly_interpellations(
legislator = "趙天麟",
limit = 5
)
# Get interpellations for specific term and session
session_records <- get_ly_interpellations(
term = 9,
session_period = 2,
session_times = 1
)
# Search interpellations by keyword
search_results <- get_ly_interpellations(
query = "氫能",
page = 1,
limit = 20
)
# View results
print(paste("Total records:", search_results$metadata$total))
head(search_results$interpellations)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.