| 1 | #!/bin/false | ||
| 2 | # PODNAME: BZ::Client::Classification | ||
| 3 | # ABSTRACT: Client side representation of Classifications in Bugzilla | ||
| 4 | |||
| 5 | use strict; | ||
| 6 | use warnings 'all'; | ||
| 7 | |||
| 8 | package BZ::Client::Classification; | ||
| 9 | $BZ::Client::Classification::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/Classificaton.html | ||
| 14 | # These are in order as per the above | ||
| 15 | |||
| 16 | ## functions | ||
| 17 | |||
| 18 | sub get { | ||
| 19 | my($class, $client, $params) = @_; | ||
| 20 | return $class->_returns_array($client, 'Classification.get', $params, 'classifications'); | ||
| 21 | } | ||
| 22 | |||
| 23 | |||
| 24 | 1; | ||
| 25 | |||
| 26 | __END__ | ||
| 27 | |||
| 28 | =pod | ||
| 29 | |||
| 30 | =encoding UTF-8 | ||
| 31 | |||
| 32 | =head1 NAME | ||
| 33 | |||
| 34 | BZ::Client::Classification - Client side representation of Classifications in Bugzilla | ||
| 35 | |||
| 36 | =head1 VERSION | ||
| 37 | |||
| 38 | version 4.4001 | ||
| 39 | |||
| 40 | =head1 SYNOPSIS | ||
| 41 | |||
| 42 | This class provides methods for accessing Classification information in the | ||
| 43 | Bugzilla server. | ||
| 44 | |||
| 45 | my $client = BZ::Client->new( url => $url, | ||
| 46 | user => $user, | ||
| 47 | password => $password ); | ||
| 48 | |||
| 49 | my $classifications = BZ::Client::Classification->get( $client, \%params ); | ||
| 50 | |||
| 51 | =head1 CLASS METHODS | ||
| 52 | |||
| 53 | This section lists the class methods, which are available in this module. | ||
| 54 | |||
| 55 | =head2 get | ||
| 56 | |||
| 57 | $classifications = BZ::Client::Classification->get( $client, \%params ); | ||
| 58 | |||
| 59 | Returns a hash containing information about a set of classifications. | ||
| 60 | |||
| 61 | =head3 History | ||
| 62 | |||
| 63 | Added in Bugzilla 4.4. | ||
| 64 | |||
| 65 | Marked experiemental as of Bugzilla 5.0. | ||
| 66 | |||
| 67 | =head3 Parameters | ||
| 68 | |||
| 69 | In addition to the parameters below, this method also accepts the standard | ||
| 70 | L<BZ::Client::Bug/include_fields> and L<BZ::Client::Bug/exclude_fields> arguments. | ||
| 71 | |||
| 72 | You could get classifications info by supplying their names and/or ids. So, | ||
| 73 | this method accepts the following parameters: | ||
| 74 | |||
| 75 | =over 4 | ||
| 76 | |||
| 77 | =item ids | ||
| 78 | |||
| 79 | An array of classification ids. | ||
| 80 | |||
| 81 | =item names | ||
| 82 | |||
| 83 | An array of classification names. | ||
| 84 | |||
| 85 | =back | ||
| 86 | |||
| 87 | =head3 Returns | ||
| 88 | |||
| 89 | An array of hashes as the corresponding value. Each element of the array represents | ||
| 90 | a classification that the user is authorized to see and has the following keys: | ||
| 91 | |||
| 92 | =over 4 | ||
| 93 | |||
| 94 | =item id | ||
| 95 | |||
| 96 | I<id> (int) The id of the classification. | ||
| 97 | |||
| 98 | =item name | ||
| 99 | |||
| 100 | I<name> (string) The name of the classification. | ||
| 101 | |||
| 102 | =item description | ||
| 103 | |||
| 104 | I<description> (string) The description of the classificaion. | ||
| 105 | |||
| 106 | =item sort_key | ||
| 107 | |||
| 108 | I<sort_key> (int) The value which determines the order the classification is sorted. | ||
| 109 | |||
| 110 | =item products | ||
| 111 | |||
| 112 | An array of hashes. The array contains the products the user is authorized to | ||
| 113 | access within the classification. Each hash has the following keys: | ||
| 114 | |||
| 115 | =over 4 | ||
| 116 | |||
| 117 | =item name | ||
| 118 | |||
| 119 | I<name> (string) The name of the product. | ||
| 120 | |||
| 121 | =item id | ||
| 122 | |||
| 123 | I<id> (int) The id of the product. | ||
| 124 | |||
| 125 | =item description | ||
| 126 | |||
| 127 | I<description> (string) The description of the product. | ||
| 128 | |||
| 129 | =back | ||
| 130 | |||
| 131 | =back | ||
| 132 | |||
| 133 | =head3 Errors | ||
| 134 | |||
| 135 | =over | ||
| 136 | |||
| 137 | =item 900 - Classification not enabled | ||
| 138 | |||
| 139 | Classification is not enabled on this installation. | ||
| 140 | |||
| 141 | =back | ||
| 142 | |||
| 143 | =head1 EXCEPTION HANDLING | ||
| 144 | |||
| 145 | See L<BZ::Client::Exception> | ||
| 146 | |||
| 147 | =head1 SEE ALSO | ||
| 148 | |||
| 149 | L<BZ::Client>, L<BZ::Client::API>, L<Bugzilla API|https://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/WebService/Classification.html> | ||
| 150 | |||
| 151 | =head1 AUTHORS | ||
| 152 | |||
| 153 | =over 4 | ||
| 154 | |||
| 155 | =item * | ||
| 156 | |||
| 157 | Dean Hamstead <dean@bytefoundry.com.au> | ||
| 158 | |||
| 159 | =item * | ||
| 160 | |||
| 161 | Jochen Wiedmann <jochen.wiedmann@gmail.com> | ||
| 162 | |||
| 163 | =back | ||
| 164 | |||
| 165 | =head1 COPYRIGHT AND LICENSE | ||
| 166 | |||
| 167 | This software is copyright (c) 2017 by Dean Hamstad. | ||
| 168 | |||
| 169 | This is free software; you can redistribute it and/or modify it under | ||
| 170 | the same terms as the Perl 5 programming language system itself. | ||
| 171 | |||
| 172 | =cut |