Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 1.06 KB

api.md

File metadata and controls

38 lines (29 loc) · 1.06 KB

API

We're happy to provide our code collection for integrations of all types. At this point, search API is available publicly with no need to register any keys.

Usage is as simple as calling api.onelinerhub.com/search endpoint with query parameter (GET or POST).

Example request

curl "https://api.onelinerhub.com/search?query=php+header+json"

Example response

[
  {
    "url": "https:\/\/onelinerhub.com\/javascript\/fetch_post_uri",
    "tech": "javascript",
    "subject": "Ajax post x-www-form-urlencoded data",
    "lang": "javascript",
    "code": "fetch('\/backend.php...log(data);\n});"
  }
  // , ...
]

Response data description:

  • url - public URL of the code piece page
  • tech - technology of this code
  • subject - Full title for the code
  • lang - Code piece language
  • code- Code piece itself

Integrations