Skip to content
This repository was archived by the owner on Oct 10, 2018. It is now read-only.
Chew edited this page Apr 14, 2018 · 4 revisions

GET /trbmb

Returns an array with one quote:

Example

http://api.chew.pro/trbmb

["That really exposes my memes"]

Code Examples

Ruby

require 'rest-client'
require 'json'

puts JSON.parse(RestClient.get("http://api.chew.pro/trbmb"))[0]

Node.js

Thanks to advaith#9121 on the API channel! Link in footer

const snekfetch = require('snekfetch')
snekfetch.get('http://api.chew.pro/trbmb').then((result) => {
  console.log(JSON.parse(result.text)[0]) 
})

HTML + JavaScript

Note: Really sucks, only use when desperate

<!DOCTYPE html>
<html lang="en" dir="ltr">

<head>
  <meta charset="utf-8">
  <title>TRBMB Example</title>
  <script src="https://code.jquery.com/jquery-1.10.2.js"></script>
</head>

<body>
  <div id="content"></div>
  <script>
    var data = $.getJSON("http://api.chew.pro/trbmb", function() {
      const com = data['responseJSON'];

      var div = document.createElement('rows');
      div.innerHTML = com[0];
      document.getElementById('content').appendChild(div);
    });
  </script>
</body>

</html>
Name Call
TRBMB GET /trbmb
Acronym GET /acronym/:acronym
Chewbotcca Discord Commands GET /chewbotcca/discord/command/:command
Chewbotcca MemeDB GET /chewbotcca/memedb/:meme

Clone this wiki locally