Open jcasimir opened 11 years ago
It would be slick if the library could automatically convert outgoing dates to the API, like this:
start_time = Date.today.beginning_of_day - 60*60*24 recent_petitions = WeThePeople::Resources::Petition.all(nil, :createdAfter => start_time)
Would generate a correct URL with scoping query. It'll use a string representation of time, however. To work, you currently need to remember to convert to epoch time manually:
start_time = Date.today.beginning_of_day - 60*60*24 recent_petitions = WeThePeople::Resources::Petition.all(nil, :createdAfter => start_time.to_i)
It would be slick if the library could automatically convert outgoing dates to the API, like this:
Would generate a correct URL with scoping query. It'll use a string representation of time, however. To work, you currently need to remember to convert to epoch time manually: