Skip to content

Instantly share code, notes, and snippets.

@tylergaw
Created May 18, 2015 02:26
Show Gist options
  • Select an option

  • Save tylergaw/1f9d2599c930a3a645cc to your computer and use it in GitHub Desktop.

Select an option

Save tylergaw/1f9d2599c930a3a645cc to your computer and use it in GitHub Desktop.
Jribbble Shots Example 001
<ul class="shots"></ul>
// NOTE: Don't use this token, replace it with your own client access token.
$.jribbble.setToken('f688ac519289f19ce5cebc1383c15ad5c02bd58205cd83c86cbb0ce09170c1b4');
$.jribbble.shots('debuts', {
'per_page': 36,
'timeframe': 'month',
'sort': 'views'
}).then(function(res) {
var html = [];
res.forEach(function(shot) {
html.push('<li class="shots--shot">');
html.push('<a href="' + shot.html_url + '" target="_blank">');
html.push('<img src="' + shot.images.normal + '">');
html.push('</a></li>');
});
$('.shots').html(html.join(''));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment