
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
apileague-js
Advanced tools
ApileagueJs - JavaScript client for apileague-js API League is a Hub for World Class APIs. This SDK is automatically generated by the OpenAPI Generator project:
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install apileague-js --save
Finally, you need to build the module:
npm run build
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json
(and this README). Let's call this JAVASCRIPT_CLIENT_DIR
. Then run:
npm install
Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR
:
npm link
To use the link you just defined in your project, switch to the directory you want to use your apileague-js from, and run:
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
Finally, you need to build the module:
npm run build
If the library is hosted at a git repository, e.g.https://github.com/ddsky/api-league-clients/tree/master/javascript/ then install it via:
npm install ddsky/api-league-clients/tree/master/javascript/ --save
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
Please follow the installation instruction and execute the following JS code:
var ApileagueJs = require('apileague-js');
var defaultClient = ApileagueJs.ApiClient.instance;
// Configure API key authorization: apiKey
var apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix['api-key'] = "Token"
// Configure API key authorization: headerApiKey
var headerApiKey = defaultClient.authentications['headerApiKey'];
headerApiKey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//headerApiKey.apiKeyPrefix['x-api-key'] = "Token"
var api = new ApileagueJs.ArtApi()
var url = "https://upload.wikimedia.org/wikipedia/commons/3/35/Basic_human_drawing.png"; // {String} The URL to the image.
var opts = {
'width': 200, // {Number} The maximum width of the image (default 400, max. 500).
'height': 200 // {Number} The maximum height of the image (default 400, max. 500).
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.imageToAsciiArtByURLAPI(url, opts, callback);
All URIs are relative to https://api.apileague.com
Class | Method | HTTP request | Description |
---|---|---|---|
ApileagueJs.ArtApi | imageToAsciiArtByURLAPI | GET /convert-image-to-ascii-txt | Image to Ascii Art by URL API |
ApileagueJs.ArtApi | randomPoemAPI | GET /retrieve-random-poem | Random Poem API |
ApileagueJs.BooksApi | findSimilarBooksAPI | GET /list-similar-books | Find Similar Books API |
ApileagueJs.BooksApi | searchBooksAPI | GET /search-books | Search Books API |
ApileagueJs.FoodApi | computeNutritionAPI | GET /compute-nutrition | Compute Nutrition API |
ApileagueJs.FoodApi | retrieveRecipeInformationAPI | GET /retrieve-recipe | Retrieve Recipe Information API |
ApileagueJs.FoodApi | searchDrinksAPI | GET /search-drinks | Search Drinks API |
ApileagueJs.FoodApi | searchRecipesAPI | GET /search-recipes | Search Recipes API |
ApileagueJs.FoodApi | searchRestaurantsAPI | GET /search-restaurants | Search Restaurants API |
ApileagueJs.HumorApi | generateNonsenseWordAPI | GET /generate-nonsense-word | Generate Nonsense Word API |
ApileagueJs.HumorApi | randomJokeAPI | GET /retrieve-random-joke | Random Joke API |
ApileagueJs.HumorApi | randomMemeAPI | GET /retrieve-random-meme | Random Meme API |
ApileagueJs.HumorApi | searchGifsAPI | GET /search-gifs | Search Gifs API |
ApileagueJs.HumorApi | searchJokesAPI | GET /search-jokes | Search Jokes API |
ApileagueJs.HumorApi | searchMemesAPI | GET /search-memes | Search Memes API |
ApileagueJs.KnowledgeApi | randomQuoteAPI | GET /retrieve-random-quote | Random Quote API |
ApileagueJs.KnowledgeApi | randomRiddleAPI | GET /retrieve-random-riddle | Random Riddle API |
ApileagueJs.KnowledgeApi | randomTriviaAPI | GET /retrieve-random-trivia | Random Trivia API |
ApileagueJs.MathApi | convertUnitsAPI | GET /convert-units | Convert Units API |
ApileagueJs.MediaApi | detectMainImageColorAPI | GET /detect-color | Detect Main Image Color API |
ApileagueJs.MediaApi | rescaleImageAPI | GET /rescale-image | Rescale Image API |
ApileagueJs.MediaApi | searchIconsAPI | GET /search-icons | Search Icons API |
ApileagueJs.MediaApi | searchRoyaltyFreeImagesAPI | GET /search-images | Search Royalty Free Images API |
ApileagueJs.MediaApi | vectorSearchAPI | GET /search-vectors | Vector Search API |
ApileagueJs.NewsApi | extractNewsAPI | GET /extract-news | Extract News API |
ApileagueJs.NewsApi | searchNewsAPI | GET /search-news | Search News API |
ApileagueJs.NewsApi | topNewsAPI | GET /retrieve-top-news | Top News API |
ApileagueJs.StorageApi | readKeyValueFromStoreAPI | GET /read-key-value | Read Key Value from Store API |
ApileagueJs.StorageApi | storeKeyValueGETAPI | GET /store-key-value | Store Key Value (GET) API |
ApileagueJs.TextApi | correctSpellingAPI | GET /correct-spelling | Correct Spelling API |
ApileagueJs.TextApi | detectGenderByNameAPI | GET /detect-gender | Detect Gender by Name API |
ApileagueJs.TextApi | detectLanguageAPI | GET /detect-language | Detect Language API |
ApileagueJs.TextApi | detectSentimentAPI | GET /detect-sentiment | Detect Sentiment API |
ApileagueJs.TextApi | extractDatesAPI | GET /extract-dates | Extract Dates API |
ApileagueJs.TextApi | extractEntitiesAPI | GET /extract-entities | Extract Entities API |
ApileagueJs.TextApi | listWordSynonymsAPI | GET /list-synonyms | List Word Synonyms API |
ApileagueJs.TextApi | pluralizeWordAPI | GET /pluralize-word | Pluralize Word API |
ApileagueJs.TextApi | scoreReadabilityAPI | GET /score-readability | Score Readability API |
ApileagueJs.TextApi | scoreTextAPI | GET /score-text | Score Text API |
ApileagueJs.TextApi | singularizeWordAPI | GET /singularize-word | Singularize Word API |
ApileagueJs.TextApi | stemTextAPI | GET /stem-text | Stem Text API |
ApileagueJs.TextApi | tagPartOfSpeechAPI | GET /tag-pos | Tag Part of Speech API |
ApileagueJs.WebApi | extractAuthorsAPI | GET /extract-authors | Extract Authors API |
ApileagueJs.WebApi | extractContentFromAWebPageAPI | GET /extract-content | Extract Content from a Web Page API |
ApileagueJs.WebApi | extractPublishDateAPI | GET /extract-publish-date | Extract Publish Date API |
ApileagueJs.WebApi | retrievePageRankAPI | GET /retrieve-page-rank | Retrieve Page Rank API |
ApileagueJs.WebApi | searchWebAPI | GET /search-web | Search Web API |
ApileagueJs.WebApi | verifyEmailAddressAPI | GET /verify-email | Verify Email Address API |
Authentication schemes defined for the API:
FAQs
API League is a Hub for World Class APIs.
The npm package apileague-js receives a total of 0 weekly downloads. As such, apileague-js popularity was classified as not popular.
We found that apileague-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.