DOKK / manpages / debian 12 / libwww-orcid-perl / WWW::ORCID::API::v2_0_public.3pm.en
WWW::ORCID::API::v2_0_public(3pm) User Contributed Perl Documentation WWW::ORCID::API::v2_0_public(3pm)

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

The "new" method returns a new 2.0 public API client.

Arguments to new:

Your ORCID client id (required).

Your ORCID client secret (required).

The client will talk to the ORCID sandbox API <https://api.sandbox.orcid.org/v2.0> if set to 1.

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

Returns the ORCID client id used by the client.

Returns the ORCID client secret used by the client.

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

Returns what HTTP transport the client is using.

Returns the base API url used by the client.

Returns the base OAuth url used by the client.

Request a new access token.

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

Helper that 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.

Helper that returns an orcid record url.

    $client->record_url('0000-0003-4791-9455')
    # returns
    # http://orcid.org/0000-0003-4791-9455
    # or
    # http://sandbox.orcid.org/0000-0003-4791-9455

Return an access token with scope "/read-public".

Get details about the current client.

    my $hits = $client->search(q => "johnson");
=head2 C<activities>
    my $rec = $client->activities(token => $token, orcid => $orcid);

Equivalent to:

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

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

Equivalent to:

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

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

Equivalent to:

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

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

Equivalent to:

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

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

Equivalent to:

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

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

Equivalent to:

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

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

Equivalent to:

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

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

Equivalent to:

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

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

Equivalent to:

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

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

Equivalent to:

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

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

Equivalent to:

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

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

Equivalent to:

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

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

Equivalent to:

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

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

Equivalent to:

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

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

Equivalent to:

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

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

Equivalent to:

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

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

Equivalent to:

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

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

Equivalent to:

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

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

Equivalent to:

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

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

Equivalent to:

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

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

Equivalent to:

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

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

Equivalent to:

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

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

Equivalent to:

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

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

Equivalent to:

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

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

Equivalent to:

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

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

Equivalent to:

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

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

Returns the Log::Any logger.

2023-02-05 perl v5.36.0