NAME

Net::API::CPAN::DownloadUrl - Meta CPAN API DownloadUrl Class

SYNOPSIS

use Net::API::CPAN::DownloadUrl;
my $obj = Net::API::CPAN::DownloadUrl->new( {
  checksum_md5 => "71682907d95a4b0a4b74da8c16e88d2d",
  checksum_sha256 => "27d4da9e772bc1922618b36fdefa768344d92c3d65a5e3cc427218cfc8d7491d",
  date => "2023-07-29T05:10:12",
  download_url => "https://cpan.metacpan.org/authors/id/M/MO/MOMOTARO/Folklore-Japan-v1.2.3.tar.gz",
  release => "Folklore-Japan-v1.2.3",
  status => "latest",
  version => "v1.2.3",
} ) || die( Net::API::CPAN::DownloadUrl->error );

my $string = $obj->checksum_md5;
my $string = $obj->checksum_sha256;
my $date = $obj->date;
my $uri = $obj->download_url;
my $str = $obj->object;
my $string = $obj->release;
my $string = $obj->status;
my $vers = $obj->version;

VERSION

v0.1.0

DESCRIPTION

This class serves to retrieve and manipulate download_urls.

It inherits from Net::API::CPAN::Generic

CONSTRUCTOR

new

Provided with an hash or hash reference of parameters, and this instantiates a new Net::API::CPAN::DownloadUrl object.

The parameters that can be provided bear the same name and supports the same values as the methods below.

METHODS

checksum_md5

$obj->checksum_md5( "71682907d95a4b0a4b74da8c16e88d2d" );
my $string = $obj->checksum_md5;

Sets or gets a string and returns a scalar object, even if there is no value.

checksum_sha256

$obj->checksum_sha256( "27d4da9e772bc1922618b36fdefa768344d92c3d65a5e3cc427218cfc8d7491d" );
my $string = $obj->checksum_sha256;

Sets or gets a string and returns a scalar object, even if there is no value.

date

$obj->date( "2023-07-29T05:10:12" );
my $datetime_obj = $obj->date;

Sets or gets a datetime value, and returns a DateTime object that stringifies to the format that was provided with the string set (usally an ISO 8601 datetime format) or undef if no value is set.

download_url

$obj->download_url( "https://cpan.metacpan.org/authors/id/M/MO/MOMOTARO/Folklore-Japan-v1.2.3.tar.gz" );
my $uri = $obj->download_url;

Sets or gets an URI, and returns an URI object or undef if no value is set.

object

Returns the object type for this class, which is download_url

release

$obj->release( "Folklore-Japan-v1.2.3" );
my $string = $obj->release;

Sets or gets a string and returns a scalar object, even if there is no value.

status

$obj->status( "latest" );
my $string = $obj->status;

Sets or gets a string and returns a scalar object, even if there is no value.

version

$obj->version( "v1.2.3" );
my $version = $obj->version;

Sets or gets a version value and returns a version object using Changes::Version.

API SAMPLE

{
   "checksum_md5" : "71682907d95a4b0a4b74da8c16e88d2d",
   "checksum_sha256" : "27d4da9e772bc1922618b36fdefa768344d92c3d65a5e3cc427218cfc8d7491d",
   "date" : "2023-07-29T05:10:12",
   "download_url" : "https://cpan.metacpan.org/authors/id/M/MO/MOMOTARO/Folklore-Japan-v1.2.3.tar.gz",
   "release" : "Folklore-Japan-v1.2.3",
   "status" : "latest",
   "version" : "v1.2.3",
}

AUTHOR

Jacques Deguest <jack@deguest.jp>

SEE ALSO

Net::API::CPAN, Net::API::CPAN::Activity, Net::API::CPAN::Author, Net::API::CPAN::Changes, Net::API::CPAN::Changes::Release, Net::API::CPAN::Contributor, Net::API::CPAN::Cover, Net::API::CPAN::Diff, Net::API::CPAN::Distribution, Net::API::CPAN::DownloadUrl, Net::API::CPAN::Favorite, Net::API::CPAN::File, Net::API::CPAN::Module, Net::API::CPAN::Package, Net::API::CPAN::Permission, Net::API::CPAN::Rating, Net::API::CPAN::Release

MetaCPAN::API, MetaCPAN::Client

https://github.com/metacpan/metacpan-api/blob/master/docs/API-docs.md

COPYRIGHT & LICENSE

Copyright(c) 2023 DEGUEST Pte. Ltd.

All rights reserved

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.