RESTful Lenny Save

A lenny API. Use this to bring Lenny face to your applications

Project README

RESTful-Lenny

Providing ( ͡° ͜ʖ ͡°) to a hack near you!

RESTful Lenny

A Lenny API. Use this to bring Lenny face to your applications!


To run the API, see SETUP.md.


API Documentation


Original Lenny

GET https://api.lenny.today/v1/lenny
(Try it)

Response

HTTP Status Code: 200 OK
Content-Type: application/json

Example Response Body

[
  {
    "face": "( ͡° ͜ʖ ͡°)"
  }
]


Random Lenniez

GET https://api.lenny.today/v1/random?limit=5
(Try it)
Maximum limit of 500 Lenniez per request

Response

HTTP Status Code: 200 OK
Content-Type: application/json

Example Response Body

[
  {
    "seed": 1,
    "face": "ᕮ・□・ᕭ"
  },
  {
    "seed": 1,
    "face": "ᕙ(  ͌ ε   ͌)ᕗ"
  },
  {
    "seed": 1,
    "face": "(ง⪦ᨎ⪧)ง"
  },
  {
    "seed": 1,
    "face": "ᑫxロxᑷ"
  },
  {
    "seed": 1,
    "face": "(づ■⍊■)づ"
  }
]

Error Responses

Invalid limit

If you try to request too many Lenniez.

HTTP Status Code: 400 BAD REQUEST
Content-Type: application/json

Response Body

{
  "ლ(⏓益⏓ლ)": "┬─┬ノ( ´ᗝ`ノ)"
}


Customise Lenny

GET https://api.lenny.today/v1/random?mouth=%E1%A8%93&eyes=*&limit=5
(Try it)
This will generate 5 different Lenniez with ᨓ for the mouth and * for the eyes.

Response

HTTP Status Code: 200 OK
Content-Type: application/json

Example Response Body

[
  {
    "seed": 1,
    "face": "ヽ(*ᨓ*)ノ"
  },
  {
    "seed": 1,
    "face": "ᕮ*ᨓ*ᕭ"
  },
  {
    "seed": 1,
    "face": "ᕙ(*ᨓ*)ᕗ"
  },
  {
    "seed": 1,
    "face": "ლ(*ᨓ*ლ)"
  },
  {
    "seed": 1,
    "face": "|*ᨓ*|"
  }
]

Description

When getting a random Lenny, you can specify what characters to use for the different parts of the face.
Any parts of the face you don't specify will be random.

Facial Features

  • leftear
  • rightear
  • ears (overrides leftear and rightear)
  • lefteye
  • righteye
  • eyes (overrides lefteye and righteye)
  • mouth

Make sure to URL Encode your query parameters. (Your web browser will do this for you most of the time)

Open Source Agenda is not affiliated with "RESTful Lenny" Project. README Source: LennyToday/RESTful-lenny
Stars
35
Open Issues
0
Last Commit
5 years ago

Open Source Agenda Badge

Open Source Agenda Rating