File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,23 @@ The only thing you'll need to get going is a valid __client id__ from Instagram'
81
81
- ` success ` (function) - A callback function called when Instagram returns valid data. (argument -> json object)
82
82
- ` error ` (function) - A callback function called when there is an error fetching images. (argument -> string message)
83
83
- ` mock ` (bool) - Set to true fetch data without inserting images into DOM. Use with __ success__ callback.
84
+ - ` filter ` (function) - A function used to exclude images from your results. The function will be
85
+ given the image data as an argument, and expects the function to return a boolean. See the example
86
+ below for more information.
87
+
88
+ __ Example Filter:__
89
+
90
+ ``` js
91
+ var feed = new Instafeed ({
92
+ filter : function (image ) {
93
+ // only display images with at least 10 likes
94
+ return image .likes .count >= 10 ;
95
+ }
96
+ });
97
+ feed .run ();
98
+ ```
99
+
100
+ To see a full list of properties that ` image ` has, see [ issue #21 ] ( https://github.com/stevenschobert/instafeed.js/issues/21 ) .
84
101
85
102
## Templating
86
103
@@ -151,6 +168,7 @@ This will install all the necessary test tools for testing. There is also a Make
151
168
__ 1.3.0__
152
169
153
170
- Image URLs are now protocol-relative by default. Use the new ` useHttp ` option to disable.
171
+ - Add the ability to filter out images using the ` filter ` option.
154
172
155
173
__ 1.2.1__
156
174
You can’t perform that action at this time.
0 commit comments