| 1 | package Mojolicious::Command::sendgrid::mail; | ||
| 2 | use Mojo::Base 'Mojolicious::Commands'; | ||
| 3 | |||
| 4 | has description => 'Sendgrid Mail API'; | ||
| 5 | has hint => <<EOF; | ||
| 6 | |||
| 7 | See 'APPLICATION sendgrid mail help API' for more information on a specific | ||
| 8 | api. | ||
| 9 | EOF | ||
| 10 | has message => sub { shift->extract_usage . "\nAPI:\n" }; | ||
| 11 | has namespaces => sub { ['Mojolicious::Command::sendgrid::mail'] }; | ||
| 12 | |||
| 13 | sub help { shift->run(@_) } | ||
| 14 | |||
| 15 | 1; | ||
| 16 | |||
| 17 | =encoding utf8 | ||
| 18 | |||
| 19 | =head1 NAME | ||
| 20 | |||
| 21 | Mojolicious::Command::sendgrid::mail - Command interface to the mail endpoint | ||
| 22 | of the Sendgrid API | ||
| 23 | |||
| 24 | =head1 SYNOPSIS | ||
| 25 | |||
| 26 | Usage: APPLICATION sendgrid mail COMMAND [OPTIONS] | ||
| 27 | |||
| 28 | export SENDGRID_APIKEY='your sendgrid api key' | ||
| 29 | mojo sendgrid mail send -t a@b.com -f x@y.com -s Subject < /tmp/file | ||
| 30 | |||
| 31 | =head1 DESCRIPTION | ||
| 32 | |||
| 33 | L<Mojolicious::Command::sendgrid::mail> lists available Sendgrid commands for | ||
| 34 | the mail endpoint. | ||
| 35 | |||
| 36 | =head1 ATTRIBUTES | ||
| 37 | |||
| 38 | L<Mojolicious::Command::sendgrid::mail> inherits all attributes from | ||
| 39 | L<Mojolicious::Commands> and implements the following new ones. | ||
| 40 | |||
| 41 | =head2 description | ||
| 42 | |||
| 43 | my $description = $mail->description; | ||
| 44 | $mail = $mail->description('Foo'); | ||
| 45 | |||
| 46 | Short description of this command, used for the command list. | ||
| 47 | |||
| 48 | =head2 hint | ||
| 49 | |||
| 50 | my $hint = $mail->hint; | ||
| 51 | $mail = $mail->hint('Foo'); | ||
| 52 | |||
| 53 | Short hint shown after listing available sendgrid commands. | ||
| 54 | |||
| 55 | =head2 message | ||
| 56 | |||
| 57 | my $msg = $mail->message; | ||
| 58 | $mail = $mail->message('Bar'); | ||
| 59 | |||
| 60 | Short usage message shown before listing available sendgrid commands. | ||
| 61 | |||
| 62 | =head2 namespaces | ||
| 63 | |||
| 64 | my $namespaces = $mail->namespaces; | ||
| 65 | $mail = $mail->namespaces(['MyApp::Command::sendgrid::mail']); | ||
| 66 | |||
| 67 | Namespaces to search for available sendgrid commands, defaults to | ||
| 68 | L<Mojolicious::Command::sendgrid::mail>. | ||
| 69 | |||
| 70 | =head1 METHODS | ||
| 71 | |||
| 72 | L<Mojolicious::Command::sendgrid::mail> inherits all methods from | ||
| 73 | L<Mojolicious::Commands> and implements the following new ones. | ||
| 74 | |||
| 75 | =head2 help | ||
| 76 | |||
| 77 | $mail->help('app'); | ||
| 78 | |||
| 79 | Print usage information for sendgrid command. | ||
| 80 | |||
| 81 | =head1 SEE ALSO | ||
| 82 | |||
| 83 | L<Mojolicious>, L<Mojolicious::Guides>, L<http://mojolicious.org>. | ||
| 84 | |||
| 85 | =cut |