Weenect-API
view release on metacpan or search on metacpan
lib/Weenect/API.pm view on Meta::CPAN
method get_preferences {
require Weenect::Preferences;
my $res = $api->request("myuser");
return unless $res;
return Weenect::Preferences->create($res);
}
=head2 set_preferences( %prefs )
Sets one or more preferences.
E.g.
language => "nl"
preferred_metric_system => "km"
option => 0
mail_pref => { offers => 0,
company_news => 0,
new_features => 0,
surveys_and_tests => 0 }
Returns the current set of preferences in the form of a
Weenect::Preferences object.
=cut
method set_preferences( %prefs ) {
require Weenect::Preferences;
my $res = $api->request( "myuser", Content => \%prefs );
return unless $res;
return Weenect::Preferences->create($res);
}
=head2 get_animals( $imei )
Returns a list of animals associated with a given tracked, identified by its IMEI number (as a string).
The animals info is in the form of a Weenect::Animal object.
( run in 0.775 second using v1.01-cache-2.11-cpan-2aafcb1aa8b )