API for the Haiku Ninja website. Fetches comments from YouTube and tries to convert them to haiku.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
public
tests
.env.example
.gitignore
.travis.yml
LICENSE
README.md
composer.json
composer.lock
phpunit.xml

README.md

Haiku Ninja Backend API

Backend API for retrieving haiku from social media comments. The frontend project is here

Installation

Clone or download the git repository to your local development environment, then run

php composer.phar install

Configuration

  1. Rename the .env.example to .env.
  2. Add your app name, Google API key and a secret key to the .env file, add your app name.
  3. Point your web server to the public directory.

Usage

Currently, the API only has one route:

GET https://example.com/comments

The route accepts the following parameters:

id A YouTube video ID

nextPageToken Optional token from the YouTube API. One is provided in the response if your YouTube video has more than 100 comments.

type The social media site to access (currently only accepts 'youtube').

License

This application is licensed under The MIT License (MIT). See the LICENSE file for more details.