The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Net::API::CPAN::Favorite - Meta CPAN API Favorite Class

SYNOPSIS

    use Net::API::CPAN::Favorite;
    my $obj = Net::API::CPAN::Favorite->new( {
      author => "MOMOTTARO",
      date => "2023-07-29T05:12:10",
      distribution => "Folklore-Japan",
      id => "Go34To56Ok78aY90ama_I",
      release => "Folklore-Japan-v1.2.3",
      user => "JA01Pa34nIs56Co89ol",
    } ) || die( Net::API::CPAN::Favorite->error );
    
    my $string = $obj->author;
    my $date = $obj->date;
    my $string = $obj->distribution;
    my $string = $obj->id;
    my $str = $obj->object;
    my $string = $obj->release;
    my $string = $obj->user;

VERSION

    v0.1.0

DESCRIPTION

This class serves to retrieve and manipulate favorites.

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::Favorite object.

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

METHODS

author

    $obj->author( "MOMOTTARO" );
    my $string = $obj->author;

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

date

    $obj->date( "2023-07-29T05:12:10" );
    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.

distribution

    $obj->distribution( "Folklore-Japan" );
    my $string = $obj->distribution;

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

id

    $obj->id( "Go34To56Ok78aY90ama_I" );
    my $string = $obj->id;

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

object

Returns the object type for this class, which is favorite

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.

user

    $obj->user( "JA01Pa34nIs56Co89ol" );
    my $string = $obj->user;

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

API SAMPLE

    {
       "date" : "2023-07-29T05:12:10",
       "release" : "Folklore-Japan-v1.2.3",
       "distribution" : "Folklore-Japan",
       "author" : "MOMOTTARO",
       "user" : "JA01Pa34nIs56Co89ol",
       "id" : "Go34To56Ok78aY90ama_I"
    }

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.