Bintray-API

 view release on metacpan or  search on metacpan

lib/Bintray/API/Package.pm  view on Meta::CPAN

  return $self->session()->talk(
        path => join( '/',
            'packages',            $self->repo()->subject()->name(),
            $self->repo()->name(), $self->name(),
        ),
        anon => 1,
    );
} ## end sub info

## Update Package
sub update {
    my ( $self, @args ) = @_;

    my %opts = validate_with(
        params => [@args],
        spec   => {
            details => {
                type => HASHREF,
            },
        },
    );

lib/Bintray/API/Package.pm  view on Meta::CPAN


    # POST
  return $self->session()->talk(
        method => 'PATCH',
        path   => join( '/',
            'packages',            $self->repo()->subject()->name(),
            $self->repo()->name(), $self->name(),
        ),
        content => $json,
    );
} ## end sub update

## Create Version
sub create_version {
    my ( $self, @args ) = @_;

    my %opts = validate_with(
        params => [@args],
        spec   => {
            details => {
                type => HASHREF,

lib/Bintray/API/Package.pm  view on Meta::CPAN

        method => $opts{update} ? 'PATCH' : 'POST',
        path => join( '/',
            'packages',            $self->repo()->subject()->name(),
            $self->repo()->name(), $self->name(),
            'attributes', ),
        content => $json,
    );
} ## end sub set_attributes

## Update Attributes
sub update_attributes { return shift->set_attributes( @_, update => 1, ); }

## Add WebHook
sub set_webhook {
    my ( $self, @args ) = @_;

    my %opts = validate_with(
        params => [@args],
        spec   => {
            url    => { type => SCALAR },
            method => {

lib/Bintray/API/Version.pm  view on Meta::CPAN

  return $self->session()->talk(
        path => join( '/',
            'packages',                 $self->package->repo->subject->name,
            $self->package->repo->name, $self->package->name,
            'versions',                 $self->name,
        ),
    );
} ## end sub info

## Update Version
sub update {
    my ( $self, @args ) = @_;

    my %opts = validate_with(
        params => [@args],
        spec   => {
            details => {
                type => HASHREF,
            },
        },
    );

lib/Bintray/API/Version.pm  view on Meta::CPAN

    # POST
  return $self->session()->talk(
        method => 'PATCH',
        path   => join( '/',
            'packages',                 $self->package->repo->subject->name,
            $self->package->repo->name, $self->package->name,
            'versions',                 $self->name,
        ),
        content => $json,
    );
} ## end sub update

## Get Attributes
sub get_attributes {
    my ( $self, @args ) = @_;

    my %opts = validate_with(
        params => [@args],
        spec   => {
            names => {
                type    => ARRAYREF,

lib/Bintray/API/Version.pm  view on Meta::CPAN

        path => join( '/',
            'packages',                 $self->package->repo->subject->name,
            $self->package->repo->name, $self->package->name,
            'versions',                 $self->name,
            'attributes', ),
        content => $json,
    );
} ## end sub set_attributes

## Update Attributes
sub update_attributes { return shift->set_attributes( @_, update => 1, ); }

## Test WebHook
sub test_webhook {
    my ($self) = @_;
  return $self->session()->talk(
        method => 'POST',
        path   => join( '/',
            'webhooks',                 $self->package->repo->subject->name,
            $self->package->repo->name, $self->package->name,
            'versions',                 $self->name,



( run in 0.251 second using v1.01-cache-2.11-cpan-95122f20152 )