blib/lib/BZ/Client/BugUserLastVisit.pm untested

filter: Statementstmt 0.0% 0 / 17 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 28 CC 3 SCAR 14.6
CC
3
Cov
0%
update
6.0
get
6.0
BEGIN
2.0
CRAP 4.3
1 #!/bin/false
2 # PODNAME: BZ::Client::BugUserLastVisit
3 # ABSTRACT: Find and Store the last time a user visited a Bugzilla Bug.
4  
5 use strict;
6 use warnings 'all';
7  
8 package BZ::Client::BugUserLastVisit;
9 $BZ::Client::BugUserLastVisit::VERSION = '4.4001';
10  
11 use parent qw( BZ::Client::API );
12  
13 # See https://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/WebService/BugUserLastVisit.html
14  
15 ## functions
16  
17 sub update {
18 my($class, $client, $params) = @_;
19 my $result = $class->api_call($client, 'BugUserLastVisit.update', $params);
20 return wantarray ? @$result : $result
21 }
22  
23 sub get {
24 my($class, $client, $params) = @_;
25 my $result = $class->api_call($client, 'BugUserLastVisit.get', $params);
26 return wantarray ? @$result : $result
27 }
28  
29 1;
30  
31 __END__
32  
33 =pod
34  
35 =encoding UTF-8
36  
37 =head1 NAME
38  
39 BZ::Client::BugUserLastVisit - Find and Store the last time a user visited a Bugzilla Bug.
40  
41 =head1 VERSION
42  
43 version 4.4001
44  
45 =head1 SYNOPSIS
46  
47 Find and Store the last time a user visited a Bug. in Bugzilla.
48  
49 my $client = BZ::Client->new( url => $url,
50 user => $user,
51 password => $password );
52  
53 my @details = BZ::Client::BugUserLastVisit->update( $client, \%params );
54 my @details = BZ::Client::BugUserLastVisit->get( $client, \%params );
55  
56 =head1 CLASS METHODS
57  
58 This section lists the class methods, which are available in this module.
59  
60 =head2 update
61  
62 @details = BZ::Client::BugUserLastVisit->update( $client, \%params );
63 $details = BZ::Client::BugUserLastVisit->update( $client, \%params );
64  
65 Update the last visit time for the specified bug and current user.
66  
67 =head3 History
68  
69 Marked as experimental in Bugzill 5.0.
70  
71 =head3 Parameters
72  
73 =over 4
74  
75 =item ids
76  
77 I<ids> (array) - One or more bug ids to add
78  
79 =back
80  
81 =head3 Returns
82  
83 An array of hashes containing the following;
84  
85 =over 4
86  
87 =item id
88  
89 I<id> (int) The bug id.
90  
91 =item last_visit_ts
92  
93 I<last_visit_ts> (string) The timestamp the user last visited the bug.
94  
95 =back
96  
97 =head2 get
98  
99 @details = BZ::Client::BugUserLastVisit->get( $client, \%params );
100 $details = BZ::Client::BugUserLastVisit->get( $client, \%params );
101  
102 Get the last visited timestamp for one or more specified bug ids.
103  
104 =head3 Parameters
105  
106 =over 4
107  
108 =item ids
109  
110 I<ids> (array) - One or more bug ids to add
111  
112 =back
113  
114 =head3 Returns
115  
116 An array of hashes containing the following;
117  
118 =over 4
119  
120 =item id
121  
122 I<id> (int) The bug id.
123  
124 =item last_visit_ts
125  
126 I<last_visit_ts> (string) The timestamp the user last visited the bug.
127  
128 =back
129  
130 =head1 EXCEPTION HANDLING
131  
132 See L<BZ::Client::Exception>
133  
134 =head1 SEE ALSO
135  
136 L<BZ::Client>, L<BZ::Client::API>, L<Bugzilla API|https://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/WebService/BugUserLastVisit.html>
137  
138 =head1 AUTHORS
139  
140 =over 4
141  
142 =item *
143  
144 Dean Hamstead <dean@bytefoundry.com.au>
145  
146 =item *
147  
148 Jochen Wiedmann <jochen.wiedmann@gmail.com>
149  
150 =back
151  
152 =head1 COPYRIGHT AND LICENSE
153  
154 This software is copyright (c) 2017 by Dean Hamstad.
155  
156 This is free software; you can redistribute it and/or modify it under
157 the same terms as the Perl 5 programming language system itself.
158  
159 =cut