gettyimages-api 3.2.4 → 3.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README-ARCHIVED.md +196 -0
- data/README.md +15 -190
- data/lib/GettyImagesApi/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a87015aafdc3cd006d489cdd3ecc9daae5db9cf9fe00e69399ef95a071dad15
|
4
|
+
data.tar.gz: b2e51828a19c13da5e5c42f507ee2cd3d16d5cb72d30656f48f3bc93501e88f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aeb69f22e5931a4deec170f59f58eda7a0fc5e7738e24471c14b629c25dec5bf1b10c4d783c5fec62e9d5db6b9910ae6b55994422c22ef414ae495782b9c97e2
|
7
|
+
data.tar.gz: d130a506adf907c2bfdf7310d7b8d8f2e3acf67fd4d829dc388b536498f1e433bd8394a2de8e8915533a1d50da640293efe02136568187f7846b882f0486231b
|
data/README-ARCHIVED.md
ADDED
@@ -0,0 +1,196 @@
|
|
1
|
+
# Getty Images API Ruby SDK
|
2
|
+
|
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_ruby/issues)
|
20
|
+
|
21
|
+
## Getting started
|
22
|
+
|
23
|
+
### Obtain an API Key
|
24
|
+
|
25
|
+
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.
|
26
|
+
|
27
|
+
### Installing the ruby gem package
|
28
|
+
|
29
|
+
The SDK is available as a [ruby gem](https://rubygems.org/gems/gettyimages-api) package. Install in your workspace with:
|
30
|
+
```sh
|
31
|
+
gem install gettyimages-api
|
32
|
+
```
|
33
|
+
|
34
|
+
## Examples
|
35
|
+
|
36
|
+
### Search for one or more images
|
37
|
+
|
38
|
+
```ruby
|
39
|
+
require 'gettyimages-api'
|
40
|
+
|
41
|
+
api_key = "API Key"
|
42
|
+
api_secret = "API Secret"
|
43
|
+
|
44
|
+
# create instance of the SDK
|
45
|
+
apiClient = ApiClient.new(api_key, api_secret)
|
46
|
+
result = apiClient
|
47
|
+
.search_images_creative()
|
48
|
+
.with_phrase("gorilla")
|
49
|
+
.with_fields(["artist", "id", "title"])
|
50
|
+
.with_exclude_nudity("true")
|
51
|
+
.with_page(2)
|
52
|
+
.with_page_size(5)
|
53
|
+
.execute()
|
54
|
+
|
55
|
+
result["images"].each do | image |
|
56
|
+
puts "Id: #{image["id"]} Title: #{image["title"]}"
|
57
|
+
end
|
58
|
+
```
|
59
|
+
|
60
|
+
### Get detailed information for one image
|
61
|
+
|
62
|
+
```ruby
|
63
|
+
require 'gettyimages-api'
|
64
|
+
|
65
|
+
api_key = "API Key"
|
66
|
+
api_secret = "API Secret"
|
67
|
+
|
68
|
+
# create instance of the SDK
|
69
|
+
apiClient = ApiClient.new(api_key, api_secret)
|
70
|
+
result = apiClient
|
71
|
+
.images()
|
72
|
+
.with_id("ASSET_ID")
|
73
|
+
.execute()
|
74
|
+
|
75
|
+
puts result
|
76
|
+
```
|
77
|
+
|
78
|
+
### Get detailed information for multiple images
|
79
|
+
|
80
|
+
```ruby
|
81
|
+
require 'gettyimages-api'
|
82
|
+
|
83
|
+
api_key = "API Key"
|
84
|
+
api_secret = "API Secret"
|
85
|
+
|
86
|
+
# create instance of the SDK
|
87
|
+
apiClient = ApiClient.new(api_key, api_secret)
|
88
|
+
result = apiClient
|
89
|
+
.images()
|
90
|
+
.with_ids(["ASSET_ID_1", "ASSET_ID_2"])
|
91
|
+
.execute()
|
92
|
+
|
93
|
+
result["images"].each do | image |
|
94
|
+
puts image
|
95
|
+
end
|
96
|
+
```
|
97
|
+
|
98
|
+
### Download an image
|
99
|
+
|
100
|
+
```ruby
|
101
|
+
require 'gettyimages-api'
|
102
|
+
|
103
|
+
api_key = "API Key"
|
104
|
+
api_secret = "API Secret"
|
105
|
+
|
106
|
+
# create instance of the SDK
|
107
|
+
apiClient = ApiClient.new(api_key, api_secret)
|
108
|
+
result = apiClient
|
109
|
+
.download_images()
|
110
|
+
.with_id("ASSET_ID")
|
111
|
+
.execute()
|
112
|
+
|
113
|
+
puts result["uri"]
|
114
|
+
```
|
115
|
+
|
116
|
+
### Make a request using custom parameter and header
|
117
|
+
|
118
|
+
```ruby
|
119
|
+
apiClient = ApiClient.new(api_key, api_secret)
|
120
|
+
result = apiClient
|
121
|
+
.search_images_creative()
|
122
|
+
.with_phrase("beach")
|
123
|
+
.with_custom_parameter("safe_search", "true")
|
124
|
+
.with_custom_header("gi-country-code", "CAN")
|
125
|
+
.execute()
|
126
|
+
```
|
127
|
+
|
128
|
+
### Use the custom request functionality for GET request with query parameters
|
129
|
+
|
130
|
+
```ruby
|
131
|
+
require 'gettyimages-api'
|
132
|
+
|
133
|
+
api_key = "API Key"
|
134
|
+
api_secret = "API Secret"
|
135
|
+
|
136
|
+
# create instance of the SDK
|
137
|
+
apiClient = ApiClient.new(api_key, api_secret)
|
138
|
+
result = apiClient
|
139
|
+
.custom_request()
|
140
|
+
.with_method("GET")
|
141
|
+
.with_route("search/images")
|
142
|
+
.with_query_parameters({"phrase"=> "cat", "fields"=> ["artist", "id", "title"], "page" => 2})
|
143
|
+
.execute()
|
144
|
+
|
145
|
+
result["images"].each do | image |
|
146
|
+
puts "Id: #{image["id"]} Title: #{image["title"]}"
|
147
|
+
end
|
148
|
+
```
|
149
|
+
|
150
|
+
### Use the custom request functionality for POST request with body
|
151
|
+
|
152
|
+
```ruby
|
153
|
+
require 'gettyimages-api'
|
154
|
+
|
155
|
+
api_key = "API Key"
|
156
|
+
api_secret = "API Secret"
|
157
|
+
|
158
|
+
# create instance of the SDK
|
159
|
+
apiClient = ApiClient.new(api_key, api_secret)
|
160
|
+
result = apiClient
|
161
|
+
.custom_request()
|
162
|
+
.with_method("POST")
|
163
|
+
.with_route("boards")
|
164
|
+
.with_body({"name"=> "Board Name", "description" => "Board Description"})
|
165
|
+
.execute()
|
166
|
+
|
167
|
+
puts result["id"]
|
168
|
+
```
|
169
|
+
## Running Source Code
|
170
|
+
_Source code is only needed if you would like to contribute to the project. Otherwise, use the [ruby gem](https://rubygems.org/gems/gettyimages-api)_
|
171
|
+
|
172
|
+
### Requirements
|
173
|
+
|
174
|
+
- Ruby version >= 3.0
|
175
|
+
- [Bundler](http://bundler.io)
|
176
|
+
|
177
|
+
Install bundler and all dependencies
|
178
|
+
|
179
|
+
```sh
|
180
|
+
gem install bundler
|
181
|
+
bundle install
|
182
|
+
```
|
183
|
+
|
184
|
+
### Unit Tests
|
185
|
+
|
186
|
+
To execute all unit tests:
|
187
|
+
|
188
|
+
```sh
|
189
|
+
rake
|
190
|
+
```
|
191
|
+
|
192
|
+
To run one unit test file:
|
193
|
+
|
194
|
+
```sh
|
195
|
+
ruby unit_tests/FILENAME.rb
|
196
|
+
```
|
data/README.md
CHANGED
@@ -1,192 +1,17 @@
|
|
1
1
|
# Getty Images API Ruby SDK
|
2
|
-
[](https://travis-ci.org/gettyimages/gettyimages-api_ruby)
|
3
2
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
### Obtain an API Key
|
20
|
-
|
21
|
-
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.
|
22
|
-
|
23
|
-
### Installing the ruby gem package
|
24
|
-
|
25
|
-
The SDK is available as a [ruby gem](https://rubygems.org/gems/gettyimages-api) package. Install in your workspace with:
|
26
|
-
```sh
|
27
|
-
gem install gettyimages-api
|
28
|
-
```
|
29
|
-
|
30
|
-
## Examples
|
31
|
-
|
32
|
-
### Search for one or more images
|
33
|
-
|
34
|
-
```ruby
|
35
|
-
require 'gettyimages-api'
|
36
|
-
|
37
|
-
api_key = "API Key"
|
38
|
-
api_secret = "API Secret"
|
39
|
-
|
40
|
-
# create instance of the SDK
|
41
|
-
apiClient = ApiClient.new(api_key, api_secret)
|
42
|
-
result = apiClient
|
43
|
-
.search_images_creative()
|
44
|
-
.with_phrase("gorilla")
|
45
|
-
.with_fields(["artist", "id", "title"])
|
46
|
-
.with_exclude_nudity("true")
|
47
|
-
.with_page(2)
|
48
|
-
.with_page_size(5)
|
49
|
-
.execute()
|
50
|
-
|
51
|
-
result["images"].each do | image |
|
52
|
-
puts "Id: #{image["id"]} Title: #{image["title"]}"
|
53
|
-
end
|
54
|
-
```
|
55
|
-
|
56
|
-
### Get detailed information for one image
|
57
|
-
|
58
|
-
```ruby
|
59
|
-
require 'gettyimages-api'
|
60
|
-
|
61
|
-
api_key = "API Key"
|
62
|
-
api_secret = "API Secret"
|
63
|
-
|
64
|
-
# create instance of the SDK
|
65
|
-
apiClient = ApiClient.new(api_key, api_secret)
|
66
|
-
result = apiClient
|
67
|
-
.images()
|
68
|
-
.with_id("ASSET_ID")
|
69
|
-
.execute()
|
70
|
-
|
71
|
-
puts result
|
72
|
-
```
|
73
|
-
|
74
|
-
### Get detailed information for multiple images
|
75
|
-
|
76
|
-
```ruby
|
77
|
-
require 'gettyimages-api'
|
78
|
-
|
79
|
-
api_key = "API Key"
|
80
|
-
api_secret = "API Secret"
|
81
|
-
|
82
|
-
# create instance of the SDK
|
83
|
-
apiClient = ApiClient.new(api_key, api_secret)
|
84
|
-
result = apiClient
|
85
|
-
.images()
|
86
|
-
.with_ids(["ASSET_ID_1", "ASSET_ID_2"])
|
87
|
-
.execute()
|
88
|
-
|
89
|
-
result["images"].each do | image |
|
90
|
-
puts image
|
91
|
-
end
|
92
|
-
```
|
93
|
-
|
94
|
-
### Download an image
|
95
|
-
|
96
|
-
```ruby
|
97
|
-
require 'gettyimages-api'
|
98
|
-
|
99
|
-
api_key = "API Key"
|
100
|
-
api_secret = "API Secret"
|
101
|
-
|
102
|
-
# create instance of the SDK
|
103
|
-
apiClient = ApiClient.new(api_key, api_secret)
|
104
|
-
result = apiClient
|
105
|
-
.download_images()
|
106
|
-
.with_id("ASSET_ID")
|
107
|
-
.execute()
|
108
|
-
|
109
|
-
puts result["uri"]
|
110
|
-
```
|
111
|
-
|
112
|
-
### Make a request using custom parameter and header
|
113
|
-
|
114
|
-
```ruby
|
115
|
-
apiClient = ApiClient.new(api_key, api_secret)
|
116
|
-
result = apiClient
|
117
|
-
.search_images_creative()
|
118
|
-
.with_phrase("beach")
|
119
|
-
.with_custom_parameter("safe_search", "true")
|
120
|
-
.with_custom_header("gi-country-code", "CAN")
|
121
|
-
.execute()
|
122
|
-
```
|
123
|
-
|
124
|
-
### Use the custom request functionality for GET request with query parameters
|
125
|
-
|
126
|
-
```ruby
|
127
|
-
require 'gettyimages-api'
|
128
|
-
|
129
|
-
api_key = "API Key"
|
130
|
-
api_secret = "API Secret"
|
131
|
-
|
132
|
-
# create instance of the SDK
|
133
|
-
apiClient = ApiClient.new(api_key, api_secret)
|
134
|
-
result = apiClient
|
135
|
-
.custom_request()
|
136
|
-
.with_method("GET")
|
137
|
-
.with_route("search/images")
|
138
|
-
.with_query_parameters({"phrase"=> "cat", "fields"=> ["artist", "id", "title"], "page" => 2})
|
139
|
-
.execute()
|
140
|
-
|
141
|
-
result["images"].each do | image |
|
142
|
-
puts "Id: #{image["id"]} Title: #{image["title"]}"
|
143
|
-
end
|
144
|
-
```
|
145
|
-
|
146
|
-
### Use the custom request functionality for POST request with body
|
147
|
-
|
148
|
-
```ruby
|
149
|
-
require 'gettyimages-api'
|
150
|
-
|
151
|
-
api_key = "API Key"
|
152
|
-
api_secret = "API Secret"
|
153
|
-
|
154
|
-
# create instance of the SDK
|
155
|
-
apiClient = ApiClient.new(api_key, api_secret)
|
156
|
-
result = apiClient
|
157
|
-
.custom_request()
|
158
|
-
.with_method("POST")
|
159
|
-
.with_route("boards")
|
160
|
-
.with_body({"name"=> "Board Name", "description" => "Board Description"})
|
161
|
-
.execute()
|
162
|
-
|
163
|
-
puts result["id"]
|
164
|
-
```
|
165
|
-
## Running Source Code
|
166
|
-
_Source code is only needed if you would like to contribute to the project. Otherwise, use the [ruby gem](https://rubygems.org/gems/gettyimages-api)_
|
167
|
-
|
168
|
-
### Requirements
|
169
|
-
|
170
|
-
- Ruby version >= 3.0
|
171
|
-
- [Bundler](http://bundler.io)
|
172
|
-
|
173
|
-
Install bundler and all dependencies
|
174
|
-
|
175
|
-
```sh
|
176
|
-
gem install bundler
|
177
|
-
bundle install
|
178
|
-
```
|
179
|
-
|
180
|
-
### Unit Tests
|
181
|
-
|
182
|
-
To execute all unit tests:
|
183
|
-
|
184
|
-
```sh
|
185
|
-
rake
|
186
|
-
```
|
187
|
-
|
188
|
-
To run one unit test file:
|
189
|
-
|
190
|
-
```sh
|
191
|
-
ruby unit_tests/FILENAME.rb
|
192
|
-
```
|
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
|
+
**********************************************************
|
15
|
+
```
|
16
|
+
|
17
|
+
The archived README is [here](README-ARCHIVED.md)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gettyimages-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Getty Images
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -54,6 +54,7 @@ files:
|
|
54
54
|
- Gemfile.lock
|
55
55
|
- LICENSE
|
56
56
|
- Makefile
|
57
|
+
- README-ARCHIVED.md
|
57
58
|
- README.md
|
58
59
|
- Rakefile
|
59
60
|
- gettyimages-api.gemspec
|
@@ -78,7 +79,7 @@ homepage: https://github.com/gettyimages/gettyimages-api_ruby
|
|
78
79
|
licenses:
|
79
80
|
- MIT
|
80
81
|
metadata: {}
|
81
|
-
post_install_message:
|
82
|
+
post_install_message:
|
82
83
|
rdoc_options: []
|
83
84
|
require_paths:
|
84
85
|
- lib
|
@@ -93,9 +94,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
94
|
- !ruby/object:Gem::Version
|
94
95
|
version: '0'
|
95
96
|
requirements: []
|
96
|
-
rubyforge_project:
|
97
|
+
rubyforge_project:
|
97
98
|
rubygems_version: 2.7.6.3
|
98
|
-
signing_key:
|
99
|
+
signing_key:
|
99
100
|
specification_version: 4
|
100
101
|
summary: Getty Images API SDK
|
101
102
|
test_files: []
|