Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions R/generate_pkg-paths.R
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,7 @@ S7::method(as_bk_data, class_paths) <- function(x) {
}

.compile_param_class_descriptions <- function(type, allow_empty, required) {
r_class_descriptions <- .glue_pipe_brace(
"length-1 [|{type$r_class_package}|::|{type$r_class_link}|()]"
) |>
r_class_descriptions <- glue::glue("length-1 `{type$r_class_name}`") |>
.paste0_if(
allow_empty,
" or `NULL`"
Expand Down
40 changes: 20 additions & 20 deletions tests/testthat/_fixtures/fec/paths-audit-get_audit_case.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@
#'
#' This endpoint contains Final Audit Reports approved by the Commission since inception. The search can be based on information about the audited committee (Name, FEC ID Number, Type, Election Cycle) or the issues covered in the report.
#'
#' @param audit_case_id (length-1 [base::list()], optional) Primary/foreign key for audit tables
#' @param cycle (length-1 [base::list()], optional) Filter records to only those that are applicable to a given two-year period. This cycle follows the traditional House election cycle and subdivides the presidential and Senate elections into comparable two-year blocks. The cycle begins with an odd year and is named for its ending, even year.
#' @param sub_category_id (length-1 [base::character()], optional) The finding id of an audit. Finding are a category of broader issues. Each category has an unique ID.
#' @param sort_nulls_last (length-1 [base::logical()], optional) Toggle that sorts null values last
#' @param sort_hide_null (length-1 [base::logical()], optional) Hide null values on sorted column(s).
#' @param min_election_cycle (length-1 [base::list()], optional) Filter records to only those that are applicable to a given two-year period. This cycle follows the traditional House election cycle and subdivides the presidential and Senate elections into comparable two-year blocks. The cycle begins with an odd year and is named for its ending, even year.
#' @param audit_id (length-1 [base::list()], optional) The audit issue. Each subcategory has an unique ID
#' @param q (length-1 [base::list()], optional) The name of the committee. If a committee changes its name, the most recent name will be shown. Committee names are not unique. Use committee_id for looking up records.
#' @param per_page (length-1 [base::list()], optional) The number of results returned per page. Defaults to 20.
#' @param max_election_cycle (length-1 [base::list()], optional) Filter records to only those that are applicable to a given two-year period. This cycle follows the traditional House election cycle and subdivides the presidential and Senate elections into comparable two-year blocks. The cycle begins with an odd year and is named for its ending, even year.
#' @param candidate_id (length-1 [base::list()], optional) A unique identifier assigned to each candidate registered with the FEC. If a person runs for several offices, that person will have separate candidate IDs for each office.
#' @param committee_type (length-1 [base::list()], optional) The one-letter type code of the organization: - C communication cost - D delegate - E electioneering communication - H House - I independent expenditure filer (not a committee) - N PAC - nonqualified - O independent expenditure-only (super PACs) - P presidential - Q PAC - qualified - S Senate - U single candidate independent expenditure - V PAC with non-contribution account, nonqualified - W PAC with non-contribution account, qualified - X party, nonqualified - Y party, qualified - Z national party non-federal account
#' @param qq (length-1 [base::list()], optional) Name of candidate running for office
#' @param page (length-1 [base::list()], optional) For paginating through results, starting at page 1
#' @param committee_id (length-1 [base::list()], optional) A unique identifier assigned to each committee or filer registered with the FEC. In general committee id's begin with the letter C which is followed by eight digits.
#' @param api_key (length-1 [base::character()]) API key for https://api.data.gov. Get one at https://api.data.gov/signup.
#' @param committee_designation (length-1 [base::character()], optional) Type of committee: - H or S - Congressional - P - Presidential - X or Y or Z - Party - N or Q - PAC - I - Independent expenditure - O - Super PAC
#' @param primary_category_id (length-1 [base::character()], optional) Audit category ID (table PK)
#' @param sort_null_only (length-1 [base::logical()], optional) Toggle that filters out all rows having sort column that is non-null
#' @param sort (length-1 [base::list()], optional) Provide a field to sort by. Use `-` for descending order. ex: `-case_no`
#' @param audit_case_id (length-1 `list`, optional) Primary/foreign key for audit tables
#' @param cycle (length-1 `list`, optional) Filter records to only those that are applicable to a given two-year period. This cycle follows the traditional House election cycle and subdivides the presidential and Senate elections into comparable two-year blocks. The cycle begins with an odd year and is named for its ending, even year.
#' @param sub_category_id (length-1 `character`, optional) The finding id of an audit. Finding are a category of broader issues. Each category has an unique ID.
#' @param sort_nulls_last (length-1 `logical`, optional) Toggle that sorts null values last
#' @param sort_hide_null (length-1 `logical`, optional) Hide null values on sorted column(s).
#' @param min_election_cycle (length-1 `list`, optional) Filter records to only those that are applicable to a given two-year period. This cycle follows the traditional House election cycle and subdivides the presidential and Senate elections into comparable two-year blocks. The cycle begins with an odd year and is named for its ending, even year.
#' @param audit_id (length-1 `list`, optional) The audit issue. Each subcategory has an unique ID
#' @param q (length-1 `list`, optional) The name of the committee. If a committee changes its name, the most recent name will be shown. Committee names are not unique. Use committee_id for looking up records.
#' @param per_page (length-1 `list`, optional) The number of results returned per page. Defaults to 20.
#' @param max_election_cycle (length-1 `list`, optional) Filter records to only those that are applicable to a given two-year period. This cycle follows the traditional House election cycle and subdivides the presidential and Senate elections into comparable two-year blocks. The cycle begins with an odd year and is named for its ending, even year.
#' @param candidate_id (length-1 `list`, optional) A unique identifier assigned to each candidate registered with the FEC. If a person runs for several offices, that person will have separate candidate IDs for each office.
#' @param committee_type (length-1 `list`, optional) The one-letter type code of the organization: - C communication cost - D delegate - E electioneering communication - H House - I independent expenditure filer (not a committee) - N PAC - nonqualified - O independent expenditure-only (super PACs) - P presidential - Q PAC - qualified - S Senate - U single candidate independent expenditure - V PAC with non-contribution account, nonqualified - W PAC with non-contribution account, qualified - X party, nonqualified - Y party, qualified - Z national party non-federal account
#' @param qq (length-1 `list`, optional) Name of candidate running for office
#' @param page (length-1 `list`, optional) For paginating through results, starting at page 1
#' @param committee_id (length-1 `list`, optional) A unique identifier assigned to each committee or filer registered with the FEC. In general committee id's begin with the letter C which is followed by eight digits.
#' @param api_key (length-1 `character`) API key for https://api.data.gov. Get one at https://api.data.gov/signup.
#' @param committee_designation (length-1 `character`, optional) Type of committee: - H or S - Congressional - P - Presidential - X or Y or Z - Party - N or Q - PAC - I - Independent expenditure - O - Super PAC
#' @param primary_category_id (length-1 `character`, optional) Audit category ID (table PK)
#' @param sort_null_only (length-1 `logical`, optional) Toggle that filters out all rows having sort column that is non-null
#' @param sort (length-1 `list`, optional) Provide a field to sort by. Use `-` for descending order. ex: `-case_no`
#' @inheritParams .shared-params
#'
#' @returns `fec_get_audit_case()`: The API response.
Expand Down
18 changes: 9 additions & 9 deletions tests/testthat/_fixtures/fec/paths-audit-get_audit_category.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
#'
#' This lists the options for the categories and subcategories available in the /audit-search/ endpoint.
#'
#' @param sort_nulls_last (length-1 [base::logical()], optional) Toggle that sorts null values last
#' @param page (length-1 [base::list()], optional) For paginating through results, starting at page 1
#' @param primary_category_name (length-1 [base::list()], optional) Primary Audit Category - No Findings or Issues/Not a Committee - Net Outstanding Campaign/Convention Expenditures/Obligations - Payments/Disgorgements - Allocation Issues - Prohibited Contributions - Disclosure - Recordkeeping - Repayment to US Treasury - Other - Misstatement of Financial Activity - Excessive Contributions - Failure to File Reports/Schedules/Notices - Loans - Referred Findings Not Listed
#' @param sort_hide_null (length-1 [base::logical()], optional) Hide null values on sorted column(s).
#' @param api_key (length-1 [base::character()]) API key for https://api.data.gov. Get one at https://api.data.gov/signup.
#' @param primary_category_id (length-1 [base::list()], optional) Audit category ID (table PK)
#' @param sort_null_only (length-1 [base::logical()], optional) Toggle that filters out all rows having sort column that is non-null
#' @param per_page (length-1 [base::list()], optional) The number of results returned per page. Defaults to 20.
#' @param sort (length-1 [base::character()], optional) Provide a field to sort by. Use `-` for descending order.
#' @param sort_nulls_last (length-1 `logical`, optional) Toggle that sorts null values last
#' @param page (length-1 `list`, optional) For paginating through results, starting at page 1
#' @param primary_category_name (length-1 `list`, optional) Primary Audit Category - No Findings or Issues/Not a Committee - Net Outstanding Campaign/Convention Expenditures/Obligations - Payments/Disgorgements - Allocation Issues - Prohibited Contributions - Disclosure - Recordkeeping - Repayment to US Treasury - Other - Misstatement of Financial Activity - Excessive Contributions - Failure to File Reports/Schedules/Notices - Loans - Referred Findings Not Listed
#' @param sort_hide_null (length-1 `logical`, optional) Hide null values on sorted column(s).
#' @param api_key (length-1 `character`) API key for https://api.data.gov. Get one at https://api.data.gov/signup.
#' @param primary_category_id (length-1 `list`, optional) Audit category ID (table PK)
#' @param sort_null_only (length-1 `logical`, optional) Toggle that filters out all rows having sort column that is non-null
#' @param per_page (length-1 `list`, optional) The number of results returned per page. Defaults to 20.
#' @param sort (length-1 `character`, optional) Provide a field to sort by. Use `-` for descending order.
#' @inheritParams .shared-params
#'
#' @returns `fec_get_audit_category()`: The API response.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
#'
#' This lists the options for the primary categories available in the /audit-search/ endpoint.
#'
#' @param sort_nulls_last (length-1 [base::logical()], optional) Toggle that sorts null values last
#' @param page (length-1 [base::list()], optional) For paginating through results, starting at page 1
#' @param primary_category_name (length-1 [base::list()], optional) Primary Audit Category - No Findings or Issues/Not a Committee - Net Outstanding Campaign/Convention Expenditures/Obligations - Payments/Disgorgements - Allocation Issues - Prohibited Contributions - Disclosure - Recordkeeping - Repayment to US Treasury - Other - Misstatement of Financial Activity - Excessive Contributions - Failure to File Reports/Schedules/Notices - Loans - Referred Findings Not Listed
#' @param sort_hide_null (length-1 [base::logical()], optional) Hide null values on sorted column(s).
#' @param api_key (length-1 [base::character()]) API key for https://api.data.gov. Get one at https://api.data.gov/signup.
#' @param primary_category_id (length-1 [base::list()], optional) Audit category ID (table PK)
#' @param sort_null_only (length-1 [base::logical()], optional) Toggle that filters out all rows having sort column that is non-null
#' @param per_page (length-1 [base::list()], optional) The number of results returned per page. Defaults to 20.
#' @param sort (length-1 [base::character()], optional) Provide a field to sort by. Use `-` for descending order.
#' @param sort_nulls_last (length-1 `logical`, optional) Toggle that sorts null values last
#' @param page (length-1 `list`, optional) For paginating through results, starting at page 1
#' @param primary_category_name (length-1 `list`, optional) Primary Audit Category - No Findings or Issues/Not a Committee - Net Outstanding Campaign/Convention Expenditures/Obligations - Payments/Disgorgements - Allocation Issues - Prohibited Contributions - Disclosure - Recordkeeping - Repayment to US Treasury - Other - Misstatement of Financial Activity - Excessive Contributions - Failure to File Reports/Schedules/Notices - Loans - Referred Findings Not Listed
#' @param sort_hide_null (length-1 `logical`, optional) Hide null values on sorted column(s).
#' @param api_key (length-1 `character`) API key for https://api.data.gov. Get one at https://api.data.gov/signup.
#' @param primary_category_id (length-1 `list`, optional) Audit category ID (table PK)
#' @param sort_null_only (length-1 `logical`, optional) Toggle that filters out all rows having sort column that is non-null
#' @param per_page (length-1 `list`, optional) The number of results returned per page. Defaults to 20.
#' @param sort (length-1 `character`, optional) Provide a field to sort by. Use `-` for descending order.
#' @inheritParams .shared-params
#'
#' @returns `fec_get_audit_primary_category()`: The API response.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#'
#' Search for candidates or committees by name. If you're looking for information on a particular person or group, using a name to find the `candidate_id` or `committee_id` on this endpoint can be a helpful first step.
#'
#' @param api_key (length-1 [base::character()]) API key for https://api.data.gov. Get one at https://api.data.gov/signup.
#' @param q (length-1 [base::list()]) Name (candidate or committee) to search for
#' @param api_key (length-1 `character`) API key for https://api.data.gov. Get one at https://api.data.gov/signup.
#' @param q (length-1 `list`) Name (candidate or committee) to search for
#' @inheritParams .shared-params
#'
#' @returns `fec_get_names_audit_candidates()`: The API response.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#' Search for candidates or committees by name. If you're looking for information on a particular person or group, using a name to find the `candidate_id` or `committee_id` on this endpoint can be a helpful first step.
#'
#'
#' @param api_key (length-1 [base::character()]) API key for https://api.data.gov. Get one at https://api.data.gov/signup.
#' @param q (length-1 [base::list()]) Name (candidate or committee) to search for
#' @param api_key (length-1 `character`) API key for https://api.data.gov. Get one at https://api.data.gov/signup.
#' @param q (length-1 `list`) Name (candidate or committee) to search for
#' @inheritParams .shared-params
#'
#' @returns `fec_get_names_audit_committees()`: The API response.
Expand Down
Loading
Loading