construct's avatar

Making api calls the right way

Please excuse the noob question, but I was wondering. When making a OAuth/CURL call to a service like youtube, vimeo, etc. Would the call me made from the model? or will the logic be inside a controller? I know that db logic should be inside a model but I have always been confused when it comes down to api calls.

0 likes
2 replies
SaeedPrez's avatar
Level 50

Or you could create a class called Youtube, then you could add methods like..

$yt = new Youtube('3werer4343');
$yt->getInfo();

Youtube::video('3werer4343')->getInfo();
5 likes

Please or to participate in this conversation.