5 use CXGN
::BrAPI
::v1
::Authentication
;
6 use CXGN
::BrAPI
::v1
::Calls
;
9 isa
=> 'Bio::Chado::Schema',
14 has
'metadata_schema' => (
15 isa
=> 'CXGN::Metadata::Schema',
20 has
'phenome_schema' => (
21 isa
=> 'CXGN::Phenome::Schema',
45 isa
=> 'ArrayRef[Maybe[HashRef]]',
52 my $status = $self->status;
53 my $brapi_package = 'CXGN::BrAPI::'.$self->version().'::Authentication';
54 push @
$status, { 'info' => "Loading $brapi_package" };
55 my $brapi_auth = $brapi_package->new({
56 bcs_schema
=> $self->bcs_schema,
59 my $brapi_package_result = $brapi_auth->logout();
60 return $brapi_package_result;
65 my $grant_type = shift;
68 my $client_id = shift;
69 my $status = $self->status;
71 my $brapi_package = 'CXGN::BrAPI::'.$self->version().'::Authentication';
72 push @
$status, { 'info' => "Loading $brapi_package" };
73 my $brapi_auth = $brapi_package->new({
74 bcs_schema
=> $self->bcs_schema,
77 my $brapi_package_result = $brapi_auth->login($grant_type, $password, $username, $client_id);
78 return $brapi_package_result;
84 my $status = $self->status;
86 my $brapi_package = 'CXGN::BrAPI::'.$self->version().'::Calls';
87 push @
$status, { 'info' => "Loading $brapi_package" };
88 my $brapi_calls = $brapi_package->new({
89 status
=> $self->status
91 my $brapi_package_result = $brapi_calls->calls($datatype, $self->page_size, $self->page);
92 return $brapi_package_result;