-
Notifications
You must be signed in to change notification settings - Fork 89
Getting Results
coryschires edited this page Jan 31, 2011
·
18 revisions
Exits.results(profile, :limit => 10,
:offset => 20,
:start_date => (Date.today - 30),
:end_date => Date.today,
:filters => {:pageviews.gte => 200},
:sort => :pageviews)
The shorthand with a given profile is also nice:
profile.exits(:limit => 10, :offset => 20)
This can be done with any class which extends Garb::Model
Note that contains accepts a regex notation but as a string rather than a actual regex object. For example, to get results for all pages with a path containing “blog/posts/any-post-title” use this:
Exits.results(profile, :filters => {:page_path.contains => "^\/blog\/posts\/.+" })
Instead of:
Exits.results(profile, :filters => {:page_path.contains => /^\/blog\/posts\/.+/ })