Code Monkey home page Code Monkey logo

gettyimages-api_java's Introduction

Getty Images Connect SDK

Seamlessly integrate Getty Images' expansive digital content, powerful search technology, and rich metadata into your publishing tools, products and services!

  • Search for images from our extensive creative and editorial catalogs.
  • Get image metadata.
  • Download files using your Getty Images products (e.g., Editorial subscriptions, Easy Access, Thinkstock Subscriptions, and Image Packs).

Assumptions

  • You have a Java SDK installed.
  • You have the latest Stand-alone Android Sdk installed. Install at least the Android 2.2 (API 8) Sdk.
  • You have IntelliJ IDEA >= 13 installed.
  • You have "Getty Test" credentials from http://api.gettyimages.com

IntelliJ Installation

Import the module into your project

File | Import Module...
Point to the ConnectSdk folder
Click on Next, Next, Next, Next, Reuse, then click Finish

Add the module dependency to your application

File | Project Structure...
Click on Modules
Click on your main application
Click on the Dependencies tab
Click on the + to add a Module Dependency to your main application
Click OK

Usage

Add a TextView control to your activity.

   <TextView
            android:id="@+id/textView"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="Hello World, MyActivity"
            />

Add the following code to your activity.

import com.gettyimages.connectsdk.ConnectSdk;

public class MyActivity extends Activity {

    private String apiKey = "Connect API Key";
    private String apiSecret = "Connect API Secret";
	...
    String result;

	ConnectSdk connectSdk = new ConnectSdk(apiKey, apiSecret);
	result = connectSdk.Search().Images().Creative().WithPhrase("dog").WithPage(10).ExecuteAsync();
	
	TextView textView = (TextView) findViewById(R.id.textView);
    textView.setText(result);
	...

Update the AndroidManifest.xml to include internet permissions.

 <uses-permission android:name="android.permission.INTERNET"/>

FAQ

  • If you get an error running the test application make sure that you are using your Getty Key and Secret in the code.
  • If you get "Failure [INSTALL_FALIED_OLDER_SDK]", you need to make sure that your minSdkVersion in the AndroidManifest.xml is less than the Target SDK of your AVD.

Contributing

  1. Fork it ( https://github.com/[my-github-username]/ConnectSdk/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

gettyimages-api_java's People

Contributors

caseymacpherson avatar danvallejo avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.