Rishikant181 / Rettiwt-API

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

account.login() - TypeError: Option value must be an Array. #319

Closed archy-bold closed 1 year ago

archy-bold commented 1 year ago

HI there, thanks for the update to this project. I've got v1.3.0 but I'm getting the following error when logging in.

import { Rettiwt } from "rettiwt-api";

// ...

const auth = await Rettiwt().account.login("email", "username", "password");
[project_dir]/node_modules/node-libcurl/lib/Curl.ts:450
    const code = this.handle.setOpt(optionIdOrName, value)
                             ^
TypeError: Option value must be an Array.
    at Curl.setOpt ([project_dir]/node_modules/node-libcurl/lib/Curl.ts:450:30)
    at curly ([project_dir]/node_modules/node-libcurl/lib/curly.ts:295:18)
    at Function.curly.<computed> [as post] ([project_dir]/node_modules/node-libcurl/lib/curly.ts:542:13)
    at AccountService.<anonymous> ([project_dir]/node_modules/rettiwt-api/src/services/auth/AccountService.ts:63:40)
    at step ([project_dir]/node_modules/rettiwt-api/dist/services/auth/AccountService.js:33:23)
    at Object.next ([project_dir]/node_modules/rettiwt-api/dist/services/auth/AccountService.js:14:53)
    at fulfilled ([project_dir]/node_modules/rettiwt-api/dist/services/auth/AccountService.js:5:58)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
Rishikant181 commented 1 year ago

@archy-bold The issue has been fixed in v1.3.1 (a silly mistake on my part tbh). Please update to the latest version.

I apologize for the inconvenience.

archy-bold commented 1 year ago

No apology needed. This is a superb project and you're doing great work! Thanks so much.