Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1 API does not return the 'authorized' field, even when explictly requested #49

Closed
pghmcfc opened this issue Oct 20, 2016 · 2 comments
Closed

Comments

@pghmcfc
Copy link

pghmcfc commented Oct 20, 2016

Sample query using API v0:

$ perl -MData::Dump -MMetaCPAN::Client -e 'my $mcpan = MetaCPAN::Client->new( version => "v0" ); my $results = $mcpan->release( { all => [ { distribution => "MetaCPAN-Client" }, { version => "1.026001" }, ] }, { fields => "authorized,date,name,version" } ); dd($results->next->{'data'});'
{
  authorized => "true",
  date => "2016-10-19T21:45:01.000Z",
  name => "MetaCPAN-Client-1.026001",
  version => 1.026001,
}

Using v1 API:

$ perl -MData::Dump -MMetaCPAN::Client -e 'my $mcpan = MetaCPAN::Client->new( version => "v1" ); my $results = $mcpan->release( { all => [ { distribution => "MetaCPAN-Client" }, { version => "1.026001" }, ] }, { fields => "authorized,date,name,version" } ); dd($results->next->{'data'});'
{
  date    => "2016-10-19T21:45:01",
  name    => "MetaCPAN-Client-1.026001",
  version => 1.026001,
}

I expect this issue is somewhere upstream of MetaCPAN-Client but I don't know where.

@mickeyn
Copy link
Contributor

mickeyn commented Oct 20, 2016

I see why this happens, we skip it cause we expect a scalar value and its a JSON::PP::Boolean object.
I'll patch it to work. will probably release a fix by tomorrow.

@mickeyn
Copy link
Contributor

mickeyn commented Oct 20, 2016

release 1.027000 is out fixing this issue

@mickeyn mickeyn closed this as completed Oct 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants