Skip to content

Commit

Permalink
Adds example to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Step7750 committed Dec 14, 2017
1 parent 2b84dd2 commit 98ad678
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@ Example URL: https://steamcdn-a.akamaihd.net/apps/730/icons/econ/stickers/cologn

### `npm install csgo-cdn`

#### See example.js
```javascript
const SteamUser = require('steam-user');
const csgoCDN = require('csgo-cdn');

const user = new SteamUser();
const cdn = new csgoCDN(user, {logLevel: 'debug'});

cdn.on('ready', () => {
console.log(cdn.getItemNameURL('M4A4 | 龍王 (Dragon King) (Field-Tested)'));
});
```

## Methods

Expand Down
4 changes: 2 additions & 2 deletions example.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const SteamUser = require('steam-user');
const SteamTotp = require('steam-totp');
const CSGOStickers = require('./index');
const csgoCDN = require('./index');

const cred = {
username: 'USERNAME',
Expand All @@ -9,7 +9,7 @@ const cred = {
};

const user = new SteamUser({enablePicsCache: true});
const csgo = new CSGOStickers(user, {musicKits: true, cases: true, tools: true, statusIcons: true, logLevel: 'debug'});
const csgo = new csgoCDN(user, {musicKits: true, cases: true, tools: true, statusIcons: true, logLevel: 'debug'});

csgo.on('ready', () => {
console.log(csgo.getStickerURL('cologne2016/astr_gold', false));
Expand Down

0 comments on commit 98ad678

Please sign in to comment.