How to get all factual monetize deals wit ruby driver

172 Views Asked by At

I tried to get all deals for a city in the US from the Factual monetize API by the help of the ruby driver

query = factual.monetize.filters("place_locality" => "San Francisco") 

Is there a limit of 20 results? How is it possible to get more deals?

2

There are 2 best solutions below

0
On

Have you tried adding query.page(1, :per => 100) as described in point 6 of https://github.com/Factual/factual-ruby-driver#more-read-examples?

0
On

You can chain the query methods, like this:

factual.table("places").filters("category" => "Food & Beverage > Restaurants").search("sushi", "sashimi")
.geo("$circle" => {"$center" => [34.06021, -118.41828], "$meters" => 5000})
.sort("name").page(2, :per => 10)