npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

imagdom

v1.0.2

Published

Returns aleatory image from https://pixabay.com/

Downloads

2

Readme

imagdom

Using imagdom:

npm install imagdom

Example

In order to get an ramdom image from https://pixabay.com/

const imagdom = require('imagdom');

const imgFilter = {
    findBy: 'yellow+flowers',
    lang: 'es',
    image_type: 'photo',
    orientations: 'vertical',
    caterory: 'nature'
}

const image = imagdom.getImage(imgFilter);

Parameters

imgFilter is not mandatory. It is available to use one of them, two or a combination all of them parameter | Description --- | --- findBy | str A URL encoded search term. If omitted, all images are returned. This value may not exceed 100 characters. Example: "yellow+flower" lang | str Language code of the language to be searched in. Accepted values: cs, da, de, en, es, fr, id, it, hu, nl, no, pl, pt, ro, sk, fi, sv, tr, vi, th, bg, ru, el, ja, ko, zh. Default: "en" image_type | str Filter results by image type. Accepted values: "all", "photo", "illustration", "vector". Default: "all" orientation | str Whether an image is wider than it is tall, or taller than it is wide. Accepted values: "all", "horizontal", "vertical" Default: "all" category | str Filter results by category. Accepted values: backgrounds, fashion, nature, science, education, feelings, health, people, religion, places, animals, industry, computer, food, sports, transportation, travel, buildings, business, music

Image object

You will recibe an object like object below

  picture: {
    id: 4335941,
    pageURL: 'https://pixabay.com/es/photos/equinoccio-de-primavera-4335941/',
    type: 'photo',
    tags: 'equinoccio de primavera, las flores de mayo, día de la mujer',
    previewURL: 'https://cdn.pixabay.com/photo/2019/07/13/23/53/spring-equinox-4335941_150.jpg',
    previewWidth: 100,
    previewHeight: 150,
    webformatURL: 'https://pixabay.com/get/ga77a6632bf956234082d48f5a899bf4f188a96271b3f4c0a44a5721966f330b1229583b1c5b55e8a1bdb55cb1d3b19a72e7c7472a27a5108a77146e2e6bb4598_640.jpg',
    webformatWidth: 426,
    webformatHeight: 640,
    largeImageURL: 'https://pixabay.com/get/g69139528adc87fadf11edadd1b40fb303d1f98e4e9fd848f97e3cb48c62f61ccd7a4c401e7be4e8d35331cb4b570466615b6199038a6c6f6daed95043553b5ea_1280.jpg',
    imageWidth: 3840,
    imageHeight: 5760,
    imageSize: 5893819,
    views: 17363,
    downloads: 6890,
    favorites: 89,
    likes: 99,
    comments: 12,
    user_id: 13030917,
    user: 'TemperateSage',
    userImageURL: 'https://cdn.pixabay.com/user/2019/07/13/23-01-25-947_250x250.jpg'
  }

Create a free account in Paxabay

To use pixabay it is mandatory to get a API_KEY. https://pixabay.com/ click Join

When you are logged you can find your api key on https://pixabay.com/api/docs/

Parameters

key | Your API key: XXXXX-XXXXX

Copy your api key and create an global variable in your .env file called

IMAGDOM_API_KEY = XXXXX-XXXXX