npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

strapi-plugin-instagram-feed

v3.1.5

Published

Strapi plugin for scraping instagram feed

Downloads

24

Readme

strapi-plugin-instagram-feed

Installation

$ npm i strapi-plugin-instagram-feed

Example or

$ yarn add strapi-plugin-instagram-feed

Configurations

Base config

./config/plugins.js

module.exports = ({ env }) => ({
	'instagram-feed': {
		username: 'instagram',
		count: 4,
		fields: {
			shortcode: true,
			owner_id: true,
			date: true,
			comment_count: true,
			like_count: true,
			is_video: true,
			text: true,
			display_url: true,
			thumbnail: true,
			thumbnail_150x150: true,
			thumbnail_240x240: true,
			thumbnail_320x320: true,
			thumbnail_480x480: true,
			thumbnail_640x640: true,
		},
	},
});

Cron

Enable cron.

./config/server.js

module.exports = ({ env }) => ({
	host: env('HOST', '0.0.0.0'),
	port: env.int('PORT', 1337),
	cron: { enabled: true },
});

Add cron job for Instagram Feed.

./config/functions/cron.js

module.exports = {
	// At every 30th minute.
	'*/30 * * * *': () => {
		strapi.plugins['instagram-feed'].services[
			'instagram-feed'
		].fetchInstagramFeed();
	},
};

Example output

[
	{
		"shortcode": "CCq1D_cMYMF",
		"owner_id": "25025320",
		"date": "2020-07-15T16:20:02.000Z",
		"comment_count": 11924,
		"like_count": 1265280,
		"is_video": false,
		"text": "“My work is a form of play. It’s a way to lose myself in the landscape, to integrate more deeply with something bigger,” says artist Benjamin Everett (@bejamin). Benjamin constructs his painterly photographic landscapes from multiple images, and often many locations, from his travels around the world.⁣ ☁️⁣ “In the case of clouds, I may see a particular billowing curve or interesting shadowed shape. The cloud in this image is a combination of five or six individual cloud parts.” Overall, this image was made from 20 individual photos.⁣ ☁️⁣ “My favorite part of making art is the moment when the image seems to take over and I’m along for the ride. It’s like climbing or surfing. You know what mountain you’re on, or what kind of wave you’ve caught, but never too certain how it will turn out. Sometimes I don’t want the process to end because I don’t want the adventure to be over.”⁣ ☁️⁣ #ThisWeekOnInstagram⁣ ⁣ Photo illustration by @bejamin",
		"display_url": "https://instagram.fdnk1-1.fna.fbcdn.net/v/t51.2885-15/e35/p1080x1080/108328143_173046760861295_8394639393927238253_n.jpg?_nc_ht=instagram.fdnk1-1.fna.fbcdn.net&_nc_cat=1&_nc_ohc=e3DAn_I5uFMAX9JosyS&oh=bc89a2f0612a67f2761fec04f09bb60e&oe=5F396F7A",
		"thumbnail": "https://instagram.fdnk1-1.fna.fbcdn.net/v/t51.2885-15/sh0.08/e35/c0.169.1349.1349a/s640x640/108328143_173046760861295_8394639393927238253_n.jpg?_nc_ht=instagram.fdnk1-1.fna.fbcdn.net&_nc_cat=1&_nc_ohc=e3DAn_I5uFMAX9JosyS&oh=3fb799bae83d74fe394ffccb9700b57c&oe=5F38954E",
		"thumbnail_150x150": "https://instagram.fdnk1-1.fna.fbcdn.net/v/t51.2885-15/e35/c0.169.1349.1349a/s150x150/108328143_173046760861295_8394639393927238253_n.jpg?_nc_ht=instagram.fdnk1-1.fna.fbcdn.net&_nc_cat=1&_nc_ohc=e3DAn_I5uFMAX9JosyS&oh=2c1e0d0d31e7af8bd21d8da27838f94e&oe=5F3ADDFE",
		"thumbnail_240x240": "https://instagram.fdnk1-1.fna.fbcdn.net/v/t51.2885-15/e35/c0.169.1349.1349a/s240x240/108328143_173046760861295_8394639393927238253_n.jpg?_nc_ht=instagram.fdnk1-1.fna.fbcdn.net&_nc_cat=1&_nc_ohc=e3DAn_I5uFMAX9JosyS&oh=50112bdcf581d9700a3f33ebac5f1482&oe=5F3A9A7C",
		"thumbnail_320x320": "https://instagram.fdnk1-1.fna.fbcdn.net/v/t51.2885-15/e35/c0.169.1349.1349a/s320x320/108328143_173046760861295_8394639393927238253_n.jpg?_nc_ht=instagram.fdnk1-1.fna.fbcdn.net&_nc_cat=1&_nc_ohc=e3DAn_I5uFMAX9JosyS&oh=43006e2b3155f753b6f4b02c4ebd9205&oe=5F384806",
		"thumbnail_480x480": "https://instagram.fdnk1-1.fna.fbcdn.net/v/t51.2885-15/e35/c0.169.1349.1349a/s480x480/108328143_173046760861295_8394639393927238253_n.jpg?_nc_ht=instagram.fdnk1-1.fna.fbcdn.net&_nc_cat=1&_nc_ohc=e3DAn_I5uFMAX9JosyS&oh=2843a9778e7fd2050eb7f5815ad80550&oe=5F3949C3",
		"thumbnail_640x640": "https://instagram.fdnk1-1.fna.fbcdn.net/v/t51.2885-15/sh0.08/e35/c0.169.1349.1349a/s640x640/108328143_173046760861295_8394639393927238253_n.jpg?_nc_ht=instagram.fdnk1-1.fna.fbcdn.net&_nc_cat=1&_nc_ohc=e3DAn_I5uFMAX9JosyS&oh=3fb799bae83d74fe394ffccb9700b57c&oe=5F38954E"
	}
]