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

Commit

Permalink
Merge pull request #173 from swarajpure/fix/saveClient-call
Browse files Browse the repository at this point in the history
fix(readme.md): change function calls in README.md for imgur v1
  • Loading branch information
kaimallea committed Apr 20, 2021
2 parents 6ec2fb2 + 6dd549a commit 84f6f40
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 84f6f40

Please sign in to comment.