WebService::Toggl::Report::Summary - Toggl summary report object
use WebService::Toggl; my $toggl = WebService::Toggl->new({api_key => 'foo'}); my $report = $toggl->summary({ workspace_id => 1234, grouping => 'projects', subgrouping => 'time_entries', }); say $report->total_billable; # billable milliseconds for $project (@{ $report->data }) { say "Time Entries For project $project->{title}{project}:"; for my $item (@{ $project->{items} }) { say $item->{title}{time_entry} . " took " . ($entry->{time} / 1000) . " seconds"; } }
This module is a wrapper object around the Toggl summary report described here. It returns a report of properties that are grouped and subgrouped according to the specified request attributes.
Request attributes common to all reports are detailed in the ::Role::Request pod.
The primary and secondary grouping properties. Defaults to projects and time_entries respectively. The following combinations are valid:
projects
time_entries
+--------------------------------------------------------+ | | Group | | +--------------+--------------+--------------+ | | projects | clients | users | +-----------+--------------+--------------+--------------+ | | time_entries | time_entries | time_entries | | Valid | tasks | tasks | tasks | | Subgroups | users | users | | | | | projects | projects | | | | | clients | +-----------+--------------+--------------+--------------+
Boolean that determines if an ids key containing a comma-separated list of subgroup ids will be added each group in the data key. Defaults to false.
ids
data
false
Boolean that determines if a time_entry_ids key containing a comma-separated list of time entry IDs will be added each group in the data key. Defaults to false.
time_entry_ids
Response attributes common to all reports are detailed in the ::Role::Request pod.
::Report::Summary returns no additional response attributes.
::Report::Summary
The data() attribute of a ::Report::Summary object is an arrayref of grouping hashrefs. Each group hashref will contain id, title, and items keys. The items key holds an arrayref of the requested subgrouping objects. For a detailed description of the contents of this structure, see the Toggl API docs.
data()
id
title
items
Copyright (C) Fitz Elliott.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Fitz Elliott <felliott@fiskur.org>
To install WebService::Toggl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Toggl
CPAN shell
perl -MCPAN -e shell install WebService::Toggl
For more information on module installation, please visit the detailed CPAN module installation guide.