Skip to content

Commit

Permalink
Add example
Browse files Browse the repository at this point in the history
  • Loading branch information
ssterli2 committed Sep 30, 2022
1 parent d195703 commit 222716d
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,29 @@ $ mvn install
}
```

### Search creative images with phrase, custom parameter, and customer header
```java
String apiKey = "API Key";
String apiSecret = "API Secret";
String userName = "Username";
String userPassword = "Password";

ApiClient client = ApiClient.GetApiClientWithResourceOwnerCredentials(apiKey, apiSecret, userName, userPassword);

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
Expand Down

0 comments on commit 222716d

Please sign in to comment.