Responses:
=over 4
=item * C<<< 200 >>> - page, type: application/json
=item * C<<< 404 >>> - not-found, type: application/json
The restriction could not be found.
=back
=head2 create_restricti
00 >>> - restriction, type: application/json
Response contains the ref restriction that was just created.
=item * C<<< 400 >>> - errors, type: application/json
The request has failed validation.
=
item * C<<< 401 >>> - validation, type: application/json
The currently authenticated user has insufficient permissions to perform this operation.
=back
=head2 delete_restriction_for_repository
Del
sed for command-line tools,
and is the base class for other specific text formats like XML, HTML, JSON, etc.
=head1 WRITING A SUBCLASS
# In Acme/Product/View/OutstandingOrders/Text.pm
package A
perty::View::ReferenceDescription::Text;
use UR::Object::Set;
use UR::Object::Set::View::Default::Json;
use UR::Object::Tag;
use UR::Object::Type;
use UR::Object::Type::AccessorWriter;
use UR::Object:
::Object::View::Default::Gtk;
use UR::Object::View::Default::Gtk2;
use UR::Object::View::Default::Json;
use UR::Object::View::Default::Text;
use UR::Object::View::Lister::Text;
use UR::Object::View::T
"use UR::Namespace::View::SchemaBrowser::CgiApp::Schema;"
&& eval "use UR::Service::JsonRpcServer;";
die $@ unless ($rv);
}
if (eval "use Xml::LibXSLT") {
my $rv = eval "use UR
ey}/repos/{repositorySlug}
Responses:
=over 4
=item * C<<< 200 >>> - status, type: application/json
The updated synchronization status for the repository, after enabling
synchronization. 204 NO CO
0 >>> - errors, type: application/json
The JSON payload for the request did not define the "enabled" property.
=item * C<<< 401 >>> - errors, type: application/json
The currently authenticated user
nage
synchronization in the specified repository.
=item * C<<< 204 >>> - data, type: application/json
Synchronization has successfully been disabled. 200 OK, with updated status
information, is retu
204 >>> - data, type: application/json
an empty response indicating that the user setting has been updated
=item * C<<< 404 >>> - not-found, type: application/json
The mirror could not be found.
over 4
=item * C<<< 200 >>> - data, type: application/json
the preferred mirror server
=item * C<<< 404 >>> - not-found, type: application/json
The user's preferred mirror server could not be foun
nt/settings/preferred-mirror
Responses:
=over 4
=item * C<<< 204 >>> - data, type: application/json
an empty response indicating that the user setting has been updated
=back
=head2 get_analytics
>>> - accessToken, type: application/json
A response containing the raw access token and associated details
=item * C<<< 400 >>> - errors, type: application/json
One of the following error cases oc
ready has their maximum number of tokens
=back
=item * C<<< 401 >>> - errors, type: application/json
The currently authenticated user is not permitted to create an access token on
behalf of this us
>> - accessToken, type: application/json
A response containing a page of access tokens and associated details
=item * C<<< 401 >>> - errors, type: application/json
The currently authenticated user
=~ /json/) {
$body = $self->json->decode($body);
}
return $body;
}
has json => (
is => 'lazy',
isa => Object,
default => sub {
shift->context->json ||
do {
require JSON::MaybeXS;
JSON::MaybeXS->new(utf8 => 1);
};
},
);
sub is_success { shift->raw->{success} }
sub status { shift->raw->{status} }
sub erro
=> $self->raw,
decoded_content => $self->data->{$field},
json => $self->json,
);
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
WebService::BitbucketSer
authenticated user.
=back
Responses:
=over 4
=item * C<<< 401 >>> - errors, type: application/json
The currently authenticated user has insufficient permissions
to delete the GPG keys. This is on
tching the supplied B<<< user >>> were deleted.
=item * C<<< 404 >>> - errors, type: application/json
No user matches the supplied B<<< user >>>
=back
=head2 get_keys
Find all the keys for the cu
k
Responses:
=over 4
=item * C<<< 200 >>> - page, type: application/json
=item * C<<< 401 >>> - errors, type: application/json
The currently authenticated user has insufficient permissions to per
C<<< 200 >>> - data, type: application/json
The default reviewer pull request condition that was created.
=item * C<<< 400 >>> - data, type: application/json
The request was malformed
=back
=hea
tem * C<<< 200 >>> - data, type: application/json
The updated default reviewer pull request condition.
=item * C<<< 400 >>> - data, type: application/json
The request was malformed
=back
=head2 g
ects/{projectKey}/conditions
Responses:
=over 4
=item * C<<< 200 >>> - data, type: application/json
The default reviewer pull request conditions associated with the given project
=back
=head2 cr
package UR::Service::JsonRpcServer;
use strict;
use warnings;
use UR;
our $VERSION = "0.47"; # UR $VERSION;
UR::Object::Type->define(
class_name => __PACKAGE__,
is => 'UR::Object',
prop
ect serving as a web server to respond to JSON-RPC requests; wraps Net::HTTPServer',
);
=pod
=head1 NAME
UR::Service::JsonRpcServer - A self-contained JSON-RPC server for UR namespaces
=head1 SYNO
PSIS
use lib '/path/to/your/moduletree';
use YourNamespace;
my $rpc = UR::Service::JsonRpcServer->create(host => 'localhost',
port => '80
rd.
=item Create a sandbox_config.json
On the dashboard page of your new sandbox account, three are three values you
will need to put into a C<< sandbox_config.json >>. The format of the file must
e';
use JSON::XS qw(encode_json decode_json);
use Ion;
my ($r, $w) = portable_pipe;
my $in = Connect(unblock($r)) << \&decode_json;
my $out = Connect(unblock($w)) >> \&encode_json;
=head1
the raw line
data.
=head2 EXAMPLE: JSON
use Ion;
use JSON::XS;
my $server = Listen;
$server <<= sub{ decode_json(shift) };
$server >>= sub{ encode_json(shift) };
while (my $conn = <$se
{ # $data is perl data
$conn->({foo => 'bar', baz => 'bat'}); # $conn is sent json: "{'foo': 'bar', 'baz': 'bat'}"
}
}
=head2 EXAMPLE: CHAINING
use Ion;
use Data::Dumpe
> object used in the request. Useful if you
need to extract raw data:
my $raw_data = $tx->res->json;
=head1 METHODS
=head2 rows_to_hash
$hash_ref = $self->rows_to_hash;
Creates a multi dimens
e utf8;
package Net::Etcd::Role::Actions;
use strict;
use warnings;
use Moo::Role;
use AE;
use JSON;
use MIME::Base64;
use Types::Standard qw(InstanceOf);
use AnyEvent::HTTP;
use Carp;
use Data::Du
isa => InstanceOf ['Net::Etcd'],
);
=head2 json_args
arguments that will be sent to the api
=cut
has json_args => ( is => 'lazy', );
sub _build_json_args {
my ($self) = @_;
my $args;
) {
unless ( $key =~ /(?:etcd|cb|cv|hold|json_args|endpoint)$/ ) {
$args->{$key} = $self->{$key};
}
}
return to_json($args);
}
=head2 cb
AnyEvent callback must be
use Mojo::Collection;
use Mojo::File 'path';
use Mojo::GoogleAnalytics::Report;
use Mojo::JSON qw(decode_json false true);
use Mojo::Promise;
use Mojo::JWT;
use Mojo::UserAgent;
use constant DEBUG =
$query, $cb) = @_;
my @ua_args;
@ua_args = (Mojo::URL->new($self->{batch_get_uri}), {},
json => {reportRequests => ref $query eq 'ARRAY' ? $query : [$query]});
if ($cb) {
my $p = $sel
{
shift->batch_get(shift, 1);
}
sub from_file {
my ($self, $file) = @_;
my $attrs = decode_json(path($file)->slurp);
for my $attr (keys %$attrs) {
$self->{$attr} ||= $attrs->{$attr};
o by an alias
my $old_index_name = $model->es->cat->aliases(name => $doc_type, format => 'json')->[0]->{index};
# Switch the alias to the new index, and remove the alias from the old
use Moo;
use Types::Standard qw(Str Int Bool HashRef ArrayRef);
use MIME::Base64;
use Carp;
use JSON;
use Data::Dumper;
with 'Net::Etcd::Role::Actions';
use namespace::clean;
=head1 NAME
Net::Et
sub grant {;
my ($self) = @_;
$self->{endpoint} = '/auth/role/grant';
$self->{json_args} = to_json( {name => $self->name, perm => $self->perm } );
$self->request;
return $self;
}
use Moo;
use Types::Standard qw(Str Int Bool HashRef ArrayRef);
use MIME::Base64;
use Carp;
use JSON;
with 'Net::Etcd::Role::Actions';
use namespace::clean;
=head1 NAME
Net::Etcd::Auth::Role
=c
return $self;
}
=head2 list
List roles
=cut
sub list {
my ($self) = @_;
$self->{endpoint} = '/auth/role/list';
$self->{json_args} = '{}';
$self->request;
return $self;
}
1;
o;
use Types::Standard qw(Str Int Bool HashRef ArrayRef);
use MIME::Base64;
use Data::Dumper;
use JSON;
with 'Net::Etcd::Role::Actions';
use namespace::clean;
=head1 NAME
Net::Etcd::KV::Compare
=
rver::Command::Branch;
use Data::Validator;
use File::Spec;
use Ukigumo::Server::Util;
use JSON qw(encode_json);
use Text::Xslate qw(mark_raw);
any '/' => sub {
my ($c) = @_;
my $project = $
branch_id,
page => $page,
limit => $limit,
);
my $reports_json = encode_json($reports);
return $c->render(
'report_list.tx' => {
project
ranch_id => $branch_id,
reports => $reports,
reports_json => mark_raw("$reports_json"),
pager => $pager,
now => time(),