DeyeCloud-Client

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN

    as follows:

        # Setting API server base URL and method is not required in
        # every case. However, pay an attention that device data
        # retrieval CAN require setting those variables explicitly!
        #
        $deye->baseurl('https://eu1-developer.deyecloud.com/v1.0');
        $deye->method('POST');
        my $data = $deye->call('station/latest', 'stationId' => INTEGER);

    Available options list depends on endpoint. Most endpoints are described
    in Deye Cloud developer guide.

- **status(HASH)**

    Wrapper method to get latest station or device status. Implicitly sets
    the right method and baseurl, both are restored on return. Main difference
    between **call()** and **status()** methods is that **call()** returns reference
    to a hash and **status()** returns a blessed reference to a **DeyeCloud::Client::Device**
    or **DeyeCloud::Client::Station** class object. You can use either a variable name
    or a getter method in order to refer to a specific variable:

lib/DeyeCloud/Client.pm  view on Meta::CPAN

as follows:

    # Setting API server base URL and method is not required in
    # every case. However, pay an attention that device data
    # retrieval CAN require setting those variables explicitly!
    #
    $deye->baseurl('https://eu1-developer.deyecloud.com/v1.0');
    $deye->method('POST');
    my $data = $deye->call('station/latest', 'stationId' => INTEGER);

Available options list depends on endpoint. Most endpoints are described
in Deye Cloud developer guide.

=back

=cut

    unless ($self->ua->default_header('Authorization')) {
        $self->seterror(DeyeCloud::Client::Common::E_NOTOKEN);
        return undef;
    }



( run in 1.645 second using v1.01-cache-2.11-cpan-524268b4103 )