Skip to content

Searching for schools

Michał Oręziak edited this page Jun 12, 2019 · 4 revisions

Searching for schools

(async () => {
  const Search = new Lava.Search()
  const results = await Search.search(new SearchConfig({
    query: 'batorego',
    city: 'Warszawa'
  }))
  await Search.cleanUp()
  results
  .pipe(searchResultsToJSON)
  .pipe(fs.createWriteStream('./schools.json'))

Whats going on here?

  1. Search instance is created.
  2. search method on Search instance is called. You have to pass as argument SearchConfig instance with specified filters such as:
    • schoolType - School type (Can be highschool, technicalSchool or vocationalSchool)
    • test - Does school require taking internal tests or exams? (Boolean)
    • type - Class type (Can be bilingual, integration, athletic, integrationForDisabled, generalAvailability, international, sportsMastery)
    • disabledFriendly - Is school building disabled friendly? (Can be true, false or partly)
    • city - Which city school is located in? (WARNING! If you didn't select Warsaw recrutiment system omit this field). List of available cities:
      • Góra Kalwaria
      • Komornica
      • Konstancin-Jeziorna
      • Legionowo
      • Marki
      • Nasielsk
      • Nowy Dwór Mazowiecki
      • Piaseczno
      • Pomiechówek
      • Radzymin
      • Serock
      • Stanisławów Pierwszy
      • Sulejówek
      • Tarczyn
      • Tłuszcz
      • Urle
      • Warszawa
      • Wołomin
      • Zielonka
      • Żyrardów
Clone this wiki locally