Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

album-cover-url

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

album-cover-url

Get the URL for an album cover

  • 2.2.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

album-cover-url

Get the URL for an album cover from Bandcamp, SoundCloud, or Apple

Setup

In Google Cloud Platform console

  • Create a new Project, called something like "album-cover-url apple"
  • Find and enable the "Custom Search API" (Enabled APIs & Services)
  • Generate an API key (Create Credentials -> API Key), optionally restricting to "Custom Search API" access.
  • Repeat x 2, naming projects "album-cover-url bandcamp", "album-cover-url soundcloud" (names don't matter, but just so you know what they are)

Usage

CLI

copy .config.json.example to .config.json, fill with Google Cloud Platform API keys

$ node cli.js "Khruangbin" "Mordechai"
Searching for album cover URL for: { artist: 'Khruangbin', album: 'Mordechai' }
{
  url: 'https://is5-ssl.mzstatic.com/image/thumb/Music115/v4/94/a7/44/94a74465-1fe9-b897-a1ed-99b2e5b3b497/656605149363.jpg/1500x0w.png',
  source: 'apple'
}

Node module

const getAlbumCoverUrl = require("album-cover-url");

getAlbumCoverUrl.API_KEY_CONFIG = {
	APPLE_GOOGLE_SEARCH_API_KEY: "YOUR_API_KEY",
	BANDCAMP_GOOGLE_SEARCH_API_KEY: "YOUR_API_KEY",
	SOUNDCLOUD_GOOGLE_SEARCH_API_KEY: "YOUR_API_KEY",
};

getAlbumCoverUrl({ artist: "Khruangbin", album: "Mordechai" })
	.then((url) => {
		console.log(url);
		process.exit(0);
	})
	.catch((err) => {
		console.error(err);
		process.exit(1);
	});

FAQs

Package last updated on 09 Jul 2022

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