A simple multi platform Node.js library to interact with the Infinite Craft API.
You can install the library via npm from GitHub:
npm install git+https://github.com/ActiveTutorial/ic-proxy.gitimport { pair, check } from 'ic-proxy';
(async () => {
try {
const pairResult = await pair('Water', 'Fire');
console.log('Pair Result:', pairResult);
const checkResult = await check('Fire', 'Water', 'Steam');
console.log('Check Result:', checkResult);
} catch (error) {
console.error('Error:', error);
}
})();- Description: Retrieves a pair result from the Infinite Craft API.
- Parameters:
first(string): The first item.second(string): The second item.
- Returns: A promise that resolves to an object with
result,emoji, andisNewproperties. If the API returns an error (HTTP 500), the object will be{ result: null, emoji: null, isNew: false }.
- Description: Validates a result from the Infinite Craft API for a given pair of items.
- Parameters:
first(string): The first item.second(string): The second item.result(string): The expected result.
- Returns: A promise that resolves to an object with
validandemojiproperties. If the API returns an error (HTTP 500), the object will be{ valid: false, emoji: null }.
This project is licensed under the MIT License. See the LICENSE file for details.