Skip to content

Commit 6aa8bee

Browse files
committed
Adding sortBy none and adjusting sortBy most-recent to perform the most recent sort
1 parent 6dd494b commit 6aa8bee

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,13 @@ The only thing you'll need to get going is a valid __client id__ from Instagram'
5555
- `locationId` (number) - Unique id of a location to get. Use with `get: 'location'`.
5656
- `userId` (number) - Unique id of a user to get. Use with `get: 'user'`.
5757
- `sortBy` (string) - Sort the images in a set order. Available options are:
58-
- `most-recent` (default) - Newest to oldest.
58+
- `none` (default) - As they come from Instagram.
59+
- `most-recent` - Newest to oldest.
5960
- `least-recent` - Oldest to newest.
6061
- `most-liked` - Highest # of likes to lowest.
6162
- `least-liked` - Lowest # likes to highest.
6263
- `most-commented` - Highest # of comments to lowest.
63-
- `least-commented` - Lowest # of comments to hightest.
64+
- `least-commented` - Lowest # of comments to highest.
6465
- `random` - Random order.
6566
- `links` (bool) - Wrap the images with a link to the photo on Instagram.
6667
- `limit` (number) - Maximum number of Images to add. __Max of 60__.

instafeed.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

instafeed.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/instafeed.coffee

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class Instafeed
55
target: 'instafeed'
66
get: 'popular'
77
resolution: 'thumbnail'
8-
sortBy: 'most-recent'
8+
sortBy: 'none'
99
links: true
1010
limit: 15
1111
mock: false
@@ -89,7 +89,7 @@ class Instafeed
8989
@options.success.call(this, response)
9090

9191
# before images are inserted into the DOM, check for sorting
92-
if @options.sortBy isnt 'most-recent'
92+
if @options.sortBy isnt 'none'
9393
# if sort is set to random, don't check for polarity
9494
if @options.sortBy is 'random'
9595
sortSettings = ['', 'random']

0 commit comments

Comments
 (0)