2 // FilterBooksParameters.swift
5 // Created by Pawel Dabrowski on 30/05/2018.
6 // Copyright © 2018 Fundacja Nowoczesna Polska. All rights reserved.
11 class FilterBooksParameters{
12 static let SEARCH_ITEMS_COUNT = 30
14 static func ==(lhs: FilterBooksParameters, rhs: FilterBooksParameters) -> Bool {
15 return lhs.search == rhs.search && lhs.epochs == rhs.epochs && lhs.genres == rhs.genres && lhs.kinds == rhs.kinds && lhs.after == rhs.after
18 var onlyLectures: Bool?
19 var hasAudiobook: Bool?
27 func parameters() -> [String: Any]{
28 var dict: [String: Any] = ["count": FilterBooksParameters.SEARCH_ITEMS_COUNT]
47 if let value = onlyLectures, value == true {
48 dict["lektura"] = "true"
51 if let value = hasAudiobook, value == true {
52 dict["audiobook"] = "true"
55 dict["new_api"] = "true"