ua::EN::NameParse->new;
Readonly my $DEFAULT => '';
Readonly my @META_FILES => ('META.yml','META.json');
Readonly my @LICENSE_FILES => ('LICENSE','COPYING','README');
Readonly my $DUMMY_COPYRIGHT =>
m object: Invalid operation '$_[3]' The ways in which you can use an enum are restricted"}
;
*TO_JSON = \&chunk;
sub id { $_[0][0]->[ v_id ] }
sub handle { $_[0][0]->[ v_handle ] }
sub name
@args;
push @args, shift; # id
my $uri = sprintf '/conversations/%s/add-external-response.json', @args;
$api->base->call("POST", $uri, @_);
}
=pod
=item add_poll_response
my $res =
my @args;
push @args, shift; # id
my $uri = sprintf '/conversations/%s/add-poll-response.json', @args;
$api->base->call("POST", $uri, @_);
}
=pod
=item get_responses
my $res = $tp
ift;
my @args;
push @args, shift; # id
my $uri = sprintf '/conversations/%s/responses.json', @args;
$api->base->call("GET", $uri, @_);
}
sub responses {
my $self = shift;
Car
shift;
my @args;
push @args, shift; # id
my $uri = sprintf '/import-jobs/%s/close-job.json', @args;
$api->base->call("POST", $uri, @_);
}
=pod
=item post_to_media_assets
my $re
ft;
my @args;
push @args, shift; # id
my $uri = sprintf '/import-jobs/%s/media-assets.json', @args;
$api->base->call("POST", $uri, @_);
}
=pod
=item submit_items
my $res = $tp-
ft;
my @args;
push @args, shift; # id
my $uri = sprintf '/import-jobs/%s/submit-items.json', @args;
$api->base->call("POST", $uri, @_);
}
=pod
=back
=cut
### END auto-generated
1
my $api = shift;
my @args;
push @args, shift; # id
my $uri = sprintf '/auth-tokens/%s.json', @args;
$api->base->call("GET", $uri, @_);
}
=pod
=back
=cut
### END auto-generated
1;
have it's own position in the CSV
## all others will be combined into paired values (JSON-like) and placed in one position in the CSV
my $destination = '';
my $add
$ rino -f /tmp/rino.xml -p table
$ rino -f /tmp/rino.xml -p csv
$ cat /tmp/rino.xml | rino -p json
# using the lib
use RINO::Client;
my @input;
while(<STDIN>){
push(@input,$_);
}
my $i
_xml);
print $rino->write_out('table');
print $rino->write_out('csv');
print $rino->write_out('json');
my $simple_hash = $rino->to_simple();
my $complex_hash = $rino->to_hash();
=head1 SEE ALSO
package WebService::MtGox;
use 5.008;
use Moo;
use Ouch;
use JSON;
use LWP::UserAgent;
our $VERSION = '0.05';
our $BASE_URL = 'https://mtgox.com/code';
has user => (is => 'ro');
has password =>
icker.php";
my $json = $self->ua->get($url)->content();
decode_json($json);
}
sub get_depth {
my $self = shift;
my $url = $self->base_url . "/data/getDepth.php";
my $json = $self->ua->get(
t();
decode_json($json);
}
sub get_trades {
my $self = shift;
my $url = $self->base_url . "/data/getTrades.php";
my $json = $self->ua->get($url)->content();
decode_json($json);
}
sub get_
#!/usr/bin/perl
use strict;
use Data::Dump 'pp';
use Template;
use JSON;
use LWP::Simple;
use FindBin qw($Bin);
use String::CamelCase qw(camelize decamelize);
use lib "$Bin/../lib";
use WWW::TypePad::
ad.com";
my $file = "method-mappings.json";
warn "Downloading $file\n";
LWP::Simple::mirror("http://$host/client-library-helpers/$file", "$Bin/$file");
my $json = do { open my $fh, "<", "$Bin/$file
" or die $!; join '', <$fh> };
my $mappings = decode_json($json);
for my $key (keys %$mappings) {
WWW::TypePad::CodeGen::handle_object($key, $mappings->{$key})
}
my %map = (
json => 'application/json',
xml => 'application/xml',
);
builder {
enable 'SetAccept', from => 'suffix', mapping => \%map;
$app;
};
# now /foo.json behaves as /fo
o, with Accept: application/json
# or
builder {
enable 'SetAccept', from => 'param', param => 'format', mapping => \%map;
$app;
};
# now /foo?format=xml behaves as /foo, with Accept:
request
URI. It can extract from either the suffix of the path (ex. /foo.json) or
from the query string (ex. /foo?format=json) for HEAD and GET requests. The
value is looked up in a mapping table an
otably they are XML, YAML and JSON.
The URIs need to end with C<.xml>, C<.yml> and C<.json> for XML, YAML and JSON, respectively.
=over
=item B<GET> I</nlp/models.(json|xml|yml)>
Returns an array
strings.
=item B<GET> I</nlp/languages.(json|xml|yml)>
Returns an array of supported languages. Default is "en" for English.
=item B<GET> I</nlp/info.(json|xml|yml)>
Returns a hashref of details
T> I</nlp/relations.(json|xml|yml)>
The user can get a list of all the english grammatical relations supported by
the NLP backend.
=item B<GET/POST> I</nlp/parse/B<$model>.(json|xml|yml)>
The user
o, don't rely on the
# existence of these modules.
die "Please install JSON::XS" unless eval "require JSON::XS";
die "Please install Algorithm::Diff"
unless eval "require Algorithm:
r; my $el=$it->(); ) {
$#{$el}=nNOTE; # drop ID
$el->[nBLOCK]+=0; # convert to numbers because JSON::XS
$el->[nORDER]+=0; # shows 0 as 0 but '0' as "0"
push @my_stuff, $el if( (ref($key)
? $
r; my $el=$it->(); ) {
$#{$el}=nNOTE; # drop ID
$el->[nBLOCK]+=0; # convert to numbers because JSON::XS
$el->[nORDER]+=0; # shows 0 as 0 but '0' as "0"
push @other_stuff, $el if( (ref($key)
{
my $api = shift;
my @args;
push @args, shift; # id
my $uri = sprintf '/blogs/%s.json', @args;
$api->base->call("GET", $uri, @_);
}
=pod
=item add_category
my $res = $tp->
= shift;
my @args;
push @args, shift; # id
my $uri = sprintf '/blogs/%s/add-category.json', @args;
$api->base->call("POST", $uri, @_);
}
=pod
=item begin_import
my $res = $tp-
= shift;
my @args;
push @args, shift; # id
my $uri = sprintf '/blogs/%s/begin-import.json', @args;
$api->base->call("POST", $uri, @_);
}
=pod
=item build_embed_code_for_urls
m
PTION
This module implements a simple C<modperl> handler that exports our
provider parameters in JSON or YAML to the WEB, e.g.:
$ curl http://localhost/-/config?yaml
---
TranslationEvalCache:
nfig
Since C<Apache2::Translation> version 0.31 JSON is default.
C<Apache2::Translation::Admin> can decode both formats provided the
L<YAML> and L<JSON::XS> modules are installed.
This format can be
ted';
}
my $args=lc $r->args;
if( $args ne 'yaml' and eval 'require JSON::XS' ) {
$r->print( JSON::XS::encode_json
( {
TranslationKey=>$cf->{key},
TranslationProvider=>$cf->
key},
TranslationProvider=>$cf->{provider_param},
TranslationEvalCache=>$cache,
} ) );
} else {
die "Please install JSON::XS or YAML";
}
return Apache2::Const::OK;
}
1;
__END__
en notes are not
copied.
=item B<diff( $other_provider, %options )>
If L<Algorithm::Diff> and L<JSON::XS> are installed this method computes
a difference between 2 providers. If C<key> or C<uri> are
ider_url);
if( $resp->is_success ) {
my $x;
unless( eval 'require JSON::XS' and
$x=eval {JSON::XS::decode_json($resp->content)} ) {
eval 'require YAML' and $x=eval {YAML::Load($re
'0.4002';
use Any::Moose;
use Carp qw( croak );
use HTTP::Request::Common;
use HTTP::Status;
use JSON;
use LWP::UserAgent;
use Net::OAuth::Simple;
use WWW::TypePad::Error;
# TODO import flag to prel
my $api = shift;
my( $key ) = @_;
return $api->call_anon( GET => '/api-keys/' . $key . '.json' );
}
sub uri_for {
my $api = shift;
my( $path ) = @_;
$path = '/' . $path unless $p
$method eq 'PUT') and $qs) {
$extra{ContentBody} = JSON::encode_json($qs);
$extra{ContentType} = 'application/json';
}
my $oauth = $api->oauth;
$res =
my $api = shift;
my @args;
push @args, shift; # id
my $uri = sprintf '/domains/%s.json', @args;
$api->base->call("GET", $uri, @_);
}
=pod
=item resolve_path
my $res = $tp->
shift;
my @args;
push @args, shift; # id
my $uri = sprintf '/domains/%s/resolve-path.json', @args;
$api->base->call("POST", $uri, @_);
}
=pod
=back
=cut
### END auto-generated
1
my @args;
push @args, shift; # id
my $uri = sprintf '/external-feed-subscriptions/%s.json', @args;
$api->base->call("DELETE", $uri, @_);
}
=pod
=item get
my $res = $tp->extern
my @args;
push @args, shift; # id
my $uri = sprintf '/external-feed-subscriptions/%s.json', @args;
$api->base->call("GET", $uri, @_);
}
=pod
=item add_feeds
my $res = $tp->ext
rgs;
push @args, shift; # id
my $uri = sprintf '/external-feed-subscriptions/%s/add-feeds.json', @args;
$api->base->call("POST", $uri, @_);
}
=pod
=item get_feeds
my $res = $tp->ex
my $api = shift;
my @args;
push @args, shift; # id
my $uri = sprintf '/groups/%s.json', @args;
$api->base->call("GET", $uri, @_);
}
=pod
=item add_member
my $res = $tp->gr
i = shift;
my @args;
push @args, shift; # id
my $uri = sprintf '/groups/%s/add-member.json', @args;
$api->base->call("POST", $uri, @_);
}
=pod
=item post_to_audio_assets
my $re
= shift;
my @args;
push @args, shift; # id
my $uri = sprintf '/groups/%s/audio-assets.json', @args;
$api->base->call("POST", $uri, @_);
}
=pod
=item get_audio_assets
my $res =