1.1.1 • Published 7 years ago

instagram-tagscrap-cache v1.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

instagram-tag-image


search media using tag name, and cache that using redis

initial

var InstagarmTagImage = require('instagram-tag-image')

var instagarmTagImage = new InstagarmTagImage({
  redis: {  
    //redis options
    port: 6379,
    host: '127.0.0.1'
  },
  config: {
    //optional, defaults
    force: false,
    cacheTime: 60*30,//30mins
    enableFirstTime: false
  }
})

CONFIGS

redis

config

configrequiredetcdefault
forcefalseforce update, ignore cachefalse
cacheTimefalsecached time30*60
aheadTimefalseenable caching time ahead of cached time5*60
enableFirstTimefalseenable a loading at first timefalse

useage

search media by tags

instagarmTagImage.getMedia(tag_name, function (err, result) {
// result.thumbnails()
// result.standard()
//result
})

warning

In case of first time in search by tag, return empty array, use enableFirstTime option