All URIs are relative to http://localhost/v1
Method | HTTP request | Description |
---|---|---|
NamesCandidatesGet | GET /names/candidates/ | |
NamesCommitteesGet | GET /names/committees/ |
CandidateSearchList NamesCandidatesGet(q, api.key)
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.
library(openapi)
var.q <- list("inner_example") # array[character] | Name (candidate or committee) to search for
var.api.key <- 'DEMO_KEY' # character | API key for https://api.data.gov. Get one at https://api.data.gov/signup.
api.instance <- SearchApi$new()
# Configure API key authorization: ApiKeyHeaderAuth
api.instance$apiClient$apiKeys['X-Api-Key'] <- 'TODO_YOUR_API_KEY';
# Configure API key authorization: ApiKeyQueryAuth
api.instance$apiClient$apiKeys['api_key'] <- 'TODO_YOUR_API_KEY';
# Configure API key authorization: apiKey
api.instance$apiClient$apiKeys['api_key'] <- 'TODO_YOUR_API_KEY';
result <- api.instance$NamesCandidatesGet(var.q, var.api.key)
dput(result)
Name | Type | Description | Notes |
---|---|---|---|
q | list( character ) | Name (candidate or committee) to search for | |
api.key | character | API key for https://api.data.gov. Get one at https://api.data.gov/signup. | [default to 'DEMO_KEY'] |
ApiKeyHeaderAuth, ApiKeyQueryAuth, apiKey
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
0 | - |
CommitteeSearchList NamesCommitteesGet(q, api.key)
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.
library(openapi)
var.q <- list("inner_example") # array[character] | Name (candidate or committee) to search for
var.api.key <- 'DEMO_KEY' # character | API key for https://api.data.gov. Get one at https://api.data.gov/signup.
api.instance <- SearchApi$new()
# Configure API key authorization: ApiKeyHeaderAuth
api.instance$apiClient$apiKeys['X-Api-Key'] <- 'TODO_YOUR_API_KEY';
# Configure API key authorization: ApiKeyQueryAuth
api.instance$apiClient$apiKeys['api_key'] <- 'TODO_YOUR_API_KEY';
# Configure API key authorization: apiKey
api.instance$apiClient$apiKeys['api_key'] <- 'TODO_YOUR_API_KEY';
result <- api.instance$NamesCommitteesGet(var.q, var.api.key)
dput(result)
Name | Type | Description | Notes |
---|---|---|---|
q | list( character ) | Name (candidate or committee) to search for | |
api.key | character | API key for https://api.data.gov. Get one at https://api.data.gov/signup. | [default to 'DEMO_KEY'] |
ApiKeyHeaderAuth, ApiKeyQueryAuth, apiKey
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
0 | - |