Considering I just found out about this project a few days ago, I will assume that some may not be familiar with Sparks. Sparks is a new command line tool for CodeIgniter. For those familiar with Drush for drupal this seems very similar except not quite as complex. Sparks basically takes all of the leg work out of installing third party add-ons to CI. With a single command you can install libraries and have them ready to use.
If you haven't already I suggest going to http://getsparks.org/ and checking out the sparks that are available. Also if you have some good libraries consider porting those to sparks so that others can enjoy them. I have created sparks for both the youtube and dropbox api libraries. Once you have sparks installed it will be as simple as installing the youtube or dropbox spark then loading the spark and loading the library.
I would really like to see this project get even more notoriety than it already has so check out sparks.
Sunday, August 28, 2011
Sparks flew and emotions ran high.
Youtube API Changes (It's for the better trust me)
This weekend I updated the youtube API. Now most methods accept an array of parameters instead of only specifying the start and count. To clarify $start and $count are out, long live array()!
To give you an example of what I am talking about here is how a called to getUserUploads used to look if you were showing 10 videos per page and were on the second page.
This is how the call will looks now.
This gives way more flexibility, we can now use any of the parameters outlined here. Now using things like the alt parameter you could specify your return data as JSON for easier parsing and usage if XML isn't your thing.
Look through that list and see if any query parameters catch your eye but going forward this will be how to add additional parameters to your api calls.
To give you an example of what I am talking about here is how a called to getUserUploads used to look if you were showing 10 videos per page and were on the second page.
$this->youtube->getUserUploads('default', 11, 10);
This is how the call will looks now.
$this->youtube->getUserUploads('default', array('start-index'=>11, 'max-results'=>10));
This gives way more flexibility, we can now use any of the parameters outlined here. Now using things like the alt parameter you could specify your return data as JSON for easier parsing and usage if XML isn't your thing.
Look through that list and see if any query parameters catch your eye but going forward this will be how to add additional parameters to your api calls.
Subscribe to:
Posts (Atom)