fetch-instagram
A lightweight and universal Instagram API client for Node and your browser.
Installation & Usage
Install via npm or yarn:
npm install fetch-instagram --save
yarn add fetch-instagram
Create an instance with your Instagram access token:
import ig from 'fetch-instagram';
const instagram = ig({
accessToken: '1234567890.12345ab.1234567890abcdef1234567890abcdef',
});
Simple fetch of your user data and media:
const users = instagram.users();
users.then(res => console.log(res));
const media = instagram.media();
users.then(res => console.log(res));
API
ig()
import ig from 'fetch-instagram';
ig(options: {
accessToken: string
});
users()
import { users } from 'fetch-instagram';
users(options: {
accessToken: string,
id: string,
});
media()
import { media } from 'fetch-instagram';
media(options: {
accessToken: string,
id: string,
size: number,
type: 'recent'|'liked',
});
License
Licensed under the MIT License, Copyright © 2017 Glenn Reyes. See LICENSE for more information.