Skip to content
This repository has been archived by the owner on Dec 30, 2021. It is now read-only.

Commit

Permalink
fix(readme.md): change function calls in README.md for imgur v1
Browse files Browse the repository at this point in the history
saveClient function expects two arguments and according to the documentation, we were passing only
one which resulted in errors.

fix #162
  • Loading branch information
swarajpure committed Apr 18, 2021
1 parent 6ec2fb2 commit 6dd549a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,21 @@ const imgur = require('imgur');
#### Dealing with client IDs:

```javascript
// Change this cliend id to your own.
const clientId = 'aCs53GSs4tga0ikp';

// Setting
imgur.setClientId('aCs53GSs4tga0ikp');
imgur.setClientId(clientId);

// Getting
imgur.getClientId();

// You can specify path or keep it null. Defaults to ~/.imgur
const path = null;

// Saving to disk. Returns a promise.
// NOTE: path is optional. Defaults to ~/.imgur
imgur
.saveClientId(path)
.saveClientId(clientId, path)
.then(() => {
console.log('Saved.');
})
Expand All @@ -117,7 +122,6 @@ imgur
});

// Loading from disk
// NOTE: path is optional. Defaults to ~/.imgur
imgur.loadClientId(path).then(imgur.setClientId);
```

Expand Down

0 comments on commit 6dd549a

Please sign in to comment.