instagram-tagscrap-cache
v1.1.1
Published
cache a instagram's tag images useing instagram-tagscrap
Downloads
1
Readme
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
| config | required | etc | default | |:----------|:----------|:--------|:-------| | force | false | force update, ignore cache| false| | cacheTime | false | cached time | 3060| | aheadTime | false | enable caching time ahead of cached time | 560| | enableFirstTime | false | enable a loading at first time | false|
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