Project

cowsapi

0.0
No commit activity in last 3 years
No release in over 3 years
Cowsay API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 3.1

Runtime

~> 0.12
~> 10.4
~> 1.4
~> 2.1.0
~> 1.6
 Project Readme

Cowsapi

Runs an HTTP API that exposes cowsay operations. Make cows say things, just like you always wanted to - over the internets!

Features

  • Make cows say things!
  • Supports both text and images of cows!

Preqrequisites

You need some software installed in order to run cowsapi successfully. Here are instructions for install stuff on OSX:

brew install ImageMagick ghostscript

Installation

To install cowsapi:

gem install cowsapi

Usage

To launch cowsapi:

port=9292 cowsapi

This will launch cowsapi on port 9292.

API Guide

List cows:

curl -O http://localhost

Make a cow say stuff:

curl -O http://localhost/somecow/stuff%20to%20say

Get a an image of a cow saying stuff:

curl -o curl -O http://sheax0r.ca/cow/stuff?format\=png > cowstuff.png

Extra stuff

You can also make your docker-cowsay container run cowsay directly, rather than launching an api, like so:

docker run -t cowsay i can haz cows?

_________________
< i can haz cows? >
 -----------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

Contributing

  1. Fork it ( https://github.com/[my-github-username]/cowsapi/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request