Dino Ipsum

Do you like dinosaurs ?
Fork me on GitHub

Introduction

Dino Ipsum is a lorem ipsum for dinosaur lovers and anyone who needs meaningless filler text for prototyping web pages.

Simply select your desired options and hit the Give me Dinos! button


Getting Started


API

Dino Ipsum provides a RESTful API allowing you to generate dinos to your heart's content!

http://dinoipsum.herokuapp.com/api?key1=value1&key2=value2...
format:
{json, html, text} output format (defaults to html)
words:
the number of words per paragraph (defaults to 30)
paragraphs:
the number of paragraphs (defaults to 10)
// Examples
http://dinoipsum.herokuapp.com/api/?format=json
http://dinoipsum.herokuapp.com/api/?format=text&paragraphs=3
http://dinoipsum.herokuapp.com/api/?format=html&paragraphs=3&words=15

Full CORS support

The Dino Ipsum API supports CORS requests, this means that you can pull data from Dino Ipsum directly with a cross domain ajax request.

// jQuery.ajax example
var getDinos      = $.get('http://dinoipsum.herokuapp.com/api/?format=html'),
    fillContainer = function(html) {
      $('#some-awesome-container').html(html);
    },
    oops = function() {
      console.log('Where did all the dinosaurs go?');
    };

getDinos.then(fillContainer, oops);

// Vanilla JavaScript example
var xhr = new XMLHttpRequest();

xhr.open('GET', 'http://dinoipsum.herokuapp.com/api/?format=html&words=10&paragraphs=3');
xhr.onload = function() {
  if (this.status === 200) {
    document.querySelector('#some-awesome-container').innerHTML = this.response;
  } else {
    console.log('Where did all the dinosaurs go?');
  }
};
xhr.send();