Skip to content

twitter-lite client stream method always defaults to api version 1.1 #178

@SaltedCaramelCoffee

Description

@SaltedCaramelCoffee

I'm trying to use twitter-lite with API v2. It looks like the stream method calls getUrl method with the subdomain stream, but never passes in the endpoint version, which makes it always default to 1.1.

The line of code that caused this issue:

url: `${getUrl('stream')}/${resource}${this.config.extension ? '.json' : ''}`,

I think the solution is to just pass in this.config.version as second parameter to getUrl. Let me know if you think there's a better way to resolve this. I'm happy to make the pull request to fix this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions