Rishikant181 / Rettiwt-API

A CLI tool and an API for fetching data from Twitter for free!
https://rishikant181.github.io/Rettiwt-API/
MIT License
303 stars 31 forks source link

Broken tweet list #546

Closed gratatouilley closed 1 month ago

gratatouilley commented 1 month ago

Hi,

I'm new to this package and tried TweetService (list)

const fetchAllTweets = (id: string) => {
  rettiwt.tweet
    .list(id)
    .then((data) => console.log(data))
    .catch((err) => console.log(err));
}

And received error:

TypeError: Cannot read properties of undefined (reading 'value')
    at new CursoredData (/Documents/github/tweet-watcher/node_modules/rettiwt-api/src/models/data/CursoredData.ts:35:84)
    at Object.LIST_TWEETS (/Documents/github/tweet-watcher/node_modules/rettiwt-api/src/collections/Extractors.ts:40:3)
    at TweetService.<anonymous> (/Documents/github/tweet-watcher/node_modules/rettiwt-api/src/services/public/TweetService.ts:201:36)
    at step (/Documents/github/tweet-watcher/node_modules/rettiwt-api/dist/services/public/TweetService.js:59:23)
    at Object.next (/Documents/github/tweet-watcher/node_modules/rettiwt-api/dist/services/public/TweetService.js:40:53)
    at fulfilled (/Documents/github/tweet-watcher/node_modules/rettiwt-api/dist/services/public/TweetService.js:31:58)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

Is this a known issues or any solution for this?

Looking forward for the answer xoxo^^

Rishikant181 commented 1 month ago

This is not intended behavior. Can you try this with logging on and post the logs?

gratatouilley commented 1 month ago

Here is the logging

Code:

const fetchAllTweets = (id: string) => {
  rettiwt.tweet
    .list(id, 100)
    .then((data) => console.log(data))
    .catch((err) => console.log(err));
}

Screenshot 2024-05-28 at 13 02 42

Rishikant181 commented 1 month ago

image

It seems that tweet list doesn't exist.

gratatouilley commented 1 month ago

My bad, I just realized that the function is referring to Twitter List. I used to use the function for retrieve user's tweet lists.

Appreciated for the super quick response. Have a nice day!!^^

Rishikant181 commented 1 month ago

Thanks for the feedback tho, I noticed another legit bug where a cursor error thrown when the given tweet list is invalid :P