morsel-api
v2.0.2
Published
Morsel api node.js package.
Downloads
30
Maintainers
Readme
Morsel API Client
Overview
The Morsel API Client provides functions to interact with various APIs, including Apple App Store, Google Play Store, Deezer, Spotify, and more. This client allows you to fetch data from different sources.
Installation
To get started, you need to install the morsel-api
library:
npm install morsel-api
MorselAPI Class
The MorselAPI
class provides various methods to interact with different APIs. Below are the available methods and their usage examples.
Getting Started
First, import the MorselAPI
class and create an instance:
const MorselAPI = require('morsel-api');
const api = new MorselAPI();
Available Methods
Apple App Store Search Searches for apps on the Apple App Store.
const results = await api.appleAppStoreSearch('Instagram', 5, 'US', 'en_us'); console.log(results);
Apple Store Search Searches for products on the Apple Store.
const results = await api.appleStoreSearch('MacBook Pro', 'en'); console.log(results);
Aoi.js Functions Search Searches for Aoi.js functions.
const results = await api.aoijsFunctionsSearch('sendMessage', 5); console.log(results);
Brawl Stars User Info Fetches information about a specified Brawl Stars user.
const info = await api.brawlstarsUserInfo('USER_ID'); console.log(info);
Color Info Retrieves information about a given color.
const info = await api.colorInfo('#ff5733'); console.log(info);
Deezer Search Searches for music on Deezer.
const results = await api.deezerSearch('Daft Punk', 'track'); console.log(results);
Discord User Info Fetches information about a specified Discord user.
const info = await api.discordUserInfo('USER_ID'); console.log(info);
Earthquake Search Searches for earthquake data.
const results = await api.earthquakeSearch(34.0, 36.0, 25.0, 27.0); console.log(results);
Exchange Rate Calculates the exchange rate between two currencies.
const rate = await api.exchangeRate(100, 'USD', 'EUR'); console.log(rate);
Fitness Calorie Needs Calculates daily calorie needs based on provided parameters.
const calories = await api.fitnessCalorieNeeds('male', 25, 180, 70, 'active'); console.log(calories);
Gender Detection Predicts gender based on a given name.
const gender = await api.detectGender('John'); console.log(gender);
Song Search Searches for songs.
const results = await api.songSearch('Shape of You'); console.log(results);
YouTube Search Performs a search on YouTube.
const results = await api.youtubeSearch('JavaScript Tutorials', 'videos'); console.log(results);
Genius Artist Info Fetches information about an artist on Genius.
const info = await api.geniusArtistInfo('Eminem'); console.log(info);
GitHub Search Performs a search on GitHub.
const results = await api.githubSearch('axios', 5, 'repositories'); console.log(results);
GitHub User Info Fetches information about a specified GitHub user.
const info = await api.githubUserInfo('octocat'); console.log(info);
Google Image Search Performs an image search on Google.
const results = await api.googleImageSearch('sunsets', true); console.log(results);
Google Play Store Search Searches for apps on the Google Play Store.
const results = await api.googlePlaystoreSearch('Facebook', 5); console.log(results);
Google Trends Fetches Google trends for a specified date and country.
const trends = await api.googleTrends('2024-08-01', 'US'); console.log(trends);
Historical Events Fetches historical events for a specified date.
const events = await api.historicalEvents('2024-08-01'); console.log(events);
Instagram User Info Fetches information about a specified Instagram user.
const info = await api.instagramUserInfo('instagram'); console.log(info);
IP Geolocation Fetches the geographical location of an IP address.
const location = await api.ipGeolocation('8.8.8.8'); console.log(location);
iTunes Search Searches for songs on iTunes.
const results = await api.appleItunesSearch('Adele'); console.log(results);
Minecraft Server Status Checks the status of a Minecraft server.
const status = await api.minecraftServerStatus('mc.hypixel.net'); console.log(status);
Movie Info Fetches information about a specified movie.
const info = await api.movieInfo('Inception'); console.log(info);
Movie Search Searches for movies.
const results = await api.movieSearch('Inception'); console.log(results);
NBA Player Info Fetches information about an NBA player.
const info = await api.nbaPlayerInfo('LeBron James'); console.log(info);
News Fetches current news for a specified country.
const articles = await api.news('tr'); console.log(articles);
NPM Package Info Fetches information about an NPM package.
const info = await api.npmPackageInfo('axios'); console.log(info);
NPM Package Search Searches for NPM packages.
const results = await api.npmPackageSearch('axios', 5); console.log(results);
Password Generator Generates a random password based on provided criteria.
const password = await api.passwordGenerate(12, true, true, true, true); console.log(password);
Random User Fetches random user information.
const users = await api.randomUser('female', 'us', 5); console.log(users);
Recipes Searches for recipes based on the provided criteria.
const recipes = await api.recipes('pasta', 'italian', 3); console.log(recipes);
Reverse Text Reverses the given text.
const reversed = await api.reverseText('Hello World'); console.log(reversed);
Roblox User Search Searches for users on Roblox.
const results = await api.robloxUserSearch('RobloxUser', 5); console.log(results);
Song Suggestion Suggests songs based on mood or genre.
const songs = await api.songSuggestion('happy', 'pop', 5); console.log(songs);
SoundCloud Search Performs a search on SoundCloud.
const results = await api.soundcloudSearch('lofi beats'); console.log(results);
Spotify Search Searches for songs on Spotify.
const results = await api.spotifySearch('Blinding Lights'); console.log(results);
Steam Game Info Fetches information about a specified game on Steam.
const gameInfo = await api.steamGameInfo('Counter-Strike: Global Offensive'); console.log(gameInfo);
Steam Search Searches for games on Steam.
const results = await api.steamSearch('Half-Life'); console.log(results);
TikTok User Info Fetches information about a specified TikTok user.
const userInfo = await api.tiktokUserInfo('tiktokuser'); console.log(userInfo);
Translate Translates the given text into a target language.
const translation = await api.translate('Hello, world!', 'tr', 'en'); console.log(translation);
Trendyol Search Searches for products on Trendyol.
const products = await api.trendyolSearch('laptop', 1000, 5000); console.log(products);
URL Detector Checks if a given URL is malicious.
const result = await api.urlDetector('https://example.com'); console.log(result);
Wattpad Search Searches for stories on Wattpad.
const stories = await api.wattpadSearch('romance', 5, 'en', false); console.log(stories);
Weather Fetches weather information for a specified location.
const weather = await api.weather('Istanbul', 3); console.log(weather);
Wikipedia Search Performs a search on Wikipedia.
const results = await api.wikipediaSearch('JavaScript', 'en'); console.log(results);
WHD Indicator Fetches World Health Data (WHD) indicator information.
const data = await api.whdIndicator('life_expectancy'); console.log(data);
YouTube Search Searches for videos on YouTube.
const songs = await api.youtubeSearch('Mr Beast', 'videos'); console.log(songs);
YouTube Music Search Searches for music on YouTube Music.
const songs = await api.youtubeMusicSearch('lofi', 'tracks'); console.log(songs);
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.