summaryrefslogtreecommitdiff
path: root/server/methods.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/methods.js')
-rw-r--r--server/methods.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/methods.js b/server/methods.js
index f91546e..a177eff 100644
--- a/server/methods.js
+++ b/server/methods.js
@@ -1,9 +1,11 @@
Meteor.methods({
- getInstagramMedia: function () {
+ 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
+ '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),
}
});
}