
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@albion-data/client
Advanced tools
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
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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.