Sha256: e5f24f292ed1b03beeea4574877ffac4053cfc8f96e80ca142ec31b01fd149f5
Contents?: true
Size: 1.92 KB
Versions: 3
Compression:
Stored size: 1.92 KB
Contents
# GettyConnect An *un-official* ruby wrapper for the Getty Images [Connect API](https://api.gettyimages.com/apis). ![Getty Connect](https://api.gettyimages.com/sites/all/themes/getty_images/images/theme-developer_connect/Connect_logo.png "Getty Connect") ## Installation Add this line to your application's Gemfile: gem 'getty_connect' And then execute: $ bundle Or install it yourself as: $ gem install getty_connect ## Usage Examples ### Creating and configuring a client ```ruby GettyConnect.configure do |c| c.system_id = YOUR_SYSTEM_ID c.system_password = YOUR_SYSTEM_PASSWORD c.api_username = YOUR_API_USERNAME c.api_password = YOUR_API_PASSWORD end client = GettyConnect.new ``` ### Requesting an authentication token ```ruby client.request_token ``` With the duration of client.token_duration, tokens can be renewed with ```ruby client.renew_token ``` ### Search & Image Details ```ruby client.search("phrase", options={}) ``` e.g. to return 5 images of bears ```ruby client.search("bears", options={:item_count => 5} ``` search() will return a subset of image metadata. To retrieve all metadata for a particular asset use: ```ruby client.get_image_details(assetIds) ``` ### Retrieving Image URLs #### Preview images Options are _comp_, _preview_, _thumb_, _watermark_comp_, _watermark_preview_ ```ruby client.get_preview(["143895284", "143895289"], "thumb") ``` ## API Documentation Run the following command to generate documentation: rake doc:yard ## Not Yet Implemented * GetEvents * GetLargestImageDownloadAuthorizations ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Added some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request ## Inspiration Inspired by the [Twitter](https://github.com/jnunemaker/twitter) API gem. ## Copyright Copyright (c) 2012 Avos Systems Inc.
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
getty_connect-0.0.4 | README.md |
getty_connect-0.0.3 | README.md |
getty_connect-0.0.2 | README.md |