šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

owlbot-js

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

owlbot-js

A javascript client for the owlbot dictionary API.

2.0.3
latest
Source
npm
Version published
Maintainers
1
Created
Source

alt text

owlbot-js

CircleCI Coverage Status

OwlBot is an English dictionary API available on https://owlbot.info. This repository is a simple javascript client to fetch definitions of the words from the Owlbot API.

Quick start

First install the owlbot-js package.

npm install owlbot-js

Example Code:

var Owlbot = require('owlbot-js');
  
var client = Owlbot(YOUR_TOKEN);

client.define('owl').then(function(result){
   console.log(result);
});

In the example code, we've initiated the client object with a token. you can register for a token on https://owlbot.info.

Then on the client instance we called the define method to fetch the definitions of the word 'owl'. In the background, define method sends an ajax request to the API using the axios package. Since it's an asynchronous request, the define methos returns a Promiss.

result:
{ definitions:
   [ { type: 'noun',
       definition:
        'a nocturnal bird of prey with large eyes, a facial disc, a hooked beak, and typically a loud hooting call.',
       example:
        'I love reaching out into that absolute silence, when you can hear the owl or the wind.',
       image_url:
        'https://media.owlbot.info/dictionary/images/owl.jpg.400x400_q85_box-403,83,960,640_crop_detail.jpg',
       emoji: 'šŸ¦‰' } ],
  word: 'owl',
  pronunciation: 'oul' }


Keywords

Dictionary

FAQs

Package last updated on 15 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts