blob: a177eff87911944c0ee533b31c99ce98f160cccf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
Meteor.methods({
getInstagramMedia: function (year, month) {
this.unblock();
return Meteor.http.call('GET', 'https://api.instagram.com/v1/users/self/media/recent', {
'params': {
'access_token': Meteor.user().services.instagram.accessToken,
'min_timestamp': Math.round(Date.UTC(month==1?year-1:year, month==1?12:month-1) / 1000),
'max_timestamp': Math.round(Date.UTC(year, month) / 1000),
}
});
}
});
|