Internal
Optional
config: IRettiwtConfigThe config object for configuring the Rettiwt
instance.
Protected
Optional
Readonly
authThe URL to the proxy server to use only for authentication.
Protected
Optional
Readonly
userThe id of the authenticated user (if any).
Login to twitter as guest.
A new guest key.
import { Rettiwt } from 'rettiwt-api';
// Creating a new Rettiwt instance
const rettiwt = new Rettiwt();
// Logging in an getting a new guest key
rettiwt.auth.guest()
.then(guestKey => {
// Use the guest key
...
})
.catch(err => {
console.log(err);
});
Login to twitter using account credentials.
The email id associated with the Twitter account.
The username associated with the Twitter account.
The password to the Twitter account.
The API_KEY
for the Twitter account.
import { Rettiwt } from 'rettiwt-api';
// Creating a new Rettiwt instance
const rettiwt = new Rettiwt();
// Logging in an getting the API_KEY
rettiwt.auth.login("email@domain.com", "username", "password")
.then(apiKey => {
// Use the API_KEY
...
})
.catch(err => {
console.log(err);
});
Interchanging email
and userName
works too.
Makes an HTTP request according to the given parameters.
The type of the returned response data.
The requested resource.
The raw data response received.
Fetching the raw details of a user with username 'user1'
import { FetcherService, EResourceType } from 'rettiwt-api';
// Creating a new FetcherService instance using the given 'API_KEY'
const fetcher = new FetcherService({ apiKey: API_KEY });
// Fetching the details of the User with username 'user1'
fetcher.request(EResourceType.USER_DETAILS_BY_USERNAME, { id: 'user1' })
.then(res => {
console.log(res);
})
.catch(err => {
console.log(err);
})
Static
decodeStatic
encodeStatic
getGenerated using TypeDoc
The services that handles authentication.