Skip to main content

Votes

Struct Votes 

Source
pub struct Votes<'a>(pub &'a VotesmartProxy);

Tuple Fields§

§0: &'a VotesmartProxy

Implementations§

Source§

impl Votes<'_>

Source

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.

Source

pub async fn get_bill(&self, bill_id: i32) -> Result<Response, Error>

This method dumps general information on a bill.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub async fn get_bills_by_category_year_state( &self, category_id: i32, year: i32, state_id: Option<&str>, ) -> Result<Response, Error>

Source

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.

Source

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.

Source

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.

Source

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

Source

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.

Source

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.

Source

pub async fn get_bills_by_state_recent( &self, state_id: String, amount: Option<i32>, ) -> Result<Response, Error>

Returns a list of recent bills according to the state. Max returned is 100 or however much less you want.

Source

pub async fn get_vetoes(&self, candidate_id: i32) -> Result<Response, Error>

Returns a list of vetoes according to candidate.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for Votes<'a>

§

impl<'a> !UnwindSafe for Votes<'a>

§

impl<'a> Freeze for Votes<'a>

§

impl<'a> Send for Votes<'a>

§

impl<'a> Sync for Votes<'a>

§

impl<'a> Unpin for Votes<'a>

§

impl<'a> UnsafeUnpin for Votes<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more