twitter-profile-media

2.0.6 • Public • Published

twitter-profile-media Build Status

Get twitter profile image and banner

Install

npm install --save twitter-profile-media

Usage

import media from 'twitter-profile-media';
import tokens from 'twitter-tokens';
 
media(tokens, 'twitter').then(({ image, banner }) => {
  image;  // https://pbs.twimg.com/profile_images/615680132565504000/EIpgSD2K.png
  banner; // https://pbs.twimg.com/profile_banners/783214/1436401887
});

API

media(tokens, username)

Return a promise that resolves to user profile image and banner.

tokens

Type: object

Valid twitter tokens (dev credentials). You can use twitter-tokens to simplify getting tokens.

username

Type: string

Twitter username.

Related

License

MIT

Package Sidebar

Install

npm i twitter-profile-media

Weekly Downloads

4

Version

2.0.6

License

MIT

Last publish

Collaborators

  • andrepolischuk