New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fetch-the-parrot

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fetch-the-parrot

Javascript library for fetching PartyParrot(s)

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

fetch-the-parrot

A small JS client to handle fetching the ever-loved Party Parrots (of all varieties).

Mega parrot!

Installation

NPM

npm i fetch-the-parrot --save

Yarn

yarn add fetch-the-parrot

Basic examples

ES5
var getParrotGif = require('fetch-the-parrot').getParrotGif;

var parrot = getParrotGif({
  'name': 'Parrot',
  'res': 'hd',
  'path': 'http://my-parrot-website.com/parrots/'
})

console.log(parrot)

/* Result */
http://my-parrot-website.com/parrots/parrots/hd/parrot.gif
ES6
import getParrotGif from 'fetch-the-parrot'

getParrotGif({
  'name': 'Fiesta Parrot',
  'path': 'http://my-parrot-website.com/parrots/'
}, gif => {
  console.log(gif)

  /* Result */
  http://my-parrot-website.com/parrots/parrots/fiestaparrot.gif
})

Usage

This library exposes 3 methods in total.

So far we've seen getParrotGif in the above snippets, but getParrotsJSON & searchParrotsByName are also available. Let's run over all 3 methods in more detail:

  • getParrotGif(options, callback): This is the primary (default) method, used to return a partyparrot's gif URL.

    • options object

      • name string: Party parrot's name, case insensitive (use names as labelled here).

      • res string: The resolution for our gif, sd (default) or hd. Note, not all party parrots have HD support, in the case of a hd request on an "sd-only" parrot, the SD version will be returned.

      • path string: Optional string to set the path of where the party parrot images are located.

    • callback(gif) function: Returns the gif URL if successful.

  • getParrotsJSON(callback): Returns the main json object of all parrots.

    • callback(data) function: Returns json object if successful.
  • searchParrotsByName(name, callback): Returns the single object for a parrot.

    • name string: Name, case insensitive, of the parrot we're searching for (use names as labelled here).

    • callback(data) function: Returns json object for queried parrot if successful.

Also worth checking out

Keywords

FAQs

Package last updated on 12 Aug 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc