Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pmarkert/yolinkage
Link generator with randomized message for multiple http://www.justyo.co apps
https://github.com/pmarkert/yolinkage
Last synced: about 1 month ago
JSON representation
Link generator with randomized message for multiple http://www.justyo.co apps
- Host: GitHub
- URL: https://github.com/pmarkert/yolinkage
- Owner: pmarkert
- License: isc
- Created: 2014-08-29T14:51:26.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-09-02T14:52:58.000Z (over 10 years ago)
- Last Synced: 2023-03-22T15:07:23.806Z (almost 2 years ago)
- Language: JavaScript
- Size: 1.45 MB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This is a simple app for the [justyo](http://www.justyo.co) service where you can listen for yo messages
and then respond with a custom url formatted with a randomly selected item from a configured list.Initial use-cases for this are:
* Magic eight-ball (YOEIGHTBALL)
* Random Bible-verse (YOBIBLE)
* Heads or TailsTo use the app, environment variables need to be specified:
* YO_API_KEY - Your api key from justyo
* MESSAGES - a pipe "|" delimited list of your custom messages
* RESPONSE_URL_FORMAT - a formatted string containing the response urlFor the RESPONSE_URL_FORMAT the default value is "${SCHEME}://${HOST}/message.html?${MESSAGE}"
SCHEME and HOST are relative to the current request. MESSAGE is the url-encoded randomly selected item
from your messages list.The RESPONSE_URL needs to be an absolute url, and it does not need to live within the application.
For example, the "YOBIBLE" application has the following configuration values:
* RESPONSE_URL_FORMAT = https://www.bible.com/bible/111/${MESSAGE}
* MESSAGE = "john.3.16.niv|rom.8.28.niv"The "Yo" endpoint for the service is "/yo" and the justyo service will append the username of the user
as a querysting parameter.To test the service directly, you can use the "/go" endpoint instead.
"/about" will redirect to the URL specified in the "ABOUT" environment variable.