Closed TheUltimateAbsol closed 11 months ago
@TheUltimateAbsol What is the data that you are trying to fetch?
basic user info and tweets from a user
rettiwt.user.details('username')
.then(details => {
console.log(details)
})
.catch(error => {
console.error("error fetching details")
})
rettiwt.tweet.search({
fromUsers: ['username'],
})
.then(data => {
console.log(data)
})
.catch(err => {
console.error("help I failed")
})
But the aforementioned error occurs before I get to that code. I am using NodeJS 18.14.2
@TheUltimateAbsol I need the username whose tweets you are trying to fetch to reproduce the error
@Rishikant181 alkalinedd
const rettiwt = Rettiwt(API_KEY);
Oops, this a minor mistake in my documentation.
This is the proper way to initialize a new Rettiwt instance:
const rettiwt = new Rettiwt(API_KEY);
Ok, this is probably just my stupidity, but I can't seem to initialize the module for the love of me.
All I have done is just done these lines
whereas
some-cookie-value
is the value of thecookie
line from the cli commandlogin <email> <username> <password>
using the Rettiwt-Auth package globally. (The CRSF token and the Bearer token were discarded... did I need these for something...?)What am I doing wrong here? This is where I get called out for not being a javascript dev I guess...