From 2a6b5328dec0ef2200bdbb94b16e8531c7c071b2 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Mon, 10 Mar 2014 12:40:45 +0000 Subject: getting images from instagram --- json-instagram/src/exampleApp.cpp | 55 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 json-instagram/src/exampleApp.cpp (limited to 'json-instagram/src/exampleApp.cpp') diff --git a/json-instagram/src/exampleApp.cpp b/json-instagram/src/exampleApp.cpp new file mode 100644 index 0000000..0559dce --- /dev/null +++ b/json-instagram/src/exampleApp.cpp @@ -0,0 +1,55 @@ +#include "exampleApp.h" + +/* +so far so good, NOW + +threading + +parse response and identify new pictures +save pictures & metadata - rather than reloading each time? +local images format +do we need any metadata? I guess not other than to know the tag id +could save with the tag id as the name of file, simpler + +how exactly do we parse or mipmap the images +do we worry about memory - I guess not + +*/ + +//------------------------------------------------------------------------------ +void exampleApp::setup() +{ + ofSetFrameRate(24); + + std::string url = "https://api.instagram.com/v1/tags/tycleeson/media/recent?client_id=c1d74d701fdf4ddd9f8d30ee9e8f944b"; + + if (!response.open(url)) { + cout << "Failed to parse JSON\n" << endl; + } + //else cout<