We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello! Related to #1, I'm trying to get one gist by id in my rails application
document.addEventListener('turbolinks:load', function() { if ($('.gist-link')) { let GistClient = require("gist-client") let gistClient = new GistClient() $('.gist-link').each(function() { let gistId = $(this).attr('href').split('/').pop() console.log(gistId) gistClient.getOneById(gistId) .then(response => { console.log('RESPONSE') console.log(response) }).catch(err => { console.log('ERROR') console.log(err) }) }) } })
but i get error Uncaught Error: You need to set token before by setToken() method
Uncaught Error: You need to set token before by setToken() method
I checked source code of lib, and find next lines in gist-client/lib/gistClient.js:
this.getOneById = (gistId) => { _checkToken() return request(_getBaseConfiguredResource(API_DOMAIN + `/gists/${gistId}`)) .then(res => { return res.data }) }
getOneById function check token every time, when i try to get gist by id. I think this is a bug, right?
Best Regards!
The text was updated successfully, but these errors were encountered:
@pozabil I have the same problem. Have you solved it?
Sorry, something went wrong.
@romatoom
No, I just decided to use another library ( https://github.com/k33g/gh3 ), but install latest version from git master using bower dependencies.
But u can use this library, just downoad source code, and modified issued file.
No branches or pull requests
Hello! Related to #1, I'm trying to get one gist by id in my rails application
but i get error
Uncaught Error: You need to set token before by setToken() method
I checked source code of lib, and find next lines in gist-client/lib/gistClient.js:
getOneById function check token every time, when i try to get gist by id. I think this is a bug, right?
Best Regards!
The text was updated successfully, but these errors were encountered: