Acme-Free-Advice-Slip
view release on metacpan or search on metacpan
[](https://github.com/sanko/Acme-Free-Advice-Slip/actions) [](https://metacpan....
# NAME
Acme::Free::Advice::Slip - Seek Advice from the Advice Slip API
# SYNOPSIS
```perl
use Acme::Free::Advice::Slip qw[advice];
say advice( 224 )->{advice};
```
# DESCRIPTION
Acme::Free::Advice::Slip provides wisdom from [AdviceSlip.com](https://adviceslip.com/).
# METHODS
These functions may be imported by name or with the `:all` tag.
## `advice( [...] )`
```perl
my $widsom = advice( ); # Random advice
my $advice = advice( 20 ); # Advice by ID
```
Seek advice.
You may request specific advice by ID.
Advice is provided as a hash reference containing the following keys:
- `advice`
The sage advice you were looking for.
- `id`
The advice's ID in case you'd like to request it again in the future.
## `search( ... )`
```perl
my @slips = search( 'time' );
```
Seek topical advice.
Advice is provided as a list of hash references containing the following keys:
- `advice`
The sage advice you were looking for.
- `date`
The date the wisdom was added to the database. It's in YYYY-MM-DD.
I'm not sure why this isn't also returned when requesting advice by ID but that's how the backend works.
- `id`
The advice's ID in case you'd like to request it again in the future.
# LICENSE & LEGAL
Copyright (C) Sanko Robinson.
This library is free software; you can redistribute it and/or modify it under the terms found in the Artistic License
( run in 1.848 second using v1.01-cache-2.11-cpan-364913b4093 )