Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@albion-data/client
Advanced tools
Readme
This is helpful package for working with the Albion Data Project API, this is the initial release and feature set / docs are a bit limited right now.
There is a basic demo app that shows off how to use the methods to make a bags price lookup app in ReactJS. The code can be viewed on the GitHub repo and the app can be viewed on the GitHub Pages.
Supports:
yarn add @albion-data/client
import { getChartData } from "@albion-data/client";
getChartData({
itemList: "T5_BAG",
})
.then((data) => console.log(data))
.catch((err) => console.error(err));
All methods currently end in either Raw
or Data
, the Raw
methods directly return the entire axios promise while the Data
ones process the returned data to append UTC timezone flag to date strings and only returns the JSON data.
Fetch the chart data from the Charts/
API
// getChartRaw - Axios Promis
// getChartData - Promise<TChart>
getChartData({
itemList: "T5_BAG", // Array of strings or string - required
startDate: new Date(), // Date or date string
endDate: new Date(), // Date or date string
locations: "Fort Sterling", // Array of string or string
qualities: [1,2] // Array of numbers or number
timeScale: 1 // number 1 - 6
})
Fetch the gold data from the Gold/
API
// getGoldRaw - Axios Promis
// getGoldData - Promise<TGold>
// No Required fields, but count to limit total results is suggested
getGoldData({
startDate: new Date(), // Date or date string
endDate: new Date(), // Date or date string
count: 10, // number
});
Fetch the price data from the Price/
API
// getPriceRaw - Axios Promis
// getPriceData - Promise<TPrice>
getPriceData({
itemList: ["T5_BAG", "T6_BAG"], // Array of strings or string - required
locations: ["Fort Sterling", "Thetford"], // Array of string or string
qualities: 2, // Array of numbers or number
});
Generate icon URLs for the Albion Render API, user must provide item identifier or the localized name and locale.
getItemIconUrl({
identifier: "T4_OFF_SHIELD", // String indentifier of item, like
quality: 2, // Number repersenting the quality of the item (see QUALITIES_ENUM)
size: 50, // Sets width and height in px
});
// Return: https://render.albiononline.com/v1/item/T4_OFF_SHIELD.png
getSpellIconUrl({
identifier: "HASTE",
});
getDestinyBoardIconUrl({
identifier: "ADVENTURER_ADEPT",
});
Get the localized name and descirption for an item using the item id.
getItemLocale({
identifier: "T4_OFF_SHIELD", // String indentifier of item, like
locale: "en-US", // Optional, defaults to en-US
});
// Example response
{
"id":"T4_OFF_SHIELD",
"name":"Adept's Shield",
"description":"Equipment Item"
}
This repo exports everything export from @albion-data/types, here are some extra helpful types to know about.
// QUALITIES_ENUM - Maps all enum quality numbers to string values
QUALITIES_ENUM[1]; // Normal
QUALITIES_ENUM[2]; // Good
// or generate the number used for the API call
QUALITIES_ENUM.Outstanding; // 3
// ENCHANTMENTS_ENUM - Maps enchantments to numbers, useful for parsing the API resaponse
ENCHANTMENTS_ENUM[0]; // Normal
ENCHANTMENTS_ENUM.Exceptional; // 3
// cityList - An array of all cities in the game
// marketList - An array of all markets in the game (cities + Black Market right now)
// TItemID - ALL item IDs in the game mapped to 1 TypeScript type.
// Example:
improt { TItemID } from "@albion-data/client"
FAQs
Albion Online Data Client
The npm package @albion-data/client receives a total of 4 weekly downloads. As such, @albion-data/client popularity was classified as not popular.
We found that @albion-data/client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.