From 646f00aa9bf4bc5c54a1c188c6cbf373cc84743f Mon Sep 17 00:00:00 2001 From: Mark Pitman Date: Tue, 23 Sep 2025 17:22:06 -0700 Subject: [PATCH] Make it clearer in README that the project is archived --- README-ARCHIVED.md | 148 ++++++++++++++++++++++++++++++++++++++++++ README.md | 157 ++++----------------------------------------- 2 files changed, 161 insertions(+), 144 deletions(-) create mode 100644 README-ARCHIVED.md diff --git a/README-ARCHIVED.md b/README-ARCHIVED.md new file mode 100644 index 0000000..d5a59c0 --- /dev/null +++ b/README-ARCHIVED.md @@ -0,0 +1,148 @@ +# Getty Images API Java SDK + +## This codebase has been retired as of 2025-04-11 + +_The project has been archived and no new releases will be made. That means no +new features, no security updates and no bug fixes._ + +## Introduction +This SDK makes using the Getty Images [API](http://developers.gettyimages.com) easy. It handles credential management, makes HTTP requests and is written with a fluent style in mind. For more info about the API, see the [Documentation](https://developers.gettyimages.com/api/). + +* Search for images and videos from our extensive creative and editorial catalogs. +* Get image and video metadata. +* Download files using your Getty Images products (e.g., Editorial subscriptions, Easy Access, Thinkstock Subscriptions, and Image Packs). +* Custom Request functionality that allows user to call any endpoint. + +## Help & Support + +* [Getty Images API](http://developers.gettyimages.com/) +* [Issue Tracker](https://github.com/gettyimages/gettyimages-api_java/issues) + +## Minimum Requirements + +* You have Java JDK 8 or above installed. +* You have [Maven](https://maven.apache.org/) installed + +## Getting Started + +### Obtain an API Key + +If you don't already have an API key, fill out and submit the [contact form](http://engage.gettyimages.com/api-contact) to be connected to our Sales team. + +### Installing the package + +The SDK is available on [maven central repository](https://search.maven.org/). +Include the following dependency in your pom.xml file: +```sh + + com.gettyimages + gettyimagesapi-sdk + X.X.X + +``` + +Install in your workspace with: +```sh +$ mvn install +``` + +## Examples + +### Search creative images with phrase, age of people, and page + +```java +String apiKey = "API Key"; +String apiSecret = "API Secret"; + +ApiClient client = ApiClient.GetApiClientWithClientCredentials(apiKey, apiSecret); + +try { + SearchImagesCreative search = client.searchimagescreative() + .withPhrase("cat") + .withAgeOfPeople(EnumSet.of(AgeOfPeople.CHILD, AgeOfPeople.BABY,AgeOfPeople.ADULT)) + .withPage(3); + String result = search.executeAsync(); + System.out.print(result); + +} catch (SdkException e) { + System.out.println("Exception occurred while searching for creative images: " + e.getLocalizedMessage()); + System.exit(-1); +} +``` + +### Search editorial videos with phrase, fields, format available, and exclude nudity + +```java +String apiKey = "API Key"; +String apiSecret = "API Secret"; + +ApiClient client = ApiClient.GetApiClientWithClientCredentials(apiKey, apiSecret); + +try { + SearchVideosEditorial search = client.searchvideoseditorial() + .withPhrase("cat") + .withResponseFields(Arrays.asList("allowed_use","caption")) + .withFormatAvailable(FormatAvailable.HD) + .withExcludeNudity(true); + String result = search.executeAsync(); + System.out.print(result); + +} catch (SdkException e) { + System.out.println("Exception occurred while searching for creative images: " + e.getLocalizedMessage()); + System.exit(-1); +} +``` + +### Search creative images with phrase, custom parameter, and customer header +```java +String apiKey = "API Key"; +String apiSecret = "API Secret"; + +ApiClient client = ApiClient.GetApiClientWithClientCredentials(apiKey, apiSecret); + +try { + SearchImagesCreative search = client.searchimagescreative() + .withPhrase("cat") + .withCustomParameter("safe_search", "true") + .withCustomHeader("gi-country-code", "CAN"); + String result = search.executeAsync(); + System.out.print(result); + +} catch (SdkException e) { + System.out.println("Exception occurred while searching for creative images: " + e.getLocalizedMessage()); + System.exit(-1); +} +``` + +### Custom Request to search images with phrase, fields, and age of people + +```java +String apiKey = "API Key"; +String apiSecret = "API Secret"; + +ApiClient client = ApiClient.GetApiClientWithClientCredentials(apiKey, apiSecret); + + Map params = new HashMap(); + params.put("phrase", "cat"); + params.put("fields", Arrays.asList("artist", "id")); + params.put("age_of_people", EnumSet.of(AgeOfPeople.NEWBORN,AgeOfPeople.BABY,AgeOfPeople.CHILD)); + + try { + CustomRequest search = client.customrequest() + .withMethod("GET") + .withRoute("/search/images") + .withQueryParameters(params); + String result = search.executeAsync(); + System.out.print(result); + + } catch (SdkException e) { + System.out.println("Exception occurred while searching for creative images: " + e.getLocalizedMessage()); + System.exit(-1); + } +``` + +For more examples, see unittests package. + +## `ApiClient` lifecycle + +In production applications, we recommend utilizing the `ApiClient` as a global singleton. This ensures that token caching is properly performed. diff --git a/README.md b/README.md index 28a6bd3..db89d2d 100644 --- a/README.md +++ b/README.md @@ -1,148 +1,17 @@ # Getty Images API Java SDK -## This codebase has ben retired as of 2025-04-11 - -_The project has been archived and no new releases will be made. That means no -new features, no security updates and no bug fixes._ - -## Introduction -This SDK makes using the Getty Images [API](http://developers.gettyimages.com) easy. It handles credential management, makes HTTP requests and is written with a fluent style in mind. For more info about the API, see the [Documentation](https://developers.gettyimages.com/api/). - -* Search for images and videos from our extensive creative and editorial catalogs. -* Get image and video metadata. -* Download files using your Getty Images products (e.g., Editorial subscriptions, Easy Access, Thinkstock Subscriptions, and Image Packs). -* Custom Request functionality that allows user to call any endpoint. - -## Help & Support - -* [Getty Images API](http://developers.gettyimages.com/) -* [Issue Tracker](https://github.com/gettyimages/gettyimages-api_java/issues) - -## Minimum Requirements - -* You have Java JDK 8 or above installed. -* You have [Maven](https://maven.apache.org/) installed - -## Getting Started - -### Obtain an API Key - -If you don't already have an API key, fill out and submit the [contact form](http://engage.gettyimages.com/api-contact) to be connected to our Sales team. - -### Installing the package - -The SDK is available on [maven central repository](https://search.maven.org/). -Include the following dependency in your pom.xml file: -```sh - - com.gettyimages - gettyimagesapi-sdk - X.X.X - -``` - -Install in your workspace with: -```sh -$ mvn install -``` - -## Examples - -### Search creative images with phrase, age of people, and page - -```java -String apiKey = "API Key"; -String apiSecret = "API Secret"; - -ApiClient client = ApiClient.GetApiClientWithClientCredentials(apiKey, apiSecret); - -try { - SearchImagesCreative search = client.searchimagescreative() - .withPhrase("cat") - .withAgeOfPeople(EnumSet.of(AgeOfPeople.CHILD, AgeOfPeople.BABY,AgeOfPeople.ADULT)) - .withPage(3); - String result = search.executeAsync(); - System.out.print(result); - -} catch (SdkException e) { - System.out.println("Exception occurred while searching for creative images: " + e.getLocalizedMessage()); - System.exit(-1); -} +```txt +*********************************************************** +***** ***** +***** This codebase has been retired as of 2025-04-11 ***** +***** ***** +***** The project has been archived and no new ***** +***** releases will be made. That means no new ***** +***** features, no security updates and no bug ***** +***** fixes. There will also be no support. If you ***** +***** decide to use the code, you are on your own. :) ***** +***** ***** +*********************************************************** ``` -### Search editorial videos with phrase, fields, format available, and exclude nudity - -```java -String apiKey = "API Key"; -String apiSecret = "API Secret"; - -ApiClient client = ApiClient.GetApiClientWithClientCredentials(apiKey, apiSecret); - -try { - SearchVideosEditorial search = client.searchvideoseditorial() - .withPhrase("cat") - .withResponseFields(Arrays.asList("allowed_use","caption")) - .withFormatAvailable(FormatAvailable.HD) - .withExcludeNudity(true); - String result = search.executeAsync(); - System.out.print(result); - -} catch (SdkException e) { - System.out.println("Exception occurred while searching for creative images: " + e.getLocalizedMessage()); - System.exit(-1); -} -``` - -### Search creative images with phrase, custom parameter, and customer header -```java -String apiKey = "API Key"; -String apiSecret = "API Secret"; - -ApiClient client = ApiClient.GetApiClientWithClientCredentials(apiKey, apiSecret); - -try { - SearchImagesCreative search = client.searchimagescreative() - .withPhrase("cat") - .withCustomParameter("safe_search", "true") - .withCustomHeader("gi-country-code", "CAN"); - String result = search.executeAsync(); - System.out.print(result); - -} catch (SdkException e) { - System.out.println("Exception occurred while searching for creative images: " + e.getLocalizedMessage()); - System.exit(-1); -} -``` - -### Custom Request to search images with phrase, fields, and age of people - -```java -String apiKey = "API Key"; -String apiSecret = "API Secret"; - -ApiClient client = ApiClient.GetApiClientWithClientCredentials(apiKey, apiSecret); - - Map params = new HashMap(); - params.put("phrase", "cat"); - params.put("fields", Arrays.asList("artist", "id")); - params.put("age_of_people", EnumSet.of(AgeOfPeople.NEWBORN,AgeOfPeople.BABY,AgeOfPeople.CHILD)); - - try { - CustomRequest search = client.customrequest() - .withMethod("GET") - .withRoute("/search/images") - .withQueryParameters(params); - String result = search.executeAsync(); - System.out.print(result); - - } catch (SdkException e) { - System.out.println("Exception occurred while searching for creative images: " + e.getLocalizedMessage()); - System.exit(-1); - } -``` - -For more examples, see unittests package. - -## `ApiClient` lifecycle - -In production applications, we recommend utilizing the `ApiClient` as a global singleton. This ensures that token caching is properly performed. +The archived README is [here](README-ARCHIVED.md) \ No newline at end of file