view release on metacpan or search on metacpan
lib/CatalystX/Action/ExtJS/REST.pm view on Meta::CPAN
#
# The (three-clause) BSD License
#
package CatalystX::Action::ExtJS::REST;
$CatalystX::Action::ExtJS::REST::VERSION = '2.1.3';
# ABSTRACT: Mark an action as REST endpoint
use Moose;
extends 'Catalyst::Action';
1;
lib/CatalystX/Action/ExtJS/REST.pm view on Meta::CPAN
=encoding UTF-8
=head1 NAME
CatalystX::Action::ExtJS::REST - Mark an action as REST endpoint
=head1 VERSION
version 2.1.3
=head1 DESCRIPTION
The purpose of this action class is to mark an action as REST endpoint.
Actions with this action will become a L<CatalystX::Controller::ExtJS::Direct::Route::REST> route.
=head1 AUTHOR
Moritz Onken <onken@netcubed.de>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/CatalystX/OAuth2/Provider/Controller/OAuth.pm view on Meta::CPAN
my ( $self, $ctx, $grant_type ) = @_;
}
=head2 authorize
Authorize endpoint
=cut
sub authorize
:Chained('logged_in_required')
:PathPart('authorize') #Configurable?
:Args(0)
{
my ( $self, $ctx ) = @_;
if ( $ctx->req->method eq 'GET' ) {
$ctx->stash( authorize_endpoint => $ctx->uri_for_action($ctx->action) );
$ctx->stash( template => $self->{authorize_form}->{template}
|| 'oauth/authorize.tt' );
}
if ( $ctx->req->method eq 'POST' ) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/ActionRole/OAuth2/AuthToken/ViaAuthGrant.pm view on Meta::CPAN
package Catalyst::ActionRole::OAuth2::AuthToken::ViaAuthGrant;
use Moose::Role;
use Try::Tiny;
use CatalystX::OAuth2::Request::AuthToken;
# ABSTRACT: Authorization token provider endpoint for OAuth2 authentication flows
with 'CatalystX::OAuth2::ActionRole::Token';
sub build_oauth2_request {
lib/Catalyst/ActionRole/OAuth2/AuthToken/ViaAuthGrant.pm view on Meta::CPAN
=pod
=head1 NAME
Catalyst::ActionRole::OAuth2::AuthToken::ViaAuthGrant - Authorization token provider endpoint for OAuth2 authentication flows
=head1 VERSION
version 0.001009
lib/Catalyst/ActionRole/OAuth2/AuthToken/ViaAuthGrant.pm view on Meta::CPAN
1;
=head1 DESCRIPTION
This action role implements an endpoint that exchanges an authorization code
for an access token.
=head1 AUTHOR
Eden Cardim <edencardim@gmail.com>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catalyst/ActionRole/RequestModel.pm view on Meta::CPAN
}
The main reason for moving this into the action attributes line is the thought that it allows us
to declare the request model as meta data on the action and in the future we will be able to
introspect that meta data at application setup time to do things like generate an Open API specification.
Also, if you have several request models for the endpoint you can declare all of them on the
attributes line and we will match the incoming request to the best request model, or throw an exception
if none match. So if you have more than one this saves you writing that boilerplate code to chose and
to handled the no match conditions.
You might also just find the code neater and more clean reading. Downside is for people unfamiliar with
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catmandu/AAT.pm view on Meta::CPAN
Catmandu::AAT - Retrieve items from the AAT
=head1 SYNOPSIS
This module contains a L<store|Catmandu::Store::AAT> to lookup a I<Subject> in the L<AAT|https://www.getty.edu/research/tools/vocabularies/aat/>
using its L<SPARQL endpoint|http://vocab.getty.edu/sparql>.
Also included is a L<fix|Catmandu::Fix::aat_match> to match a term to a I<Subject> and a
L<fix|Catmandu::Fix::aat_search> to search for a term in the AAT.
lookup_in_store(objectName, AAT, lang:nl)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catmandu/Adlib.pm view on Meta::CPAN
Catmandu::Adlib - Catmandu interface to L<Adlib|http://www.adlibsoft.nl/>
=head1 SYNOPSIS
# From the command line
catmandu export Adlib to YAML --id 1234 --endpoint http://test2.adlibsoft.com --username foo --password bar --database collect.inf
# From a Catmandu Fix
lookup_in_store(
object_priref,
Adlib,
endpoint: http://test2.adlibsoft.com,
username: foo,
password: bar,
database: collect.inf
)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catmandu/Importer/ArXiv.pm view on Meta::CPAN
=over
=item base_api
The API endpoint. Default is https://export.arxiv.org/api/query
=item base_frontend
The arXiv base url. Default is https://arxiv.org
view all matches for this distribution
view release on metacpan or search on metacpan
requires 'REST::Client', '0';
requires 'Moo', '0';
requires 'URI::Escape', '0';
requires 'JSON::MaybeXS', '>=1.003005';
# Need recent SSL to talk to https endpoint correctly
requires 'IO::Socket::SSL', '>=1.993';
view all matches for this distribution
view release on metacpan or search on metacpan
requires 'HTTP::Request::Common', '6.04';
requires 'RDF::Trine', '1.014';
requires 'Test::JSON', '0.11';
requires 'XML::LibXML', '2.0121';
# Need recent SSL to talk to https endpoint correctly
requires 'IO::Socket::SSL', '2.015';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catmandu/Importer/OpenAIRE.pm view on Meta::CPAN
# From the command line
# Harvest some data
catmandu convert OpenAIRE to YAML
# Harvest some data from a different endpoint
catmandu convert OpenAIRE --url http://api.openaire.eu/search/datasets to YAML
=head1 DESCRIPTION
See L<https://graph.openaire.eu/develop/api.html> for the OpenAIRE query parameters
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catmandu/Exporter/MediaHaven.pm view on Meta::CPAN
=over
=item url
Required. The URL to the MediaHaven REST endpoint.
=item username
Required. Username used to connect to MediaHaven.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catmandu/Importer/OAI.pm view on Meta::CPAN
$ catmandu convert OAI --url http://myrepo.org/oai --getRecord 1 --identifier oai:myrepo:1234
=head1 DESCRIPTION
L<Catmandu::Importer::OAI> is an L<Catmandu> importer to harvest metadata records
from an OAI-PMH endpoint.
=head1 CONFIGURATION
=over
lib/Catmandu/Importer/OAI.pm view on Meta::CPAN
..
=item sleep
Sleep a number of seconds between OAI-PMH calls to the endpoint (default 0).
=item realm
An optional realm value. This value is used when the importer harvests from a
repository which is secured with basic authentication through Integrated Windows
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catmandu/OCLC/xID.pm view on Meta::CPAN
my $method = shift;
die "usage: query(query,type,method)" unless defined $query &&
defined $type &&
defined $method;
my $endpoint;
if ($type eq 'xisbn') {
$endpoint = 'http://xisbn.worldcat.org/webservices/xid/isbn';
}
elsif ($type eq 'xissn') {
$endpoint = 'http://xisbn.worldcat.org/webservices/xid/issn';
}
elsif ($type eq 'xstandardNumber') {
$endpoint = 'http://xisbn.worldcat.org/webservices/xid/oclcnum';
}
else {
$endpoint = 'http://xisbn.worldcat.org/webservices/xid/isbn';
}
my $request = sprintf "%s/%s?method=%s&format=json&fl=*"
, $endpoint
, uri_escape($query)
, $method;
my $response = get($request);
my $json = JSON::MaybeXS->new->utf8(0);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catmandu/Importer/Pure.pm view on Meta::CPAN
our $VERSION = '0.05';
with 'Catmandu::Importer';
has base => ( is => 'ro' );
has endpoint => ( is => 'ro' );
has path => ( is => 'ro' );
has apiKey => ( is => 'ro' );
has user => ( is => 'ro' );
has password => ( is => 'ro' );
has post_xml => ( is => 'ro' );
lib/Catmandu/Importer/Pure.pm view on Meta::CPAN
sub BUILD {
my $self = shift;
Catmandu::BadVal->throw("Base URL, endpoint and apiKey are required")
unless $self->base && $self->endpoint && $self->apiKey;
Catmandu::BadVal->throw( "Password is needed for user " . $self->user )
if $self->user && !$self->password;
Catmandu::BadVal->throw("Invalid filter, filter should be a CODE ref")
lib/Catmandu/Importer/Pure.pm view on Meta::CPAN
}
sub _url {
my ( $self, $options ) = @_;
my $url = $self->base . '/' . $self->endpoint
. ($self->path ? '/' . $self->path : '');
if ($options && %$options) {
$url .= '?' . join '&',
map { "$_=" . uri_escape( $options->{$_}, "^A-Za-z0-9\-\._~," ) }
lib/Catmandu/Importer/Pure.pm view on Meta::CPAN
my @result_nodes;
if ( $xc->exists('/result/items') ) {
@result_nodes = $xc->findnodes('/result/items/*');
} elsif ($self->endpoint eq 'changes') {
@result_nodes = $xc->findnodes('/result/contentChange');
} else {
@result_nodes = $xc->findnodes('/result/*[@uuid]');
};
lib/Catmandu/Importer/Pure.pm view on Meta::CPAN
=head1 SYNOPSIS
# From the command line
$ catmandu convert Pure \
--base https://host/ws/api/... \
--endpoint research-outputs \
--apiKey "..."
# In Perl
use Catmandu;
my %attrs = (
base => 'https://host/path',
endpoint => 'research-outputs',
apiKey => '...',
options => { 'fields' => 'title,type,authors.*' }
);
my $importer = Catmandu->importer('Pure', %attrs);
lib/Catmandu/Importer/Pure.pm view on Meta::CPAN
# get number of validated and approved publications
my $count = Catmandu->importer(
'Pure',
base => 'https://host/path',
endpoint => 'research-outputs',
apiKey => '...',
fullResponse => 1,
post_xml => '<?xml version="1.0" encoding="utf-8"?>'
. '<researchOutputsQuery>'
. '<size>0</size>'
lib/Catmandu/Importer/Pure.pm view on Meta::CPAN
)->first->{count};
=head1 DESCRIPTION
Catmandu::Importer::Pure is a Catmandu package that seamlessly imports data from Elsevier's Pure system using its REST service.
In order to use the Pure Web Service you need an API key. List of all available endpoints and further documentation can currently
be found under /ws on a webserver that is running Pure. Note that this version of the importer is tested with Pure API version
5.18 and might not work with later versions.
=head1 CONFIGURATION
lib/Catmandu/Importer/Pure.pm view on Meta::CPAN
=item base
Base URL for the REST service is required, for example 'http://purehost.com/ws/api/518'
=item endpoint
Valid endpoint is required, like 'research-outputs'
=item apiKey
Valid API key is required for access
=item path
Path after the endpoint
=item user
User name if basic authentication is used
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catmandu/Fix/rdf_ldf_statements.pm view on Meta::CPAN
$perl;
}
=head1 NAME
Catmandu::Fix::rdf_ldf_statements - lookup an object into a LDF endpoint
=head1 SYNOPSIS
# Replace a name with an array of matching VIAF records
# name: "\"Einstein, Albert, 1879-1955\""
lib/Catmandu/Fix/rdf_ldf_statements.pm view on Meta::CPAN
# name:
# - http://viaf.org/viaf/75121530
=head1 DESCRIPTION
This L<Catmandu::Fix> can be used to find at a Linked Data Fragments endpoint
all subject URIs for which the object has a specific value found at a path. E.g.
rdf_ldf_statements(name,url:"http://data.linkedatafragments.org/viaf")
means, search at the endpoint http://data.linkedatafragments.org/viaf all the
subjects for which the object is the value found in 'name', and replace the name value
with all the found subjects.
=head1 ARGUMENTS
lib/Catmandu/Fix/rdf_ldf_statements.pm view on Meta::CPAN
Optional predicate URI to be used in the LDF query
=item url
Required URL to the Linked Data Fragments endpoint
=back
=head1 SEE ALSO
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catmandu/Importer/Solr.pm view on Meta::CPAN
)->total();
}
=head1 NAME
Catmandu::Importer::Solr - Catmandu module to import data from a Solr endpoint
=head1 SYNOPSIS
# From the command line
$ catmandu convert Solr --url "http://localhost:8983/solr" --query "type:book"
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catmandu/Fix/aat_match.pm view on Meta::CPAN
-lang: nl
)
=head1 DESCRIPTION
Perform a direct match between a term and the L<SPARQL endpoint|http://vocab.getty.edu/sparql> of the AAT.
This fix will attempt to find a I<Subject> for which the I<prefLabel> in I<lang> (optional, default C<nl>)
equals the term. Will return a single item if one is found, or an empty hash if none was found.
Returns the following data:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Catmandu/Store/REST.pm view on Meta::CPAN
=encoding utf-8
=head1 NAME
Catmandu::Store::REST - Store/retrieve items from a JSON REST-API endpoint
=head1 SYNOPSIS
# From the command line
$ catmandu export REST --id 1234 --base_url https://www.example.org/api/v1/books --query_string /page/1 to YAML
lib/Catmandu/Store/REST.pm view on Meta::CPAN
=over
=item C<base_url>
base url of the API endpoint (the entire url before the ID) (e.g. I<https://www.example.org/api/v1/books>).
=item C<query_string>
an optional query string that comes behind the ID (e.g. I</page/1> where the complete URL is
I<https://www.example.org/api/v1/books/1/page/1>).
view all matches for this distribution
view release on metacpan or search on metacpan
};
requires 'Catmandu', '>=0.9,!=0.9402,!=0.9401';
requires 'WWW::Zotero', '>=0.03';
# Need recent SSL to talk to https endpoint correctly
requires 'IO::Socket::SSL', '>=1.993';
view all matches for this distribution
view release on metacpan or search on metacpan
t/001_parse/ec2_volume.res
t/001_parse/ec2_volume2.res
t/001_parse/ec2_volumeattachment.res
t/001_parse/ec2_vpc.res
t/001_parse/ec2_vpc_dhcp_options.res
t/001_parse/ec2_vpc_endpoint.res
t/001_parse/ec2_vpc_gw_attach.res
t/001_parse/ec2_vpc_gw_vpn.res
t/001_parse/ec2_vpccidrblock.res
t/001_parse/ec2_vpn_conn.res
t/001_parse/ec2_vpn_gw.res
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Chart/Plotly/Trace/Scatter.pm view on Meta::CPAN
has fill => (
is => "rw",
isa => enum( [ "none", "tozeroy", "tozerox", "tonexty", "tonextx", "toself", "tonext" ] ),
documentation =>
"Sets the area to fill with a solid color. Defaults to *none* unless this trace is stacked, then it gets *tonexty* (*tonextx*) if `orientation` is *v* (*h*) Use with `fillcolor` if not *none*. *tozerox* and *tozeroy* fill to x=0 and y=0 respect...
);
has fillcolor => (
is => "rw",
isa => "Str",
lib/Chart/Plotly/Trace/Scatter.pm view on Meta::CPAN
=item * error_y
=item * fill
Sets the area to fill with a solid color. Defaults to *none* unless this trace is stacked, then it gets *tonexty* (*tonextx*) if `orientation` is *v* (*h*) Use with `fillcolor` if not *none*. *tozerox* and *tozeroy* fill to x=0 and y=0 respectively. ...
=item * fillcolor
Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.
view all matches for this distribution
view release on metacpan or search on metacpan
t/Chef/REST/cookbooks.t view on Meta::CPAN
'chef_client_name' => '',
'chef_version' => '',
);
# list cookbooks
# endpoint /cookbooks
#diag Dumper $obj->cookbooks->list;
#endpoint /cookbook/yum
#diag Dumper $obj->cookbooks('yum','_latest')->details->attributes;
diag Dumper $obj->cookbooks('yum','_latest')->details->recipes;
#diag Dumper $obj->environments( $environment_name )->details;
# endpoint POST /environments/<env_name>/cookbooks_versions
# post data run_list => [ <cookbook>@<cookbook_version> , .. ]
#___ TESTING not complete ____
#diag Dumper $obj->environments( $environment_name
# ,'cookbooks_versions'
# , {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Chess/Board.pm view on Meta::CPAN
Takes a single scalar parameter containing the square to calculate distance
from. Returns the vertical distance in squares between the two points.
=item squares_in_line()
Takes two scalar parameters containing two distinct endpoints in a line.
Returns a list of scalars in lower-case with an entry for each square in that
line, or C<undef> if the two endpoints do not define a line. In the case where
both squares are the same, will return a list containing that square.
=back
=head2 Object methods
lib/Chess/Board.pm view on Meta::CPAN
identical to the caller object. However, it is a I<deep copy> which allows
the clone()'d object to be manipulated separately of the caller object.
=item line_is_open()
Takes two scalar arguments, valid squares defining the endpoints of a line
on the Chess::Board. Returns true if there are no pieces on either of the
endpoints, or on any of the intervening squares. Returns false if the line
is blocked by one or more pieces, and C<undef> if the two squares do not
define endpoints of a line. In the case where both squares are equal, will
return true if the square is empty and false otherwise.
=item get_piece_at()
Takes a single scalar argument containing the square to retrieve the piece
view all matches for this distribution
view release on metacpan or search on metacpan
bin/aclmaker.pl view on Meta::CPAN
xxxx-yyyy, or a comma separated list of any combination of those. The valid
range is 0-65535.
=item * dst_addr
As with src_addr but for the destination endpoint.
=item * dst_port
As with src_port but tor the destination endpoint.
=item * protocol
The protocol for the ACL. One of C<tcp>, C<udp> or C<ip>. For compatibility
the value C<both> is interpreted as C<ip>.
view all matches for this distribution
view release on metacpan or search on metacpan
t/autodb.020.graph/graph.010.01.thaw_nodes.t view on Meta::CPAN
$ok&&=_cmp_thawed(\@all_actual_objects,\@correct_thawed,
"$label thawed edges",__FILE__,__LINE__);
}
report_pass($ok,"$label thawed edges");
# check edges' nodes (aka endpoints) - nodes should all be thawed already
my @actual_ends=map {@{$_->nodes}} @actual_edges;
cmp_thawed(\@actual_ends,\@actual_nodes,"$label thawed edge endpoints");
local $SIG{__WARN__}=sub {warn @_ unless $_[0]=~/^Deep recursion/;};
local $DB::deep=0;
# test contents the usual way.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Color/Spectrum/Multi.pm view on Meta::CPAN
# take the first colour waypoint off:
my $startpoint = shift @points;
# How many steps do we get between each waypoint?
my $substeps = int($steps / scalar @points);
while(my $endpoint = shift @points) {
if (@points == 0) {
# there's no more points left... make sure we don't fall short
# on the number of steps:
if (($steps_used + $substeps) != $steps) {
$substeps = $steps - $steps_used;
lib/Color/Spectrum/Multi.pm view on Meta::CPAN
# Since we start from the last colour of the previous fade, if this
# isn't the first fade, we want to generate one extra colour, and drop
# the first (otherwise, we'd duplicate colours)
my @colour_set =
Color::Spectrum::generate(
$steps_used ? $substeps+1 : $substeps, $startpoint,$endpoint
);
push @colours, $steps_used ? @colour_set[1..$substeps] : @colour_set;
# next fade will start from last colour of this fade:
$startpoint = $endpoint;
$steps_used += $substeps;
}
return @colours;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/app/Plack/Component.t view on Meta::CPAN
__END__
=head1 NAME
Plack::Component - Base class for PSGI endpoints
=head1 SYNOPSIS
package Plack::App::Foo;
use parent qw( Plack::Component );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Config/Model/models/Systemd/Section/Socket.pl view on Meta::CPAN
'cargo' => {
'type' => 'leaf',
'value_type' => 'uniline'
},
'description' => 'Specifies a L<USB
FunctionFS|https://docs.kernel.org/usb/functionfs.html> endpoints location to listen on, for
implementation of USB gadget functions. This expects an
absolute file system path of a FunctionFS mount point as the argument.
Behavior otherwise is very similar to the C<ListenFIFO>
directive above. Use this to open the FunctionFS endpoint
C<ep0>. When using this option, the
activated service has to have the
C<USBFunctionDescriptors> and
C<USBFunctionStrings> options set.
',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Confluence/Client/XMLRPC.pm view on Meta::CPAN
The package uses the L<RPC::XML> module to do the heavy lifting. Read the
perldoc for this package to learn more.
L<RPC::XML> uses LWP for handling C<http>/C<https> messaging. If you are
experiencing problems when connecting to a C<https> based API endpoint,
please make sure that the necessary modules - like, e.g.
L<LWP::Protocol::https> - are installed.
For further information on the Confluence API itself please refer to the
L<official documentation|https://developer.atlassian.com/display/CONFDEV/Confluence+XML-RPC+and+SOAP+APIs>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Confman/API.pm view on Meta::CPAN
my $self = shift;
$self->{secret} = shift if scalar(@_) > 0;
return $self->{secret};
}
sub endpoint_url {
my $self = shift;
$self->{endpoint_url} = shift if scalar(@_) > 0;
return $self->{endpoint_url};
}
sub load_config {
my $self = shift;
my $config_path = shift || $self->config_path;
lib/Confman/API.pm view on Meta::CPAN
'Content-type' => 'application/json',
Authorization => 'Basic ' . encode_base64($self->api_key . ':' . "$secret_hash:$timestamp"),
HTTP_CLOUD_META => $cloud_meta
};
$client->setHost($self->endpoint_url);
$client->request($method, $path, $body, $headers);
my $response;
if($client->responseCode eq '200') {
$response = $self->json->decode($client->responseContent());
view all matches for this distribution