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

WebService::Pixela::User - It's Pixela User API client

SYNOPSIS

    use strict;
    use warnings;
    use utf8;

    use WebService::Pixela;

    # All WebService::Pixela methods use this token and user name in URI, JSON, etc.
    my $pixela = WebService::Pixela->new(token => "thisissecret", username => "testname");
    print $pixela->username,"\n"; # testname
    print $pixela->token,"\n";    # thisissecret

    $pixela->user->create(); # default agreeTermsOfService and notMinor "yes"
    # or...
    $pixela->user->create(agree_terms_of_service => "yes", not_minor => "no"); # can input agreeTermsOfService and notMinor

    $pixela->user->update("newsecret_token"); # update method require new secret token characters
    print $pixela->token,"\n";

    $pixela->user->delete(); # delete method not require arguments

DESCRIPTION

WebService::Pixela::User is user API client about Pixe.la webservice.

INTERFACE

instance methods

This instance method require WebService::Pixela instance. So, Usually use these methods from the WebService::Pixela instance.

$pixela->user->create(%opts)

It is Pixe.la user create.

%opts might be:

agree_terms_of_service : [yes|no]

Specify yes or no whether you agree to the terms of service. If there is no input, it defaults to yes. (For this module.)

not_minor : [yes|no]

Specify yes or no as to whether you are not a minor or if you are a minor and you have the parental consent of using this (Pixela) service. If there is no input, it defaults to yes. (For this module.)

See also

https://docs.pixe.la/#/post-user

$pixela->user->update($newtoken)

Updates the authentication token for the specified user.

$newtoken might be:

$newtoken :Str

It is a new authentication token.

See also

https://docs.pixe.la/#/update-user

$pixela->user->delete()

Deletes the specified registered user.

See also

https://docs.pixe.la/#/delete-user

LICENSE

Copyright (C) Takahiro SHIMIZU.

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

AUTHOR

Takahiro SHIMIZU <anatofuz@gmail.com>