Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No idea how to use #9

Open
arthurwolf opened this issue May 22, 2018 · 1 comment
Open

No idea how to use #9

arthurwolf opened this issue May 22, 2018 · 1 comment

Comments

@arthurwolf
Copy link

I've read both the readme and what I could understand of the source and I have no idea how to use this.
I've copy/pasted some of the code snippets from the readme and they do nothing. I have no idea how to extract/use either an answer or even just a token from this library. An example would be immensely helpful here. Just, something that does auth and gets any information from the user account and outputs it to console.log, with that I'd be able to figure out all of the rest out ( though an example of how to get/display an auth error would be perfect on top of that ).
Thanks a ton in advance.

@n6g7
Copy link
Owner

n6g7 commented May 23, 2018

Hello Arthur,

I take it you've tried the first example of the readme? (copied below for reference)

const Damn = require('damn');

const clientId = 1234
const clientSecret = 'thisissecret'

Damn.clientCredentials(clientId, clientSecret)
.then(damn => damn.getDailyDeviations())
.then(dailyDeviations => {
  console.log(dailyDeviations)
})

This used to work well last time I used it.

If this doesn't work anymore than I'm afraid that might mean DA's API has changed and this client no longer works.
I haven't used or maintained this project in a long time so that's a real possibility.

I don't have much time to spend on this project unfortunately so I don't think I'll be able to make fixes. However you're welcome to send any PRs for fixes, new features or documentation improvements; I'll gladly answer any question you may have and help however I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants