Have you ever felt the need for having access to a corpus of dummy text, to visually demonstrate how your web page would look like? Meet the Dino Ipsum API!
Web designers and developers often work with sample placeholder text to visualize and prototype their web pages. Lorem Ipsum – a corpus of dummy text is popular among designers to visualize their work, without relying on the actual content.
The Dino Ipsum API is a Lorem Ipsum Generator that allows users to control the number of words and paragraphs in the generated dinosaur-themed dummy text.
What is the Dino Ipsum API?
The Dino Ipsum API generates dinosaur-themed Lorem Ipsum text for dinosaur lovers! The generated text is intended to be used as a placeholder for prototyping and demonstrating the visual form of content in web pages.
How does the Dino Ipsum API work?
The Dino Ipsum API provides an endpoint for users to interact with. Querying the endpoint with specified parameters results in the dinosaur-themed Lorem Ipsum text, being returned as a response.
How to connect to the Dino Ipsum API Tutorial – Step by Step
The following is a step-by-step tutorial for connecting to the Dino Ipsum API.
Step 1: Sign Up on RapidAPI
A RapidAPI account is required to connect to the Dino Ipsum API. You can sign up for a RapidAPI account by navigating to the RapidAPI website and clicking on the Sign-Up button at the top right!
RapidAPI supports signing up using Google, Github, or Facebook.
Step 2: Connect to the Dino Ipsum API
Having signed up and logged in to RapidAPI, you would need to navigate to the Dino Ipsum API page on the RapidAPI platform to connect to the API.
You would need to further navigate to the Pricing Page of the Dino Ipsum API to connect to the API. On this page, clicking on the “Connect Now” button, would subscribe and connect your account to the Dino Ipsum API.
Step 3: Test the API Connection
Now that your account has been connected to the Dino Ipsum API, you can test the connection. You would need to navigate to the Dino Ipsum API page on the RapidAPI website.
To test API connection, please click on the “Test Endpoint” button. A successful connection would result in a “200 OK” response in the Results tab on this page.
Now that you have connected and tested the connection to the Dino Ipsum API, let’s learn more about its usage!
Dino Ipsum Endpoints
The Dino Ipsum API has one endpoint – “dinos list
” to facilitate generation of dinosaur themed lorem ipsum text.
The Dinos List Endpoint: The endpoint returns the placeholder text based on the parameters requested by the user.
The three parameters required for sending a request to the endpoint are as follows:
format
– This refers to the expected output format of text, to be returned in the API response. The API supports “json”, “html” and “text” formats. The default format is set to “html”.words
– This refers to the expected number of words per paragraph, to be returned in the API response. The default number of words is set to 30.paragraphs
– This refers to the expected number of paragraphs, to be returned in the API response. The default number of paragraphs is set to 10.
How to use the Dino Ipsum API with Python
The following code snippet depicts the use of Dino Ipsum API with Python. It uses the “requests” library to send a GET request to the endpoint with the parameters specified in the “querystring” dictionary.
The “x-rapidapi-key
” value in the “headers” dictionary would need to be replaced with your actual key which can be obtained from the Dino Ipsum API page in the Header Parameters section.
import requests url = "https://alexnormand-dino-ipsum.p.rapidapi.com/" querystring = {"format":"html","words":"30","paragraphs":"30"} headers = { 'x-rapidapi-key': "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", 'x-rapidapi-host': "alexnormand-dino-ipsum.p.rapidapi.com" } response = requests.request("GET", url, headers=headers, params=querystring) print(response.text)
How to use the Dino Ipsum API with PHP
The following code snippet depicts the use of Dino Ipsum API with PHP. It uses the “curl” function of PHP to send a GET request to the endpoint with the parameters specified in the “CURLOPT_URL”.
The “x-rapidapi-key
” value in the “CURLOPT_HTTPHEADER” object would need to be replaced with your actual key which can be obtained from the Dino Ipsum API page in the Header Parameters section.
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://alexnormand-dino-ipsum.p.rapidapi.com/?format=html&words=30¶graphs=30", CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "x-rapidapi-host: alexnormand-dino-ipsum.p.rapidapi.com", "x-rapidapi-key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
How to use the Dino Ipsum API with Ruby
The following code snippet depicts the use of Dino Ipsum API with Ruby. The “x-rapidapi-key
” value in the “request” object would need to be replaced with your actual key which can be obtained from the Dino Ipsum API page in the Header Parameters section.
require 'uri' require 'net/http' require 'openssl' url = URI("https://alexnormand-dino-ipsum.p.rapidapi.com/?format=html&words=30¶graphs=30") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["x-rapidapi-key"] = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx request["x-rapidapi-host"] = 'alexnormand-dino-ipsum.p.rapidapi.com' response = http.request(request) puts response.read_body
How to use the Dino Ipsum API with Javascript
The following code snippet depicts the use of Dino Ipsum API with Javascript. It uses JQuery’s “ajax” function to send a GET request to the endpoint with the parameters specified in the “settings” object.
The “x-rapidapi-key
” value in the “headers” object would need to be replaced with your actual key which can be obtained from the Dino Ipsum API page in the Header Parameters section.
const settings = { "async": true, "crossDomain": true, "url": "https://alexnormand-dino-ipsum.p.rapidapi.com/?format=html&words=30¶graphs=30", "method": "GET", "headers": { "x-rapidapi-key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "x-rapidapi-host": "alexnormand-dino-ipsum.p.rapidapi.com" } }; $.ajax(settings).done(function (response) { console.log(response); });
Dino Ipsum API Alternatives?
A few alternatives that generate placeholder text similar to the Dino Ipsum API are:
Summary
The Dino Ipsum API is a powerful tool to generate dinosaur-themed placeholder text for web designers and developers. The API thus enables its users to access dummy text on-demand, to prototype and visualize web pages without relying on the actual content for demonstration.
Rick says
Thanks for sharing such beautiful information with us. I hope you will share some more info about PHP Web apps
Please keep sharing!