Skip to content
This repository was archived by the owner on Sep 24, 2025. It is now read-only.

Commit 2a8dcc5

Browse files
authored
Merge pull request #28 from gettyimages/update-readme
Make it clearer in README that the project is archived
2 parents ca62069 + 646f00a commit 2a8dcc5

2 files changed

Lines changed: 161 additions & 144 deletions

File tree

README-ARCHIVED.md

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
# Getty Images API Java SDK
2+
3+
## This codebase has been retired as of 2025-04-11
4+
5+
_The project has been archived and no new releases will be made. That means no
6+
new features, no security updates and no bug fixes._
7+
8+
## Introduction
9+
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/).
10+
11+
* Search for images and videos from our extensive creative and editorial catalogs.
12+
* Get image and video metadata.
13+
* Download files using your Getty Images products (e.g., Editorial subscriptions, Easy Access, Thinkstock Subscriptions, and Image Packs).
14+
* Custom Request functionality that allows user to call any endpoint.
15+
16+
## Help & Support
17+
18+
* [Getty Images API](http://developers.gettyimages.com/)
19+
* [Issue Tracker](https://github.com/gettyimages/gettyimages-api_java/issues)
20+
21+
## Minimum Requirements
22+
23+
* You have Java JDK 8 or above installed.
24+
* You have [Maven](https://maven.apache.org/) installed
25+
26+
## Getting Started
27+
28+
### Obtain an API Key
29+
30+
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.
31+
32+
### Installing the package
33+
34+
The SDK is available on [maven central repository](https://search.maven.org/).
35+
Include the following dependency in your pom.xml file:
36+
```sh
37+
<dependency>
38+
<groupId>com.gettyimages</groupId>
39+
<artifactId>gettyimagesapi-sdk</artifactId>
40+
<version>X.X.X</version>
41+
</dependency>
42+
```
43+
44+
Install in your workspace with:
45+
```sh
46+
$ mvn install
47+
```
48+
49+
## Examples
50+
51+
### Search creative images with phrase, age of people, and page
52+
53+
```java
54+
String apiKey = "API Key";
55+
String apiSecret = "API Secret";
56+
57+
ApiClient client = ApiClient.GetApiClientWithClientCredentials(apiKey, apiSecret);
58+
59+
try {
60+
SearchImagesCreative search = client.searchimagescreative()
61+
.withPhrase("cat")
62+
.withAgeOfPeople(EnumSet.of(AgeOfPeople.CHILD, AgeOfPeople.BABY,AgeOfPeople.ADULT))
63+
.withPage(3);
64+
String result = search.executeAsync();
65+
System.out.print(result);
66+
67+
} catch (SdkException e) {
68+
System.out.println("Exception occurred while searching for creative images: " + e.getLocalizedMessage());
69+
System.exit(-1);
70+
}
71+
```
72+
73+
### Search editorial videos with phrase, fields, format available, and exclude nudity
74+
75+
```java
76+
String apiKey = "API Key";
77+
String apiSecret = "API Secret";
78+
79+
ApiClient client = ApiClient.GetApiClientWithClientCredentials(apiKey, apiSecret);
80+
81+
try {
82+
SearchVideosEditorial search = client.searchvideoseditorial()
83+
.withPhrase("cat")
84+
.withResponseFields(Arrays.asList("allowed_use","caption"))
85+
.withFormatAvailable(FormatAvailable.HD)
86+
.withExcludeNudity(true);
87+
String result = search.executeAsync();
88+
System.out.print(result);
89+
90+
} catch (SdkException e) {
91+
System.out.println("Exception occurred while searching for creative images: " + e.getLocalizedMessage());
92+
System.exit(-1);
93+
}
94+
```
95+
96+
### Search creative images with phrase, custom parameter, and customer header
97+
```java
98+
String apiKey = "API Key";
99+
String apiSecret = "API Secret";
100+
101+
ApiClient client = ApiClient.GetApiClientWithClientCredentials(apiKey, apiSecret);
102+
103+
try {
104+
SearchImagesCreative search = client.searchimagescreative()
105+
.withPhrase("cat")
106+
.withCustomParameter("safe_search", "true")
107+
.withCustomHeader("gi-country-code", "CAN");
108+
String result = search.executeAsync();
109+
System.out.print(result);
110+
111+
} catch (SdkException e) {
112+
System.out.println("Exception occurred while searching for creative images: " + e.getLocalizedMessage());
113+
System.exit(-1);
114+
}
115+
```
116+
117+
### Custom Request to search images with phrase, fields, and age of people
118+
119+
```java
120+
String apiKey = "API Key";
121+
String apiSecret = "API Secret";
122+
123+
ApiClient client = ApiClient.GetApiClientWithClientCredentials(apiKey, apiSecret);
124+
125+
Map params = new HashMap();
126+
params.put("phrase", "cat");
127+
params.put("fields", Arrays.asList("artist", "id"));
128+
params.put("age_of_people", EnumSet.of(AgeOfPeople.NEWBORN,AgeOfPeople.BABY,AgeOfPeople.CHILD));
129+
130+
try {
131+
CustomRequest search = client.customrequest()
132+
.withMethod("GET")
133+
.withRoute("/search/images")
134+
.withQueryParameters(params);
135+
String result = search.executeAsync();
136+
System.out.print(result);
137+
138+
} catch (SdkException e) {
139+
System.out.println("Exception occurred while searching for creative images: " + e.getLocalizedMessage());
140+
System.exit(-1);
141+
}
142+
```
143+
144+
For more examples, see unittests package.
145+
146+
## `ApiClient` lifecycle
147+
148+
In production applications, we recommend utilizing the `ApiClient` as a global singleton. This ensures that token caching is properly performed.

README.md

Lines changed: 13 additions & 144 deletions
Original file line numberDiff line numberDiff line change
@@ -1,148 +1,17 @@
11
# Getty Images API Java SDK
22

3-
## This codebase has ben retired as of 2025-04-11
4-
5-
_The project has been archived and no new releases will be made. That means no
6-
new features, no security updates and no bug fixes._
7-
8-
## Introduction
9-
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/).
10-
11-
* Search for images and videos from our extensive creative and editorial catalogs.
12-
* Get image and video metadata.
13-
* Download files using your Getty Images products (e.g., Editorial subscriptions, Easy Access, Thinkstock Subscriptions, and Image Packs).
14-
* Custom Request functionality that allows user to call any endpoint.
15-
16-
## Help & Support
17-
18-
* [Getty Images API](http://developers.gettyimages.com/)
19-
* [Issue Tracker](https://github.com/gettyimages/gettyimages-api_java/issues)
20-
21-
## Minimum Requirements
22-
23-
* You have Java JDK 8 or above installed.
24-
* You have [Maven](https://maven.apache.org/) installed
25-
26-
## Getting Started
27-
28-
### Obtain an API Key
29-
30-
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.
31-
32-
### Installing the package
33-
34-
The SDK is available on [maven central repository](https://search.maven.org/).
35-
Include the following dependency in your pom.xml file:
36-
```sh
37-
<dependency>
38-
<groupId>com.gettyimages</groupId>
39-
<artifactId>gettyimagesapi-sdk</artifactId>
40-
<version>X.X.X</version>
41-
</dependency>
42-
```
43-
44-
Install in your workspace with:
45-
```sh
46-
$ mvn install
47-
```
48-
49-
## Examples
50-
51-
### Search creative images with phrase, age of people, and page
52-
53-
```java
54-
String apiKey = "API Key";
55-
String apiSecret = "API Secret";
56-
57-
ApiClient client = ApiClient.GetApiClientWithClientCredentials(apiKey, apiSecret);
58-
59-
try {
60-
SearchImagesCreative search = client.searchimagescreative()
61-
.withPhrase("cat")
62-
.withAgeOfPeople(EnumSet.of(AgeOfPeople.CHILD, AgeOfPeople.BABY,AgeOfPeople.ADULT))
63-
.withPage(3);
64-
String result = search.executeAsync();
65-
System.out.print(result);
66-
67-
} catch (SdkException e) {
68-
System.out.println("Exception occurred while searching for creative images: " + e.getLocalizedMessage());
69-
System.exit(-1);
70-
}
3+
```txt
4+
***********************************************************
5+
***** *****
6+
***** This codebase has been retired as of 2025-04-11 *****
7+
***** *****
8+
***** The project has been archived and no new *****
9+
***** releases will be made. That means no new *****
10+
***** features, no security updates and no bug *****
11+
***** fixes. There will also be no support. If you *****
12+
***** decide to use the code, you are on your own. :) *****
13+
***** *****
14+
***********************************************************
7115
```
7216

73-
### Search editorial videos with phrase, fields, format available, and exclude nudity
74-
75-
```java
76-
String apiKey = "API Key";
77-
String apiSecret = "API Secret";
78-
79-
ApiClient client = ApiClient.GetApiClientWithClientCredentials(apiKey, apiSecret);
80-
81-
try {
82-
SearchVideosEditorial search = client.searchvideoseditorial()
83-
.withPhrase("cat")
84-
.withResponseFields(Arrays.asList("allowed_use","caption"))
85-
.withFormatAvailable(FormatAvailable.HD)
86-
.withExcludeNudity(true);
87-
String result = search.executeAsync();
88-
System.out.print(result);
89-
90-
} catch (SdkException e) {
91-
System.out.println("Exception occurred while searching for creative images: " + e.getLocalizedMessage());
92-
System.exit(-1);
93-
}
94-
```
95-
96-
### Search creative images with phrase, custom parameter, and customer header
97-
```java
98-
String apiKey = "API Key";
99-
String apiSecret = "API Secret";
100-
101-
ApiClient client = ApiClient.GetApiClientWithClientCredentials(apiKey, apiSecret);
102-
103-
try {
104-
SearchImagesCreative search = client.searchimagescreative()
105-
.withPhrase("cat")
106-
.withCustomParameter("safe_search", "true")
107-
.withCustomHeader("gi-country-code", "CAN");
108-
String result = search.executeAsync();
109-
System.out.print(result);
110-
111-
} catch (SdkException e) {
112-
System.out.println("Exception occurred while searching for creative images: " + e.getLocalizedMessage());
113-
System.exit(-1);
114-
}
115-
```
116-
117-
### Custom Request to search images with phrase, fields, and age of people
118-
119-
```java
120-
String apiKey = "API Key";
121-
String apiSecret = "API Secret";
122-
123-
ApiClient client = ApiClient.GetApiClientWithClientCredentials(apiKey, apiSecret);
124-
125-
Map params = new HashMap();
126-
params.put("phrase", "cat");
127-
params.put("fields", Arrays.asList("artist", "id"));
128-
params.put("age_of_people", EnumSet.of(AgeOfPeople.NEWBORN,AgeOfPeople.BABY,AgeOfPeople.CHILD));
129-
130-
try {
131-
CustomRequest search = client.customrequest()
132-
.withMethod("GET")
133-
.withRoute("/search/images")
134-
.withQueryParameters(params);
135-
String result = search.executeAsync();
136-
System.out.print(result);
137-
138-
} catch (SdkException e) {
139-
System.out.println("Exception occurred while searching for creative images: " + e.getLocalizedMessage());
140-
System.exit(-1);
141-
}
142-
```
143-
144-
For more examples, see unittests package.
145-
146-
## `ApiClient` lifecycle
147-
148-
In production applications, we recommend utilizing the `ApiClient` as a global singleton. This ensures that token caching is properly performed.
17+
The archived README is [here](README-ARCHIVED.md)

0 commit comments

Comments
 (0)