-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathget_ly_interpellations.Rd
102 lines (90 loc) · 2.67 KB
/
get_ly_interpellations.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_ly_interpellations.R
\encoding{UTF-8}
\name{get_ly_interpellations}
\alias{get_ly_interpellations}
\title{Get Legislative Yuan Interpellation Records}
\usage{
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
)
}
\arguments{
\item{page}{An integer specifying the page number (default: 1)}
\item{limit}{An integer specifying the number of records per page (default: 20)}
\item{legislator}{A string specifying the legislator's name}
\item{term}{An integer specifying the legislative term number}
\item{session_period}{An integer specifying the session period}
\item{session_times}{An integer specifying the session times}
\item{meet_id}{A string specifying the meeting ID (e.g., "院會-9-2-1")}
\item{query}{A string to search in interpellation reasons or content}
\item{show_progress}{A logical value indicating whether to show progress bar (default: TRUE)}
}
\value{
A list with two components:
\describe{
\item{metadata}{A list containing pagination and filter information:
\describe{
\item{total}{Total number of records found}
\item{total_page}{Total number of pages}
\item{current_page}{Current page number}
\item{per_page}{Number of records per page}
\item{filters_used}{List of filters applied}
}
}
\item{interpellations}{A data frame containing interpellation records:
\describe{
\item{id}{Interpellation ID}
\item{printed_at}{Date when printed}
\item{reason}{Interpellation reason}
\item{description}{Detailed content}
\item{legislators}{Comma-separated list of legislators}
\item{meet_id}{Meeting ID}
\item{term}{Legislative term}
\item{sessionPeriod}{Session period}
\item{sessionTimes}{Session times}
\item{ppg_url}{URL to the parliamentary record}
}
}
}
}
\description{
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.
}
\examples{
\dontrun{
# 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)
}
}
\seealso{
\url{https://ly.govapi.tw/} for API documentation
}