WWW::O...public(3pm)
π NAME π
WWW::ORCID::API::v2_0_public β bestie, it's a client for the ORCID 2.0 public API. That's the whole vibe. β¨
(also it lives in the WWW::O...public(3pm) slot in your manual pages, courtesy of User Contributed Perl Documentation β iykyk π«Ά)
πΈ CREATING A NEW INSTANCE πΈ
The new method hands you a shiny new 2.0 public API client. Slay.
Arguments to new:
client_idβ your ORCID client id. Required. No id, no entry, periodt.client_secretβ your ORCID client secret. Also required. Guard it with your life πsandboxβ set it to1and the client will talk to the ORCID sandbox API at <https://api.sandbox.orcid.org/v2.0>. Playground mode, bestie π§transportβ pick your HTTP client. Possible values areLWPorHTTP::Tiny. Default isLWP. π¦
β¨ METHODS β¨
π client_id
Returns the ORCID client id that the client is using.
π client_secret
Returns the ORCID client secret that the client is using.
π sandbox
Returns 1 if the client is on the sandbox API, 0 otherwise.
π transport
Returns what HTTP transport the client is using.
π api_url
Returns the base API url the client is using.
π oauth_url
Returns the base OAuth url the client is using.
π access_token
Request a brand new access token. Gotta get that token, no cap π₯
my $token = $client->access_token(
grant_type => 'client_credentials',
scope => '/read-public',
);
π authorize_url
A helper that returns an authorization url for 3-legged OAuth requests. Very main character energy π
# 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. π
π record_url
A 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
π read_public_token
Returns an access token with scope "/read-public".
π client
Get the deets about the current client. π
π search
my $hits = $client->search(q => "johnson");
π activities
Heads up: in the original source this one shows up as a raw POD line β =head2 C<activities> β so don't be confused if the formatting looks a little feral. π The content is exactly this:
my $rec = $client->activities(token => $token, orcid => $orcid);
Equivalent to:
$client->get('activities', %opts)
π address
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)
π biography
my $rec = $client->biography(token => $token, orcid => $orcid);
Equivalent to:
$client->get('biography', %opts)
π education
my $rec = $client->education(token => $token, orcid => $orcid, put_code => '123');
Equivalent to:
$client->get('education', %opts)
π delete_education
my $ok = $client->delete_education(token => $token, orcid => $orcid, put_code => '123');
Equivalent to:
$client->delete('education', %opts)
π education_summary
my $rec = $client->education_summary(token => $token, orcid => $orcid, put_code => '123');
Equivalent to:
$client->get('education/summary', %opts)
π educations
my $rec = $client->educations(token => $token, orcid => $orcid);
Equivalent to:
$client->get('educations', %opts)
π email
my $rec = $client->email(token => $token, orcid => $orcid);
Equivalent to:
$client->get('email', %opts)
π employment
my $rec = $client->employment(token => $token, orcid => $orcid, put_code => '123');
Equivalent to:
$client->get('employment', %opts)
π employment_summary
my $rec = $client->employment_summary(token => $token, orcid => $orcid, put_code => '123');
Equivalent to:
$client->get('employment/summary', %opts)
π employments
my $rec = $client->employments(token => $token, orcid => $orcid);
Equivalent to:
$client->get('employments', %opts)
π external_identifiers
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)
π funding
my $rec = $client->funding(token => $token, orcid => $orcid, put_code => '123');
Equivalent to:
$client->get('funding', %opts)
π funding_summary
my $rec = $client->funding_summary(token => $token, orcid => $orcid, put_code => '123');
Equivalent to:
$client->get('funding/summary', %opts)
π fundings
my $rec = $client->fundings(token => $token, orcid => $orcid);
Equivalent to:
$client->get('fundings', %opts)
π keywords
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)
π other_names
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)
π peer_review
my $rec = $client->peer_review(token => $token, orcid => $orcid, put_code => '123');
Equivalent to:
$client->get('peer-review', %opts)
π peer_review_summary
my $rec = $client->peer_review_summary(token => $token, orcid => $orcid, put_code => '123');
Equivalent to:
$client->get('peer-review/summary', %opts)
π peer_reviews
my $rec = $client->peer_reviews(token => $token, orcid => $orcid);
Equivalent to:
$client->get('peer-reviews', %opts)
π person
my $rec = $client->person(token => $token, orcid => $orcid);
Equivalent to:
$client->get('person', %opts)
π personal_details
my $rec = $client->personal_details(token => $token, orcid => $orcid);
Equivalent to:
$client->get('personal-details', %opts)
π researcher_urls
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)
π work
my $rec = $client->work(token => $token, orcid => $orcid, put_code => '123');
Equivalent to:
$client->get('work', %opts)
π work_summary
my $rec = $client->work_summary(token => $token, orcid => $orcid, put_code => '123');
Equivalent to:
$client->get('work/summary', %opts)
π works
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)
π last_error
Returns the last error the ORCID API threw at you, if there was one. π (hopefully there wasn't, bestie)
π log
Returns the Log::Any logger. π
okay that's literally the whole thing, you ate that fr fr π β¨
This lil doc was brought to you by perl v5.36.0, dated 2023-02-05, living in the WWW::O...public(3pm) spot. Go forth and query, queen ππ
π¦ where this page comes from
- debian bookworm: libwww-orcid-perl 0.0402-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libwww-orcid-perl 0.0402-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libwww-orcid-perl 0.0402-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libwww-orcid-perl 0.0402-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libwww-orcid-perl 0.0402-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms