Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

battlenet-api

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

battlenet-api - npm Package Compare versions

Comparing version 0.2.4 to 0.3.0

lib/d3/data.js

8

lib/battlenet-api.js

@@ -30,7 +30,13 @@ /**

var d3 = {
data: require('./d3/data.js'),
profile: require('./d3/profile.js')
};
return {
wow: wow,
sc2: sc2
sc2: sc2,
d3: d3
};
})();

2

lib/wow/data.js

@@ -17,3 +17,3 @@ /**

origin: origin,
path: '/wow/data/battlegroups'
path: '/wow/data/battlegroups/'
}, callback);

@@ -20,0 +20,0 @@ },

@@ -5,3 +5,3 @@ {

"description": "A wrapper for the Battle.net API",
"version": "0.2.4",
"version": "0.3.0",
"homepage": "https://github.com/benweier/battlenet-api",

@@ -8,0 +8,0 @@ "license": "MIT",

@@ -60,5 +60,6 @@ # Battle.net API

* [Character](#wow-character)
* [Profile](#wow-character-profile)
* [Aggregate](#character-aggregate)
* [Achievements](#wow-character-achievements)
* [Appearance](#wow-character-appearance)
* [Audit](#wow-character-audit)
* [Guild](#wow-character-guild)

@@ -70,2 +71,3 @@ * [Hunter Pets](#wow-character-hunter-pets)

* [Pet Slots](#wow-character-pet-slots)
* [Profile](#wow-character-profile)
* [Progression](#wow-character-progression)

@@ -78,4 +80,2 @@ * [PVP](#wow-character-pvp)

* [Titles](#wow-character-titles)
* [Audit](#wow-character-audit)
* [Aggregate](#character-aggregate)
* [Data Resources](#wow-data)

@@ -93,2 +93,8 @@ * [Battlegroups](#wow-data-battlegroups)

* [Guild](#wow-guild)
* [Aggregate](#wow-guild-aggregate)
* [Achievements](#wow-guild-achievements)
* [Challenge](#wow-guild-challenge)
* [Members](#wow-guild-members)
* [News](#wow-guild-news)
* [Profile](#wow-guild-profile)
* [Item](#wow-item)

@@ -649,17 +655,21 @@ * [Item](#wow-item-item)

<a name="wow-guild-profile"></a>
#### Profile
<a name="wow-character-aggregate"></a>
#### Aggregate
Returns basic profile data of the guild.
Returns the specified guild fields aggregated in a single request.
*Parameters*
`fields` an array of one or more guild fields.
*Usage*
```javascript
bnet.wow.guild.profile({origin: 'us', realm: 'proudmoore', name: 'black wolf mercenaries'}, callback);
bnet.wow.guild.aggregate({origin: 'us', realm: 'proudmoore', name: 'black wolf mercenaries', fields: ['members', achievements]}, callback);
```
<a name="wow-guild-members"></a>
#### Members
<a name="wow-guild-achievements"></a>
#### Achievements
Returns the members data of the guild.
Returns the achievement data of the guild.

@@ -669,9 +679,9 @@ *Usage*

```javascript
bnet.wow.guild.members({origin: 'us', realm: 'proudmoore', name: 'black wolf mercenaries'}, callback);
bnet.wow.guild.achievements({origin: 'us', realm: 'proudmoore', name: 'black wolf mercenaries'}, callback);
```
<a name="wow-guild-achievements"></a>
#### Achievements
<a name="wow-guild-challenge"></a>
#### Challenge
Returns the achievement data of the guild.
Returns the challenge data of the guild.

@@ -681,5 +691,16 @@ *Usage*

```javascript
bnet.wow.guild.achievements({origin: 'us', realm: 'proudmoore', name: 'black wolf mercenaries'}, callback);
bnet.wow.guild.challenge({origin: 'us', realm: 'proudmoore', name: 'black wolf mercenaries'}, callback);
```
<a name="wow-guild-members"></a>
#### Members
Returns the members data of the guild.
*Usage*
```javascript
bnet.wow.guild.members({origin: 'us', realm: 'proudmoore', name: 'black wolf mercenaries'}, callback);
```
<a name="wow-guild-news"></a>

@@ -696,6 +717,6 @@ #### News

<a name="wow-guild-challenge"></a>
#### Challenge
<a name="wow-guild-profile"></a>
#### Profile
Returns the challenge data of the guild.
Returns basic profile data of the guild.

@@ -705,3 +726,3 @@ *Usage*

```javascript
bnet.wow.guild.challenge({origin: 'us', realm: 'proudmoore', name: 'black wolf mercenaries'}, callback);
bnet.wow.guild.profile({origin: 'us', realm: 'proudmoore', name: 'black wolf mercenaries'}, callback);
```

@@ -915,1 +936,96 @@

---
<a name="d3"></a>
## Diablo 3
The Diablo 3 API methods are available through the `d3` object of the Battle.net API.
```javascript
var d3 = bnet.d3;
```
**ALL** API methods take `origin` as one of the parameters. This indicates which regional API endpoint to use. The possible values are `us`, `eu`, `kr`, `tw`.
---
<a name="d3-data"></a>
### Data Resources
<a name="d3-data-artisan"></a>
#### Artisan
*Parameters*
`origin` [`us`, `eu`, `kr`, `tw`].
`artisan` the name of the artisan [`blacksmith`, `jeweller`, `mystic`]
*Usage*
```javascript
bnet.d3.data.artisan({origin: 'us', artisan: 'blacksmith'}, callback);
```
<a name="d3-data-follower"></a>
#### Follower
*Parameters*
`origin` [`us`, `eu`, `kr`, `tw`].
`artisan` the name of the follower [`templar`, `enchantress`, `scoundrel`]
*Usage*
```javascript
bnet.d3.data.artisan({origin: 'us', artisan: 'blacksmith'}, callback);
```
<a name="d3-data-item"></a>
#### Item
*Parameters*
`origin` [`us`, `eu`, `kr`, `tw`].
`item` the item data string.
*Usage*
```javascript
bnet.d3.data.item({origin: 'us', item: 'CrABCL-oudQGEgcIBBWZWjYNHWU61OAdyg3pEx07J28kHevi5AUd8dNq1TCLAjj_AkAAUBJYBGD_AmorCgwIABDX3bKmiICA4DESGwi5u5abChIHCAQVIpaumDCPAjgAQAFYBJABAGorCgwIABCl3rKmiICA4DESGwiR9M-gAhIHCAQVIpaumDCLAjgAQAFYBJABAIABRqUBOydvJK0Bj5DKULUBAXBvArgB9aCdsg7AAQEYsuqy0wFQAFgC'} callback);
```
---
<a name="d3-profile"></a>
### Profile
<a name="d3-profile-career"></a>
#### Career
*Parameters*
`origin` [`us`, `eu`, `kr`, `tw`].
`tag` the player's battle tag.
```javascript
bnet.d3.profile.career({origin: 'us', tag: 'skt-1884'}, callback);
```
<a name="d3-profile-hero"></a>
#### Hero
*Parameters*
`origin` [`us`, `eu`, `kr`, `tw`].
`tag` the player battle tag.
`hero` the hero ID.
```javascript
bnet.d3.profile.hero({origin: 'us', tag: 'skt-1884', hero: 287801}, callback);
```
---
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc