File Coverage

blib/lib/OpenAI/API/Request/File/List.pm
Criterion Covered Total %
statement 18 20 90.0
branch n/a
condition n/a
subroutine 6 8 75.0
pod 2 2 100.0
total 26 30 86.6


line stmt bran cond sub pod time code
1             package OpenAI::API::Request::File::List;
2              
3 16     16   150 use strict;
  16         83  
  16         503  
4 16     16   133 use warnings;
  16         41  
  16         408  
5              
6 16     16   139 use Moo;
  16         37  
  16         110  
7 16     16   6092 use strictures 2;
  16         142  
  16         702  
8 16     16   3127 use namespace::clean;
  16         49  
  16         177  
9              
10             extends 'OpenAI::API::Request';
11              
12 16     16   4787 use Types::Standard qw();
  16         42  
  16         1059  
13              
14 0     0 1   sub endpoint { 'files' }
15 0     0 1   sub method { 'GET' }
16              
17             1;
18              
19             __END__
20              
21             =head1 NAME
22              
23             OpenAI::API::Request::File::List - files endpoint
24              
25             =head1 SYNOPSIS
26              
27             use OpenAI::API::Request::File::List;
28              
29             my $request = OpenAI::API::Request::File::List->new();
30              
31             my $res = $request->send();
32              
33             my @files = @{ $res->{data} };
34              
35             =head1 DESCRIPTION
36              
37             Returns a list of files that belong to the user's organization.
38              
39             =head1 METHODS
40              
41             =head2 new()
42              
43             =head2 send()
44              
45             Sends the request and returns a data structured similar to the one
46             documented in the API reference.
47              
48             =head1 SEE ALSO
49              
50             OpenAI API Reference: L<Files|https://platform.openai.com/docs/api-reference/files>