npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

eve-xmlapi

v0.0.6

Published

Node.js library for accessing Eve Online's XML API

Downloads

17

Readme

Eve-XMLAPI-Node

A Node.js package for fetching data from Eve Online's XML API.

Installing

npm install eve-xmlapi

Usage

var Eve = require('eve-xmlapi');
var eve = new Eve()

// Set your own User-Agent
eve.setUserAgent('eve-xmlapi-node/0.0.1 (git://github.com/jovon/eve-xmlapi-node.git)')

eve.setHost('api.testeveonline.com')// Default: 'api.eveonline.com'
eve.setApiKey({keyID: '', vCode: ''})

// With a callback
eve.serverStatus.fetch(function(err, data) {
	console.log(data)
})

// With a promise, add 'P' to the end of fetch.
eve.serverStatus.fetchP().then(function(data) {
	console.log(data)
}).catch(function(e){
	console.log(e)
})

// Set a cache: file, redis, or memory by default.	
// 'prefix' will be added to the beginning of each file.
eve.setCache('file', {path: '/tmp', prefix: ''}) 
//These 'path' and 'prefix' settings are default options and unnecessary.

	OR		
eve.setCache('redis', {port: 6379, host: '127.0.0.1'})  
//These 'port' and 'host' settings are default options and unnecessary


// If you don't like the format of the return JSON...	
//  Change all JSON responses
eve.transformAllResponses = function(resp){
	var results = {};
	results.eveapi = resp.eveapi.$
	results.cachedUntil = resp.eveapi.cachedUntil[0]
	results.currentTime = resp.eveapi.currentTime[0]
	if(resp.eveapi.result) results.result = resp.eveapi.result[0]
	return results
}

// Change a single resource's response
eve.serverStatus.transformResponseData = function(resp){
	resp.result.serverOpen = resp.result.serverOpen[0]
	resp.result.onlinePlayers = resp.result.onlinePlayers[0]
	return resp
}

// Important to note if you've used 'setApiKey', putting the keyID 
// and vCode into the parameters will override it.
eve.accountStatus.fetch({keyID: '123', vCode: '12345'}, callback)
eve.apiKeyInfo.fetch({keyID: '123', vCode: '12345'}, callback)
eve.blueprints.fetch({keyID: '1234', vCode: '12345', characterID: '123'}, 
	callback)
eve.calendarEventAttendees.fetch({keyID: '1234', vCode: '12345', 
	characterID: '123'}, callback)		
eve.callList.fetch({keyID: '123', vCode: '12345'}, callback)
eve.characterAffiliation.fetch({ids: ['123', '321']}, callback)
eve.characterInfo.fetch({keyID: '1234', vCode: '12345', characterID: '123'}, 
	callback)
eve.characterName.fetch({ids: ['123', '321']}, callback)
eve.characterID.fetch({names: ['CCP FoxFour', 'CCP Tellus']}, callback)	
eve.characters.fetch({keyID: '123', vCode: '12345'}, callback)	
eve.characterSheet.fetch({keyID: '1234', vCode: '12345', 
	characterID: '123'}, callback)	
eve.chatChannels.fetch({keyID: '1234', vCode: '12345', 
	characterID: '123'}, callback)
eve.contactList.fetch({keyID: '1234', vCode: '12345', 
	characterID: '123'}, callback)
eve.contactNotifications.fetch({keyID: '1234', vCode: '12345', 
	characterID: '123'}, callback)
eve.contractBids.fetch({keyID: '1234', vCode: '12345', characterID: '123'}, 
	callback)
eve.contractItems.fetch({keyID: '1234', vCode: '12345', characterID: '123', 
	contractID: '123'}, callback)
eve.contracts.fetch({keyID: '1234', vCode: '12345', characterID: '123'}, 
	callback) //contractID is optional	
eve.facWarStats.fetch({keyID: '1234', vCode: '12345', characterID: '123'}, 
	callback)
eve.mailingLists.fetch({keyID: '1234', vCode: '12345', characterID: '123'}, 
	callback)
eve.mailMessages.fetch({keyID: '1234', vCode: '12345', characterID: '123'}, 
	callback)		
eve.marketOrders.fetch({keyID: '1234', vCode: '12345', characterID: '123'}, 
	callback) // characterID and orderID optional
eve.skillQueue.fetch({keyID: '1234', vCode: '12345', 
	characterID: '123'}, callback)
eve.upcomingCalendarEvents.fetch({keyID: '1234', vCode: '12345',
	characterID: '123'}, callback)	

// char resources with matching corp resources that start with char
eve.charAccountBalance.fetch({keyID: '1234', vCode: '12345', 
	characterID: '123'}, 
	callback)
eve.charAssetList.fetch({keyID: '1234', vCode: '12345', characterID: '123'}, 
	callback)
eve.charBookmarks.fetch({keyID: '1234', vCode: '12345', characterID: '123'}, 
	callback)		
eve.charWalletJournal.fetch({keyID: '1234', vCode: '12345',
	characterID: '123'}, 
	callback)// accountKey, fromID and rowCount are optional		
eve.charWalletTransactions.fetch({keyID: '1234', vCode: '12345',
	characterID: '123'},
	callback)// accountKey, fromID and rowCount are optional

// corp resources
eve.corpAccountBalance.fetch({keyID: '1234', vCode: '12345', 
	characterID: '123'}, callback)
eve.corpBookmarks.fetch({keyID: '1234', vCode: '12345', characterID: '123'},
	callback)
eve.corpWalletJournal.fetch({keyID: '1234', vCode: '12345',
	characterID: '123', accountKey: '1002'},
	callback)// fromID and rowCount are optional
eve.corpWalletTransactions.fetch({keyID: '1234', vCode: '12345',
	characterID: '123', accountKey:'1001'},
	callback)// fromID and rowCount are optional

eve.allianceList.fetch(callback)
eve.conquerableStationList.fetch(callback)
eve.errorList.fetch(callback)
eve.refTypes.fetch(callback)
eve.typeName.fetch(callback)
eve.facWarSystems.fetch(callback)
eve.jumps.fetch(callback)
eve.kills.fetch(callback)
eve.sovereignty.fetch(callback)
eve.serverStatus.fetch(callback)

Development

git clone https://github.com/jovon/eve-xmlapi-node.git

cd eve-xmlapi-node

npm install

tsd install

Eve-xmlapi-node is written with Typescript 1.7.3.