| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package WebService::PutIo::Files; | 
| 2 |  |  |  |  |  |  |  | 
| 3 | 1 |  |  | 1 |  | 56409 | use base 'WebService::PutIo'; | 
|  | 1 |  |  |  |  | 4 |  | 
|  | 1 |  |  |  |  | 617 |  | 
| 4 |  |  |  |  |  |  |  | 
| 5 |  |  |  |  |  |  | my $class='files'; | 
| 6 |  |  |  |  |  |  |  | 
| 7 | 0 |  |  | 0 | 1 |  | sub list { shift->request($class,'list',@_); } | 
| 8 | 0 |  |  | 0 | 1 |  | sub create_dir { shift->request($class,'create_dir',@_); } | 
| 9 | 0 |  |  | 0 | 1 |  | sub info { shift->request($class,'info',@_); } | 
| 10 | 0 |  |  | 0 | 1 |  | sub rename { shift->request($class,'rename',@_); } | 
| 11 | 0 |  |  | 0 | 1 |  | sub move { shift->request($class,'move',@_); } | 
| 12 | 0 |  |  | 0 | 1 |  | sub delete { shift->request($class,'delete',@_); } | 
| 13 | 0 |  |  | 0 | 1 |  | sub search { shift->request($class,'search',@_); } | 
| 14 | 0 |  |  | 0 | 1 |  | sub dirmap { shift->request($class,'dirmap',@_); } | 
| 15 |  |  |  |  |  |  |  | 
| 16 |  |  |  |  |  |  | =head1 NAME | 
| 17 |  |  |  |  |  |  |  | 
| 18 |  |  |  |  |  |  | WebService::PutIo::Files - File Operations for put.io | 
| 19 |  |  |  |  |  |  |  | 
| 20 |  |  |  |  |  |  | =head1 SYNOPSIS | 
| 21 |  |  |  |  |  |  |  | 
| 22 |  |  |  |  |  |  | use WebService::PutIo::Files; | 
| 23 |  |  |  |  |  |  | my $files=WebService::PutIo::Files->new(api_key=>'..',api_secret=>'..'); | 
| 24 |  |  |  |  |  |  | my $res=$files->list; | 
| 25 |  |  |  |  |  |  | foreach my $file (@{$res->results}) { | 
| 26 |  |  |  |  |  |  | print "Got ". Data::Dumper($file); | 
| 27 |  |  |  |  |  |  | } | 
| 28 |  |  |  |  |  |  |  | 
| 29 |  |  |  |  |  |  | =head1 DESCRIPTION | 
| 30 |  |  |  |  |  |  |  | 
| 31 |  |  |  |  |  |  | File related methods for the put.io web service | 
| 32 |  |  |  |  |  |  |  | 
| 33 |  |  |  |  |  |  | =head1 METHODS | 
| 34 |  |  |  |  |  |  |  | 
| 35 |  |  |  |  |  |  | =head2 list | 
| 36 |  |  |  |  |  |  |  | 
| 37 |  |  |  |  |  |  | Returns the list of items in a folder. | 
| 38 |  |  |  |  |  |  |  | 
| 39 |  |  |  |  |  |  | =over 4 | 
| 40 |  |  |  |  |  |  |  | 
| 41 |  |  |  |  |  |  | =item id = STRING or INTEGER | 
| 42 |  |  |  |  |  |  |  | 
| 43 |  |  |  |  |  |  | =item parent_id = STRING or INTEGER | 
| 44 |  |  |  |  |  |  |  | 
| 45 |  |  |  |  |  |  |  | 
| 46 |  |  |  |  |  |  | =item offset = INTEGER (Default:0) | 
| 47 |  |  |  |  |  |  |  | 
| 48 |  |  |  |  |  |  | =item limit = INTEGER (Default: 20) | 
| 49 |  |  |  |  |  |  |  | 
| 50 |  |  |  |  |  |  | =item type = STRING (See Item class for available types) | 
| 51 |  |  |  |  |  |  |  | 
| 52 |  |  |  |  |  |  | =item orderby = STRING (Default: createdat_desc) | 
| 53 |  |  |  |  |  |  |  | 
| 54 |  |  |  |  |  |  | =back | 
| 55 |  |  |  |  |  |  |  | 
| 56 |  |  |  |  |  |  | =head3 Orderby parameters: | 
| 57 |  |  |  |  |  |  |  | 
| 58 |  |  |  |  |  |  | =over 4 | 
| 59 |  |  |  |  |  |  |  | 
| 60 |  |  |  |  |  |  | =item id_asc | 
| 61 |  |  |  |  |  |  |  | 
| 62 |  |  |  |  |  |  | =item id_desc | 
| 63 |  |  |  |  |  |  |  | 
| 64 |  |  |  |  |  |  | =item type_asc | 
| 65 |  |  |  |  |  |  |  | 
| 66 |  |  |  |  |  |  | =item type_desc | 
| 67 |  |  |  |  |  |  |  | 
| 68 |  |  |  |  |  |  | =item name_asc | 
| 69 |  |  |  |  |  |  |  | 
| 70 |  |  |  |  |  |  | =item name_desc | 
| 71 |  |  |  |  |  |  |  | 
| 72 |  |  |  |  |  |  | =item extension_asc | 
| 73 |  |  |  |  |  |  |  | 
| 74 |  |  |  |  |  |  | =item extension_desc | 
| 75 |  |  |  |  |  |  |  | 
| 76 |  |  |  |  |  |  | =item createdat_asc | 
| 77 |  |  |  |  |  |  |  | 
| 78 |  |  |  |  |  |  | item= createdat_desc (Default) | 
| 79 |  |  |  |  |  |  |  | 
| 80 |  |  |  |  |  |  | =back | 
| 81 |  |  |  |  |  |  |  | 
| 82 |  |  |  |  |  |  | =head2 create_dir | 
| 83 |  |  |  |  |  |  |  | 
| 84 |  |  |  |  |  |  | Creates and returns a new folder. | 
| 85 |  |  |  |  |  |  |  | 
| 86 |  |  |  |  |  |  | =head3 Parameters: | 
| 87 |  |  |  |  |  |  |  | 
| 88 |  |  |  |  |  |  | =over 4 | 
| 89 |  |  |  |  |  |  |  | 
| 90 |  |  |  |  |  |  | =item name | 
| 91 |  |  |  |  |  |  |  | 
| 92 |  |  |  |  |  |  | =item parent_id | 
| 93 |  |  |  |  |  |  |  | 
| 94 |  |  |  |  |  |  | =back | 
| 95 |  |  |  |  |  |  |  | 
| 96 |  |  |  |  |  |  | =head2 info | 
| 97 |  |  |  |  |  |  |  | 
| 98 |  |  |  |  |  |  | Returns detailed information about an item. | 
| 99 |  |  |  |  |  |  |  | 
| 100 |  |  |  |  |  |  | =head3 Parameters: | 
| 101 |  |  |  |  |  |  |  | 
| 102 |  |  |  |  |  |  | =over 4 | 
| 103 |  |  |  |  |  |  |  | 
| 104 |  |  |  |  |  |  | =item id | 
| 105 |  |  |  |  |  |  |  | 
| 106 |  |  |  |  |  |  | =back | 
| 107 |  |  |  |  |  |  |  | 
| 108 |  |  |  |  |  |  | =head2 rename | 
| 109 |  |  |  |  |  |  |  | 
| 110 |  |  |  |  |  |  | Renames and returns an item | 
| 111 |  |  |  |  |  |  |  | 
| 112 |  |  |  |  |  |  | =head3 Parameters: | 
| 113 |  |  |  |  |  |  |  | 
| 114 |  |  |  |  |  |  | =over 4 | 
| 115 |  |  |  |  |  |  |  | 
| 116 |  |  |  |  |  |  | =item id | 
| 117 |  |  |  |  |  |  |  | 
| 118 |  |  |  |  |  |  | =item name | 
| 119 |  |  |  |  |  |  |  | 
| 120 |  |  |  |  |  |  | =back | 
| 121 |  |  |  |  |  |  |  | 
| 122 |  |  |  |  |  |  | =head2 move | 
| 123 |  |  |  |  |  |  |  | 
| 124 |  |  |  |  |  |  | Moves an item from a folder to another, and returns it. | 
| 125 |  |  |  |  |  |  |  | 
| 126 |  |  |  |  |  |  | =head3 Parameters: | 
| 127 |  |  |  |  |  |  |  | 
| 128 |  |  |  |  |  |  | =over 4 | 
| 129 |  |  |  |  |  |  |  | 
| 130 |  |  |  |  |  |  | =item id | 
| 131 |  |  |  |  |  |  |  | 
| 132 |  |  |  |  |  |  | =item parent_id | 
| 133 |  |  |  |  |  |  |  | 
| 134 |  |  |  |  |  |  | =back | 
| 135 |  |  |  |  |  |  |  | 
| 136 |  |  |  |  |  |  | =head2 delete | 
| 137 |  |  |  |  |  |  |  | 
| 138 |  |  |  |  |  |  | Deletes an item | 
| 139 |  |  |  |  |  |  |  | 
| 140 |  |  |  |  |  |  | =head3 Parameters: | 
| 141 |  |  |  |  |  |  |  | 
| 142 |  |  |  |  |  |  | =over 4 | 
| 143 |  |  |  |  |  |  |  | 
| 144 |  |  |  |  |  |  | =item id | 
| 145 |  |  |  |  |  |  |  | 
| 146 |  |  |  |  |  |  | =back | 
| 147 |  |  |  |  |  |  |  | 
| 148 |  |  |  |  |  |  | =head2 search | 
| 149 |  |  |  |  |  |  |  | 
| 150 |  |  |  |  |  |  | Returns list of found items | 
| 151 |  |  |  |  |  |  |  | 
| 152 |  |  |  |  |  |  | =head3 Parameters: | 
| 153 |  |  |  |  |  |  |  | 
| 154 |  |  |  |  |  |  | =over 4 | 
| 155 |  |  |  |  |  |  |  | 
| 156 |  |  |  |  |  |  | =item query | 
| 157 |  |  |  |  |  |  |  | 
| 158 |  |  |  |  |  |  | =back | 
| 159 |  |  |  |  |  |  |  | 
| 160 |  |  |  |  |  |  | =head2 dirmap | 
| 161 |  |  |  |  |  |  |  | 
| 162 |  |  |  |  |  |  | Returns a flat list of directory list. Parent_id is the id of a folder the item is in. | 
| 163 |  |  |  |  |  |  |  | 
| 164 |  |  |  |  |  |  | =head1 COPYRIGHT AND LICENSE | 
| 165 |  |  |  |  |  |  |  | 
| 166 |  |  |  |  |  |  | Copyright (C) 2010, Marcus Ramberg. | 
| 167 |  |  |  |  |  |  |  | 
| 168 |  |  |  |  |  |  | This program is free software, you can redistribute it and/or modify it under | 
| 169 |  |  |  |  |  |  | the terms of the Artistic License version 2.0. | 
| 170 |  |  |  |  |  |  |  | 
| 171 |  |  |  |  |  |  | =cut | 
| 172 |  |  |  |  |  |  |  | 
| 173 |  |  |  |  |  |  | 1; |