haikuist
v1.4.2
Published
Fetch haikus from https://haiku.ist from your terminal
Downloads
12
Readme
haikuist
Fetch haikus from https://haiku.ist from your terminal
Installation
$ npm install -g haikuist
Or for a one-time run:
$ npx haikuist
Usage
$ haikuist --help
haikuist v1.0.0
Usage:
$ haikuist [command]
$ haikuist latest Fetch latest haiku
$ haikuist about Display contents of about page
Options:
--info Display https://haiku.ist/about page [boolean]
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
Homepage: https://github.com/vladimyr/haikuist
Report issue: https://github.com/vladimyr/haikuist/issues
API
Table of Contents
about
Retrieve contents of haiku.ist/about page.
Returns Promise<Page> About page.
count
Get total number of haikus.
Returns Promise<Number> Total number of haikus available.
fetchPosts
Retrieve multiple haikus from haiku.ist archive.
Parameters
options
Object WordPress REST API/posts
endpoint arguments.options.pageSize
Number Maximum number of items to be returned in result set. (optional, default10
)
Returns Promise<Response<Post>> Paginated listing of haiku posts.
fetchLatest
Fetch latest haiku.
Returns Promise<Post> Latest post containing haiku.
fetchRandom
Fetch random haiku from haiku.ist archive.
Returns Promise<Post> Random post containing haiku.
Page
WordPress API client Page
response type.
Type: WordPressClient.Page
Post
WordPress API client Post
response type.
Type: WordPressClient.Post
Response
WordPress API client response type used for paginated responses.
Type: WordPressClient.Response<T>