Currently, Push requires a channel option be specified upon creating the push, and that the push target the set of channels exclusively. It would be nice to allow targeting of installations via the where option:
p = Opium::Push.new where: Installation.where( device_type: :ios )
This would necessitate the creation of an Installation class for semantic reasons. Such a class is separately desirable for managing installations via the API. However, this might be slightly over thinking the requirements for performing a push query. Perhaps something like the following:
p = Opium::Push.new where: { device_type: :ios }
Both could be supported, with one being implemented on top of the other. The Installation syntax would have the benefit of being able to use Opium::Model::Criteria to validate / name convert.
Currently, Push requires a channel option be specified upon creating the push, and that the push target the set of channels exclusively. It would be nice to allow targeting of installations via the
where
option:This would necessitate the creation of an
Installation
class for semantic reasons. Such a class is separately desirable for managing installations via the API. However, this might be slightly over thinking the requirements for performing a push query. Perhaps something like the following:Both could be supported, with one being implemented on top of the other. The
Installation
syntax would have the benefit of being able to useOpium::Model::Criteria
to validate / name convert.