Class Rettiwt

The class for accessing Twitter API.

The created Rettiwt instance can be configured by passing in a configuration object to the constructor.

For details regarding the available configuration options, refer to IRettiwtConfig

import { Rettiwt } from 'rettiwt-api';

// Creating a new Rettiwt instance
const rettiwt = new Rettiwt();
import { Rettiwt } from 'rettiwt-api';

// Creating a new Rettiwt instance
const rettiwt = new Rettiwt({ guestKey: 'GUEST_KEY' });
import { Rettiwt } from 'rettiwt-api';

// Creating a new Rettiwt instance
const rettiwt = new Rettiwt({ apiKey: 'API_KEY' });
import { Rettiwt } from 'rettiwt-api';

// Creating a new Rettiwt instance
const rettiwt = new Rettiwt({ apiKey: 'API_KEY', logging: true, proxyUrl: 'URL_TO_PROXY_SERVER' });

Constructors

Properties

Accessors

Constructors

Properties

The instance used to fetch data related to lists.

The instance used to fetch data related to tweets.

The instance used to fetch data related to users.

Accessors

  • set apiKey(apiKey: undefined | string): void

    Set the API key for the current instance.

    Parameters

    • apiKey: undefined | string

    Returns void

  • set headers(headers: { [key: string]: string }): void

    Set the custom headers for the current instance.

    Parameters

    • headers: { [key: string]: string }

    Returns void

  • set proxyUrl(proxyUrl: URL): void

    Set the proxy URL for the current instance.

    Parameters

    • proxyUrl: URL

    Returns void