From 806e0381085035d6d535835009934865fea90f5a Mon Sep 17 00:00:00 2001 From: Yuval Adam Date: Wed, 10 Jun 2015 14:35:14 +0300 Subject: Hooked up Instagram API call to reactive Session source --- client/button.js | 10 ++++++++++ client/templates/one.html | 7 +++++++ 2 files changed, 17 insertions(+) (limited to 'client') diff --git a/client/button.js b/client/button.js index bc3828b..1ab171e 100644 --- a/client/button.js +++ b/client/button.js @@ -15,6 +15,16 @@ Template.login.events({ } }); +Template.one.helpers({ + photos: function () { + return Session.get('photos'); + } +}) + Accounts.onLogin(function() { + Meteor.call('getInstagramMedia', function(error, results) { + console.log('Instagram response', results.data) + Session.set('photos', results.data.data); + }); Router.go('one'); }); diff --git a/client/templates/one.html b/client/templates/one.html index 740ade0..5956ccd 100644 --- a/client/templates/one.html +++ b/client/templates/one.html @@ -1,3 +1,10 @@ + + -- cgit v1.3.1