= Classifieds API
== Description
This premature gem allows one to search items on Kijiji using search filters.
The gem is currently in development for more features.
If you would like a feature to be added to the upcoming features, please email me at jbisson@uwaterloo.ca
View the complete documentation at: https://github.com/jfbisson4/classifieds_api/wiki
== Installation
gem install classifieds_api
== Requirements
-
Ruby 2.0 or higher
-
Nokogiri version ~> 1.6
-
Open-Uri version ~> 2.0
== Example
Search for 5 ads using the keyword 'computers' over $500 in the Toronto (GTA) region.
Print the results.
require 'classifieds_api'
require 'nokogiri'
require 'open-uri'
filters = ClassifiedsApi::SearchFilters.new(location: 'Toronto (GTA)')
kijiji_session = ClassifiedsApi::Kijiji.new
filters.price_minimum = 500
keyword = 'computers'
search_limit = 5
ads = kijiji_session.search(keyword, search_limit, filters)
ads.each { |ad| ad.print_ad }