The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WWW::ORCID::API::v2_0_public - A client for the ORCID 2.0 public API

CREATING A NEW INSTANCE

The new method returns a new 2.0 public API client.

Arguments to new:

client_id

Your ORCID client id (required).

client_secret

Your ORCID client secret (required).

sandbox

The client will talk to the ORCID sandbox API if set to 1.

transport

Specify the HTTP client to use. Possible values are LWP or HTTP::Tiny. Default is LWP.

METHODS

client_id

Returns the ORCID client id used by the client.

client_secret

Returns the ORCID client secret used by the client.

sandbox

Returns 1 if the client is using the sandbox API, 0 otherwise.

transport

Returns what HTTP transport the client is using.

api_url

Returns the base API url used by the client.

oauth_url

Returns the base OAuth url used by the client.

access_token

Request a new access token.

    my $token = $client->access_token(
        grant_type => 'client_credentials',
        scope => '/read-public',
    );

authorize_url

Returns an authorization url for 3-legged OAuth requests.

    # in your web application
    redirect($client->authorize_url(
        show_login => 'true',
        scope => '/person/update',
        response_type => 'code',
        redirect_uri => 'http://your.callback/url',
    ));

See the /authorize and /authorized routes in the included playground application for an example.

read_public_token

Return an access token with scope /read-public.

client

Get details about the current client.

    my $hits = $client->search(q => "johnson");

activities

    my $rec = $client->activities(token => $token);

Equivalent to:

    $client->get('activities', %opts)

address

    my $recs = $client->address(token => $token);
    my $rec = $client->address(token => $token, put_code => '123');

Equivalent to:

    $client->get('address', %opts)

biography

    my $rec = $client->biography(token => $token);

Equivalent to:

    $client->get('biography', %opts)

education

    my $rec = $client->education(token => $token, put_code => '123');

Equivalent to:

    $client->get('education', %opts)

delete_education

    my $ok = $client->delete_education(token => $token, put_code => '123');

Equivalent to:

    $client->delete('education', %opts)

education_summary

    my $rec = $client->education_summary(token => $token, put_code => '123');

Equivalent to:

    $client->get('education/summary', %opts)

educations

    my $rec = $client->educations(token => $token);

Equivalent to:

    $client->get('educations', %opts)

email

    my $rec = $client->email(token => $token);

Equivalent to:

    $client->get('email', %opts)

employment

    my $rec = $client->employment(token => $token, put_code => '123');

Equivalent to:

    $client->get('employment', %opts)

employment_summary

    my $rec = $client->employment_summary(token => $token, put_code => '123');

Equivalent to:

    $client->get('employment/summary', %opts)

employments

    my $rec = $client->employments(token => $token);

Equivalent to:

    $client->get('employments', %opts)

external_identifiers

    my $recs = $client->external_identifiers(token => $token);
    my $rec = $client->external_identifiers(token => $token, put_code => '123');

Equivalent to:

    $client->get('external-identifiers', %opts)

funding

    my $rec = $client->funding(token => $token, put_code => '123');

Equivalent to:

    $client->get('funding', %opts)

funding_summary

    my $rec = $client->funding_summary(token => $token, put_code => '123');

Equivalent to:

    $client->get('funding/summary', %opts)

fundings

    my $rec = $client->fundings(token => $token);

Equivalent to:

    $client->get('fundings', %opts)

keywords

    my $recs = $client->keywords(token => $token);
    my $rec = $client->keywords(token => $token, put_code => '123');

Equivalent to:

    $client->get('keywords', %opts)

other_names

    my $recs = $client->other_names(token => $token);
    my $rec = $client->other_names(token => $token, put_code => '123');

Equivalent to:

    $client->get('other-names', %opts)

peer_review

    my $rec = $client->peer_review(token => $token, put_code => '123');

Equivalent to:

    $client->get('peer-review', %opts)

peer_review_summary

    my $rec = $client->peer_review_summary(token => $token, put_code => '123');

Equivalent to:

    $client->get('peer-review/summary', %opts)

peer_reviews

    my $rec = $client->peer_reviews(token => $token);

Equivalent to:

    $client->get('peer-reviews', %opts)

person

    my $rec = $client->person(token => $token);

Equivalent to:

    $client->get('person', %opts)

personal_details

    my $rec = $client->personal_details(token => $token);

Equivalent to:

    $client->get('personal-details', %opts)

researcher_urls

    my $recs = $client->researcher_urls(token => $token);
    my $rec = $client->researcher_urls(token => $token, put_code => '123');

Equivalent to:

    $client->get('researcher-urls', %opts)

work

    my $rec = $client->work(token => $token, put_code => '123');

Equivalent to:

    $client->get('work', %opts)

work_summary

    my $rec = $client->work_summary(token => $token, put_code => '123');

Equivalent to:

    $client->get('work/summary', %opts)

works

    my $recs = $client->works(token => $token);
    my $recs = $client->works(token => $token, put_code => ['123', '456']);

Equivalent to:

    $client->get('works', %opts)

last_error

Returns the last error returned by the ORCID API, if any.

log

Returns the Log::Any logger.