File Coverage

blib/lib/WebService/DetectLanguage/AccountStatus.pm
Criterion Covered Total %
statement 5 5 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 7 7 100.0


line stmt bran cond sub pod time code
1             package WebService::DetectLanguage::AccountStatus;
2             $WebService::DetectLanguage::AccountStatus::VERSION = '0.04';
3 1     1   22 use 5.010;
  1         2  
4 1     1   4 use Moo;
  1         2  
  1         6  
5              
6             has date => ( is => 'ro' );
7             has requests => ( is => 'ro' );
8             has bytes => ( is => 'ro' );
9             has plan => ( is => 'ro' );
10             has plan_expires => ( is => 'ro' );
11             has daily_requests_limit => ( is => 'ro' );
12             has daily_bytes_limit => ( is => 'ro' );
13             has status => ( is => 'ro' );
14              
15             1;
16              
17             =head1 NAME
18              
19             WebService::DetectLanguage::AccountStatus - holds account status from detectlanguage.com
20              
21             =head1 SYNOPSIS
22              
23             my $status = $api->account_status();
24             printf "language = %s\n", $status->date;
25             printf "requests = %d\n", $result->requests;
26             printf "plan = %s\n", $result->plan;
27             printf "status = %s\n", $result->status;
28             ...
29              
30             =head1 DESCRIPTION
31              
32             This module is a class for data objects returned
33             by the C method
34             of L.
35              
36             See the documentation of that module for more details.
37              
38             =head1 ATTRIBUTES
39              
40             =head2 date
41              
42             Today's date, in ISO 8601 format (YYYY-MM-DD),
43             for the UTC timezone.
44              
45             =head2 requests
46              
47             The number of requests sent today.
48              
49             =head2 bytes
50              
51             Text bytes sent today.
52              
53             =head2 plan
54              
55             The text code for the plan you're on.
56             A list of the supported plans can be seen at L.
57              
58             =head2 plan_expires
59              
60             The date when your plan will expire.
61             This will be C is there's no planned expiry.
62              
63             =head2 daily_requests_limit
64              
65             The maximum number of requests you can make in a day.
66              
67             =head2 daily_bytes_limit
68              
69             The number of bytes you can send per day.
70              
71             =head2 status
72              
73             A text string giving the status for your account.
74              
75              
76             =head1 SEE ALSO
77              
78             L the main module for talking
79             to the language detection API at detectlanguage.com.
80              
81             L
82             the API's documentation for the account status method.
83              
84             =head1 AUTHOR
85              
86             Neil Bowers Eneilb@cpan.orgE
87              
88             =head1 LICENSE AND COPYRIGHT
89              
90             This software is copyright (c) 2019 by Neil Bowers .
91              
92             This is free software; you can redistribute it and/or modify it under
93             the same terms as the Perl 5 programming language system itself.