Socket
Book a DemoInstallSign in
Socket

@sl-code-lords/image-library

Package Overview
Dependencies
Maintainers
4
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sl-code-lords/image-library

image-library [unsplash || pixabay ] - API

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
909
4.72%
Maintainers
4
Weekly downloads
 
Created
Source

IMAGE-LIBRARY - API

📝 Table of Contents

  • About
  • Getting Started
  • Usage
  • Authors

🧐 About

API - Unsplash
API - Pixabay

🏁 Getting Started

This project was created using official API (Unsplash , Pixabay)

Installing

yarn add @sl-code-lords/image-library

or

npm i @sl-code-lords/image-library

🎈 Usage

const {unsplash, pixabay} = require("@sl-code-lords/image-library")

Unsplash - API

var result = await unsplash.search({"query": "nature", page: 1}) // page => Pagination
//result

{
  status: true,
  code_creator: { name: 'Sisula Welgamage', github: '@sisula' },
  base_url: 'https://unsplash.com/',
  total_results: 10016,
  total_pages: 334,
  result: [
    'https://unsplash.com/photos/ugnrXk1129g/download?ixid=M3w0ODA5NTZ8MHwxfHNlYXJjaHwxMjF8fG5hdHVyZXxlbnwwfHx8fDE2OTA1Mjg1ODV8MA',
    'https://unsplash.com/photos/v4bkVOl1sTI/download?ixid=M3w0ODA5NTZ8MHwxfHNlYXJjaHwxMjJ8fG5hdHVyZXxlbnwwfHx8fDE2OTA1Mjg1ODV8MA',
    'https://unsplash.com/photos/bm15OYOm-Gc/download?ixid=M3w0ODA5NTZ8MHwxfHNlYXJjaHwxMjN8fG5hdHVyZXxlbnwwfHx8fDE2OTA1Mjg1ODV8MA',
    'https://unsplash.com/photos/LNYdZutqsi0/download?ixid=M3w0ODA5NTZ8MHwxfHNlYXJjaHwxMjR8fG5hdHVyZXxlbnwwfHx8fDE2OTA1Mjg1ODV8MA',
    ... 25 more items
  ]

Pixabay - API

var result = await pixabay.search({"query": "nature", page: 3}) // page => Pagination
//result

{
  status: true,
  code_creator: { name: 'Sisula Welgamage', github: '@sisula' },
  base_url: 'https://pixabay.com/',
  total_results: 880522,
  total_pages: undefined,
  result: [
    'https://pixabay.com/get/gf8180d0a3d9ad4ca6861a3ded76a1a74d4df540e1f10e3ee8a8440924db766d73e138b885523e3340eb883ee3006fe127c59398c5641ae507ce4bf160d2b93d4_1280.jpg',
    'https://pixabay.com/get/g51a4bfb189347267f7576a99333e4b478ba0af5b95e069cde3fa5bbe575cc0c8d582a674b920d6156a1f5745bd7af596758c8a0b517ba7db08b26201ffb9355c_1280.jpg',
    ... 27 more items
  ]

✍️ Authors

See also the list of contributors who participated in this project.

Keywords

unsplash

FAQs

Package last updated on 28 Jul 2023

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.