[][src]Struct indeed_querybuilder::IndeedQuery

pub struct IndeedQuery {
    pub city: City,
    pub radius: u32,
    pub max_age: u32,
    pub min_salary: u32,
    pub experience_level: ExperienceLevel,
    pub job_type: JobType,
    pub contains_all_words: Vec<String>,
    pub has_exact_phrase: String,
    pub has_any_words: Vec<String>,
    pub excludes_all_words: Vec<String>,
    pub has_words_in_title: Vec<String>,
    pub company: String,
    pub exclude_staffing_agencies: ExcludeStaffingAgencies,
    pub show_from: ShowFrom,
    pub sort_by: SortBy,
    pub limit: u32,
    pub start: u32,
}

IndeedQuery configuration

Examples

use indeed_search::{ JobType, IndeedQueryBuilder, ExperienceLevel, ExcludeStaffingAgencies, SortBy, City};

let query = IndeedQueryBuilder::default()
   .has_words_in_title(vec!["Developer".to_string()])
   .excludes_all_words(vec![
       "C#".to_string(),
       ".NET".to_string(),
       "Azure".to_string(),
       "Unpaid".to_string(),
       "Senior".to_string(),
   ])
   .exclude_staffing_agencies(ExcludeStaffingAgencies::True)
   .has_any_words(vec![
       "Embedded".to_string(),
       "Full-Stack".to_string(),
       "Linux".to_string(),
       "Rust".to_string(),
       "Unix".to_string(),
       "Web".to_string(),
   ])
   .min_salary(85000 as u32)
   .city(City::CityState(
       "San Francisco".to_string(),
       "CA".to_string(),
   ))
   .radius(40 as u32)
   .job_type(JobType::FullTime)
   .experience_level(ExperienceLevel::EntryLevel)
   .sort_by(SortBy::Date)
   .max_age(14 as u32)
   .build()
   .unwrap();
assert_eq!(query.build_url().unwrap(), "https://www.indeed.com/jobs?as_and=&as_phr=&as_any=Embedded+Full-Stack+Linux+Rust+Unix+Web&as_not=C%23+.NET+Azure+Unpaid+Senior&as_ttl=Developer&as_cmp=&jt=fulltime&st=&explvl=entry_level&sr=directhire&salary=85000&radius=40&l=San+Francisco%2C+CA&fromage=14&limit=50&sort=date&psf=advsrch&from=advancedsearch&start=0");

Fields

city: City

target city

radius: u32

maximum distance in miles from target city

max_age: u32

max number of days since jobs were posted

min_salary: u32

minimum expecteded salary for all jobs

experience_level: ExperienceLevel

experience level filter for all jobs

job_type: JobType

job type filter for all jobs

contains_all_words: Vec<String>

job posting must contain all keywords

has_exact_phrase: String

job posting must contain exact phrase

has_any_words: Vec<String>

job posting must contain at least one keyword

excludes_all_words: Vec<String>

job posting must not contain any keyword

has_words_in_title: Vec<String>

job posting must contain all words in job title

company: String

jobs only posted by a specified company

exclude_staffing_agencies: ExcludeStaffingAgencies

whether or not to include postings from staffing agencies in result

show_from: ShowFrom

show from filter

sort_by: SortBy

sort resuts by relevance or date posted

limit: u32

limit number of jobs per page

start: u32

show results starting after n number of jobs

Implementations

impl IndeedQuery[src]

pub fn build_url(&self) -> Result<String, ParseError>[src]

convert query to url string

pub fn increment_page(&mut self)[src]

increments start offset to next page of results

Trait Implementations

impl Clone for IndeedQuery[src]

impl Debug for IndeedQuery[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.