= itrigga-admin_api_client Wraps API calls to iTrigga Applications Each API call requires an :api_key. All calls to the api module also require either a :site or :site_id Other calls many require different params. If these are not provided then an exception is raised. Example: Trigga::AdminApiClient.get_stats(:api_key => "fDhtXwx8_Mpx9evOsxXf") Hits this endpoint: http://localhost:3000/admin/stats.json?api_key=fDhtXwx8_Mpx9evOsxXf And returns: { "api_calls" => 149, "max_item_id" => 218, "max_source_id" => 10, "item_counts" => { "aggregated" => 1, "editorial" => 22 }, "status_code" => 200, "max_scheduled_job_id" => 1252 } Each call will return results as a Mash. Each call will return a :status_code (normally 200 for when it went ok, else an error code eg 500) If an error occurs a Mash will be returned like: { "status_code" => 500, "error" => "500 Error description goes in here" } With the HTTP status_code from the remote call and the exception message. == Installation === Rails2: gem install itrigga-admin_api_client Put this in the config/environment.rb file: config.gem 'itrigga-admin_api_client', :lib => 'trigga/admin_api_client' === Rails3: Put this in the Gemfile: gem 'itrigga-admin_api_client', :lib => 'trigga/admin_api_client' Run 'bundle install' == Contributing to itrigga-admin_api_client * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it * Fork the project * Start a feature/bugfix branch * Commit and push until you are happy with your contribution * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally. * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it. == Copyright Copyright (c) 2011 Anson. See LICENSE.txt for further details.