pub struct Votes<'a>(pub &'a VotesmartProxy);Tuple Fields§
§0: &'a VotesmartProxyImplementations§
Source§impl Votes<'_>
impl Votes<'_>
Sourcepub async fn get_categories(
&self,
year: i32,
state_id: Option<&str>,
) -> Result<Response, Error>
pub async fn get_categories( &self, year: i32, state_id: Option<&str>, ) -> Result<Response, Error>
This method dumps categories that contain released bills according to year and state.
Sourcepub async fn get_bill(&self, bill_id: i32) -> Result<Response, Error>
pub async fn get_bill(&self, bill_id: i32) -> Result<Response, Error>
This method dumps general information on a bill.
Sourcepub async fn get_bill_action(&self, action_id: i32) -> Result<Response, Error>
pub async fn get_bill_action(&self, action_id: i32) -> Result<Response, Error>
This gets detailed action information on a certain stage of the bill.
Sourcepub async fn get_bill_action_votes(
&self,
action_id: i32,
) -> Result<Response, Error>
pub async fn get_bill_action_votes( &self, action_id: i32, ) -> Result<Response, Error>
Method provides votes listed by candidate on a certain bill action.
Sourcepub async fn get_bill_action_vote_by_official(
&self,
action_id: i32,
candidate_id: i32,
) -> Result<Response, Error>
pub async fn get_bill_action_vote_by_official( &self, action_id: i32, candidate_id: i32, ) -> Result<Response, Error>
Returns a single vote according to official and action.
Sourcepub async fn get_by_bill_number(
&self,
bill_number: String,
) -> Result<Response, Error>
pub async fn get_by_bill_number( &self, bill_number: String, ) -> Result<Response, Error>
Returns a list of bills that are like the billNumber input.
pub async fn get_bills_by_category_year_state( &self, category_id: i32, year: i32, state_id: Option<&str>, ) -> Result<Response, Error>
Sourcepub async fn get_bills_by_year_state(
&self,
year: i32,
state_id: Option<&str>,
) -> Result<Response, Error>
pub async fn get_bills_by_year_state( &self, year: i32, state_id: Option<&str>, ) -> Result<Response, Error>
Returns a list of bills that fit the year and state input.
Sourcepub async fn get_bills_by_official_year_office(
&self,
candidate_id: i32,
year: i32,
office_id: Option<&str>,
) -> Result<Response, Error>
pub async fn get_bills_by_official_year_office( &self, candidate_id: i32, year: i32, office_id: Option<&str>, ) -> Result<Response, Error>
Returns a list of bills that fit the candidate and year.
Sourcepub async fn get_bills_by_official_category_office(
&self,
candidate_id: i32,
category_id: i32,
office_id: Option<&str>,
) -> Result<Response, Error>
pub async fn get_bills_by_official_category_office( &self, candidate_id: i32, category_id: i32, office_id: Option<&str>, ) -> Result<Response, Error>
Returns a list of bills that fit the candidate and category.
Sourcepub async fn get_by_official(
&self,
candidate_id: i32,
office_id: Option<&str>,
category_id: Option<&str>,
year: Option<&str>,
) -> Result<Response, Error>
pub async fn get_by_official( &self, candidate_id: i32, office_id: Option<&str>, category_id: Option<&str>, year: Option<&str>, ) -> Result<Response, Error>
This method dumps all the bills an official has voted on based on the candidateId, officeId, categoryId, and year
Sourcepub async fn get_bills_by_sponsor_year(
&self,
candidate_id: i32,
year: i32,
) -> Result<Response, Error>
pub async fn get_bills_by_sponsor_year( &self, candidate_id: i32, year: i32, ) -> Result<Response, Error>
Returns a list of bills that fit the sponsor’s candidateId and year.
Sourcepub async fn get_bills_by_sponsor_category(
&self,
candidate_id: i32,
category_id: i32,
) -> Result<Response, Error>
pub async fn get_bills_by_sponsor_category( &self, candidate_id: i32, category_id: i32, ) -> Result<Response, Error>
Returns a list of bills that fit the sponsor’s candidateId and category.