@spyglasshq/sdk 0.1.0 → 0.1.1
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.
- package/README.md +248 -66
- package/dist/cjs/BaseClient.js +3 -3
- package/dist/cjs/Client.d.ts +4 -4
- package/dist/cjs/Client.js +3 -3
- package/dist/cjs/api/errors/BadRequestError.d.ts +3 -3
- package/dist/cjs/api/errors/ContentTooLargeError.d.ts +3 -3
- package/dist/cjs/api/errors/ForbiddenError.d.ts +3 -3
- package/dist/cjs/api/errors/InternalServerError.d.ts +3 -3
- package/dist/cjs/api/errors/MethodNotAllowedError.d.ts +3 -3
- package/dist/cjs/api/errors/NotFoundError.d.ts +3 -3
- package/dist/cjs/api/errors/PaymentRequiredError.d.ts +3 -3
- package/dist/cjs/api/errors/TooManyRequestsError.d.ts +3 -3
- package/dist/cjs/api/errors/UnauthorizedError.d.ts +3 -3
- package/dist/cjs/api/resources/account/client/Client.d.ts +9 -9
- package/dist/cjs/api/resources/account/client/Client.js +15 -15
- package/dist/cjs/api/resources/indexing/client/Client.d.ts +19 -19
- package/dist/cjs/api/resources/indexing/client/Client.js +31 -31
- package/dist/cjs/api/resources/search/client/Client.d.ts +85 -85
- package/dist/cjs/api/resources/search/client/Client.js +145 -145
- package/dist/cjs/api/resources/search/client/requests/GetBrandLandingPagesRequest.d.ts +2 -2
- package/dist/cjs/api/resources/search/client/requests/GetBrandMediaInsightsRequest.d.ts +2 -2
- package/dist/cjs/api/resources/search/client/requests/{GetMediaV2Request.d.ts → GetMediaRequest.d.ts} +13 -13
- package/dist/cjs/api/resources/search/client/requests/{GetMediaV2Request.js → GetMediaRequest.js} +14 -14
- package/dist/{esm/api/resources/search/client/requests/SearchBrandsV2Request.d.mts → cjs/api/resources/search/client/requests/SearchBrandsRequest.d.ts} +4 -4
- package/dist/cjs/api/resources/search/client/requests/{SearchBrandsV2Request.js → SearchBrandsRequest.js} +5 -5
- package/dist/cjs/api/resources/search/client/requests/index.d.ts +2 -2
- package/dist/cjs/api/resources/search/client/requests/index.js +5 -5
- package/dist/cjs/api/resources/search/types/GetAccountResponse.d.ts +2 -2
- package/dist/cjs/api/resources/search/types/{GetMediaV2Response.d.ts → GetMediaResponse.d.ts} +3 -3
- package/dist/cjs/api/resources/search/types/{GetMediaV2Response.js → GetMediaResponse.js} +5 -5
- package/dist/{esm/api/resources/search/types/SearchBrandsV2Response.d.mts → cjs/api/resources/search/types/SearchBrandsResponse.d.ts} +3 -3
- package/dist/cjs/api/resources/search/types/{SearchBrandsV2Response.js → SearchBrandsResponse.js} +5 -5
- package/dist/cjs/api/resources/search/types/index.d.ts +2 -2
- package/dist/cjs/api/resources/search/types/index.js +2 -2
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +3 -3
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +3 -3
- package/dist/esm/Client.d.mts +4 -4
- package/dist/esm/Client.mjs +1 -1
- package/dist/esm/api/errors/BadRequestError.d.mts +3 -3
- package/dist/esm/api/errors/ContentTooLargeError.d.mts +3 -3
- package/dist/esm/api/errors/ForbiddenError.d.mts +3 -3
- package/dist/esm/api/errors/InternalServerError.d.mts +3 -3
- package/dist/esm/api/errors/MethodNotAllowedError.d.mts +3 -3
- package/dist/esm/api/errors/NotFoundError.d.mts +3 -3
- package/dist/esm/api/errors/PaymentRequiredError.d.mts +3 -3
- package/dist/esm/api/errors/TooManyRequestsError.d.mts +3 -3
- package/dist/esm/api/errors/UnauthorizedError.d.mts +3 -3
- package/dist/esm/api/resources/account/client/Client.d.mts +9 -9
- package/dist/esm/api/resources/account/client/Client.mjs +15 -15
- package/dist/esm/api/resources/indexing/client/Client.d.mts +19 -19
- package/dist/esm/api/resources/indexing/client/Client.mjs +31 -31
- package/dist/esm/api/resources/search/client/Client.d.mts +85 -85
- package/dist/esm/api/resources/search/client/Client.mjs +145 -145
- package/dist/esm/api/resources/search/client/requests/GetBrandLandingPagesRequest.d.mts +2 -2
- package/dist/esm/api/resources/search/client/requests/GetBrandMediaInsightsRequest.d.mts +2 -2
- package/dist/esm/api/resources/search/client/requests/{GetMediaV2Request.d.mts → GetMediaRequest.d.mts} +13 -13
- package/dist/esm/api/resources/search/client/requests/{GetMediaV2Request.mjs → GetMediaRequest.mjs} +13 -13
- package/dist/{cjs/api/resources/search/client/requests/SearchBrandsV2Request.d.ts → esm/api/resources/search/client/requests/SearchBrandsRequest.d.mts} +4 -4
- package/dist/esm/api/resources/search/client/requests/{SearchBrandsV2Request.mjs → SearchBrandsRequest.mjs} +4 -4
- package/dist/esm/api/resources/search/client/requests/index.d.mts +2 -2
- package/dist/esm/api/resources/search/client/requests/index.mjs +2 -2
- package/dist/esm/api/resources/search/types/GetAccountResponse.d.mts +2 -2
- package/dist/esm/api/resources/search/types/{GetMediaV2Response.d.mts → GetMediaResponse.d.mts} +3 -3
- package/dist/esm/api/resources/search/types/{GetMediaV2Response.mjs → GetMediaResponse.mjs} +4 -4
- package/dist/{cjs/api/resources/search/types/SearchBrandsV2Response.d.ts → esm/api/resources/search/types/SearchBrandsResponse.d.mts} +3 -3
- package/dist/esm/api/resources/search/types/{SearchBrandsV2Response.mjs → SearchBrandsResponse.mjs} +4 -4
- package/dist/esm/api/resources/search/types/index.d.mts +2 -2
- package/dist/esm/api/resources/search/types/index.mjs +2 -2
- package/dist/esm/index.d.mts +2 -2
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +17 -2
- package/reference.md +23 -23
|
@@ -50,7 +50,7 @@ const core = __importStar(require("../../../../core/index.js"));
|
|
|
50
50
|
const environments = __importStar(require("../../../../environments.js"));
|
|
51
51
|
const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
|
|
52
52
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
53
|
-
const
|
|
53
|
+
const spyglass = __importStar(require("../../../index.js"));
|
|
54
54
|
/**
|
|
55
55
|
* The API key's team: credits and the billing period.
|
|
56
56
|
*/
|
|
@@ -69,13 +69,13 @@ class AccountClient {
|
|
|
69
69
|
*
|
|
70
70
|
* @param {AccountClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
71
71
|
*
|
|
72
|
-
* @throws {@link
|
|
73
|
-
* @throws {@link
|
|
74
|
-
* @throws {@link
|
|
75
|
-
* @throws {@link
|
|
76
|
-
* @throws {@link
|
|
77
|
-
* @throws {@link
|
|
78
|
-
* @throws {@link
|
|
72
|
+
* @throws {@link spyglass.BadRequestError}
|
|
73
|
+
* @throws {@link spyglass.UnauthorizedError}
|
|
74
|
+
* @throws {@link spyglass.PaymentRequiredError}
|
|
75
|
+
* @throws {@link spyglass.ForbiddenError}
|
|
76
|
+
* @throws {@link spyglass.MethodNotAllowedError}
|
|
77
|
+
* @throws {@link spyglass.TooManyRequestsError}
|
|
78
|
+
* @throws {@link spyglass.InternalServerError}
|
|
79
79
|
* @throws {@link errors.SpyglassError}
|
|
80
80
|
* @throws {@link errors.SpyglassTimeoutError}
|
|
81
81
|
*
|
|
@@ -107,19 +107,19 @@ class AccountClient {
|
|
|
107
107
|
if (_response.error.reason === "status-code") {
|
|
108
108
|
switch (_response.error.statusCode) {
|
|
109
109
|
case 400:
|
|
110
|
-
throw new
|
|
110
|
+
throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
|
|
111
111
|
case 401:
|
|
112
|
-
throw new
|
|
112
|
+
throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
113
113
|
case 402:
|
|
114
|
-
throw new
|
|
114
|
+
throw new spyglass.PaymentRequiredError(_response.error.body, _response.rawResponse);
|
|
115
115
|
case 403:
|
|
116
|
-
throw new
|
|
116
|
+
throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
117
117
|
case 405:
|
|
118
|
-
throw new
|
|
118
|
+
throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
|
|
119
119
|
case 429:
|
|
120
|
-
throw new
|
|
120
|
+
throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
121
121
|
case 500:
|
|
122
|
-
throw new
|
|
122
|
+
throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
|
|
123
123
|
default:
|
|
124
124
|
throw new errors.SpyglassError({
|
|
125
125
|
statusCode: _response.error.statusCode,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
2
|
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
3
|
import * as core from "../../../../core/index.js";
|
|
4
|
-
import * as
|
|
4
|
+
import * as spyglass from "../../../index.js";
|
|
5
5
|
export declare namespace IndexingClient {
|
|
6
6
|
type Options = BaseClientOptions;
|
|
7
7
|
interface RequestOptions extends BaseRequestOptions {
|
|
@@ -25,16 +25,16 @@ export declare class IndexingClient {
|
|
|
25
25
|
* Limited to 50 requests per minute per user.
|
|
26
26
|
* This call is free.
|
|
27
27
|
*
|
|
28
|
-
* @param {
|
|
28
|
+
* @param {spyglass.IndexBrandRequest} request
|
|
29
29
|
* @param {IndexingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
30
30
|
*
|
|
31
|
-
* @throws {@link
|
|
32
|
-
* @throws {@link
|
|
33
|
-
* @throws {@link
|
|
34
|
-
* @throws {@link
|
|
35
|
-
* @throws {@link
|
|
36
|
-
* @throws {@link
|
|
37
|
-
* @throws {@link
|
|
31
|
+
* @throws {@link spyglass.BadRequestError}
|
|
32
|
+
* @throws {@link spyglass.UnauthorizedError}
|
|
33
|
+
* @throws {@link spyglass.ForbiddenError}
|
|
34
|
+
* @throws {@link spyglass.MethodNotAllowedError}
|
|
35
|
+
* @throws {@link spyglass.ContentTooLargeError}
|
|
36
|
+
* @throws {@link spyglass.TooManyRequestsError}
|
|
37
|
+
* @throws {@link spyglass.InternalServerError}
|
|
38
38
|
* @throws {@link errors.SpyglassError}
|
|
39
39
|
* @throws {@link errors.SpyglassTimeoutError}
|
|
40
40
|
*
|
|
@@ -43,7 +43,7 @@ export declare class IndexingClient {
|
|
|
43
43
|
* websiteUrl: "https://www.nike.com"
|
|
44
44
|
* })
|
|
45
45
|
*/
|
|
46
|
-
indexBrand(request:
|
|
46
|
+
indexBrand(request: spyglass.IndexBrandRequest, requestOptions?: IndexingClient.RequestOptions): core.HttpResponsePromise<spyglass.IndexBrandResponse>;
|
|
47
47
|
private __indexBrand;
|
|
48
48
|
/**
|
|
49
49
|
* Poll whether a brand finished indexing after POST /account/index.
|
|
@@ -51,16 +51,16 @@ export declare class IndexingClient {
|
|
|
51
51
|
* Limited to 300 requests per minute per user.
|
|
52
52
|
* This call is free.
|
|
53
53
|
*
|
|
54
|
-
* @param {
|
|
54
|
+
* @param {spyglass.IndexBrandStatusRequest} request
|
|
55
55
|
* @param {IndexingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
56
|
*
|
|
57
|
-
* @throws {@link
|
|
58
|
-
* @throws {@link
|
|
59
|
-
* @throws {@link
|
|
60
|
-
* @throws {@link
|
|
61
|
-
* @throws {@link
|
|
62
|
-
* @throws {@link
|
|
63
|
-
* @throws {@link
|
|
57
|
+
* @throws {@link spyglass.BadRequestError}
|
|
58
|
+
* @throws {@link spyglass.UnauthorizedError}
|
|
59
|
+
* @throws {@link spyglass.ForbiddenError}
|
|
60
|
+
* @throws {@link spyglass.NotFoundError}
|
|
61
|
+
* @throws {@link spyglass.MethodNotAllowedError}
|
|
62
|
+
* @throws {@link spyglass.TooManyRequestsError}
|
|
63
|
+
* @throws {@link spyglass.InternalServerError}
|
|
64
64
|
* @throws {@link errors.SpyglassError}
|
|
65
65
|
* @throws {@link errors.SpyglassTimeoutError}
|
|
66
66
|
*
|
|
@@ -69,6 +69,6 @@ export declare class IndexingClient {
|
|
|
69
69
|
* id: "id"
|
|
70
70
|
* })
|
|
71
71
|
*/
|
|
72
|
-
indexBrandStatus(request:
|
|
72
|
+
indexBrandStatus(request: spyglass.IndexBrandStatusRequest, requestOptions?: IndexingClient.RequestOptions): core.HttpResponsePromise<spyglass.IndexBrandStatusResponse>;
|
|
73
73
|
private __indexBrandStatus;
|
|
74
74
|
}
|
|
@@ -51,7 +51,7 @@ const requestBody_js_1 = require("../../../../core/requestBody.js");
|
|
|
51
51
|
const environments = __importStar(require("../../../../environments.js"));
|
|
52
52
|
const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
|
|
53
53
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
54
|
-
const
|
|
54
|
+
const spyglass = __importStar(require("../../../index.js"));
|
|
55
55
|
/**
|
|
56
56
|
* Add an account we do not have yet, then poll until ready.
|
|
57
57
|
*/
|
|
@@ -71,16 +71,16 @@ class IndexingClient {
|
|
|
71
71
|
* Limited to 50 requests per minute per user.
|
|
72
72
|
* This call is free.
|
|
73
73
|
*
|
|
74
|
-
* @param {
|
|
74
|
+
* @param {spyglass.IndexBrandRequest} request
|
|
75
75
|
* @param {IndexingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
76
76
|
*
|
|
77
|
-
* @throws {@link
|
|
78
|
-
* @throws {@link
|
|
79
|
-
* @throws {@link
|
|
80
|
-
* @throws {@link
|
|
81
|
-
* @throws {@link
|
|
82
|
-
* @throws {@link
|
|
83
|
-
* @throws {@link
|
|
77
|
+
* @throws {@link spyglass.BadRequestError}
|
|
78
|
+
* @throws {@link spyglass.UnauthorizedError}
|
|
79
|
+
* @throws {@link spyglass.ForbiddenError}
|
|
80
|
+
* @throws {@link spyglass.MethodNotAllowedError}
|
|
81
|
+
* @throws {@link spyglass.ContentTooLargeError}
|
|
82
|
+
* @throws {@link spyglass.TooManyRequestsError}
|
|
83
|
+
* @throws {@link spyglass.InternalServerError}
|
|
84
84
|
* @throws {@link errors.SpyglassError}
|
|
85
85
|
* @throws {@link errors.SpyglassTimeoutError}
|
|
86
86
|
*
|
|
@@ -117,19 +117,19 @@ class IndexingClient {
|
|
|
117
117
|
if (_response.error.reason === "status-code") {
|
|
118
118
|
switch (_response.error.statusCode) {
|
|
119
119
|
case 400:
|
|
120
|
-
throw new
|
|
120
|
+
throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
|
|
121
121
|
case 401:
|
|
122
|
-
throw new
|
|
122
|
+
throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
123
123
|
case 403:
|
|
124
|
-
throw new
|
|
124
|
+
throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
125
125
|
case 405:
|
|
126
|
-
throw new
|
|
126
|
+
throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
|
|
127
127
|
case 413:
|
|
128
|
-
throw new
|
|
128
|
+
throw new spyglass.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
129
129
|
case 429:
|
|
130
|
-
throw new
|
|
130
|
+
throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
131
131
|
case 500:
|
|
132
|
-
throw new
|
|
132
|
+
throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
|
|
133
133
|
default:
|
|
134
134
|
throw new errors.SpyglassError({
|
|
135
135
|
statusCode: _response.error.statusCode,
|
|
@@ -147,16 +147,16 @@ class IndexingClient {
|
|
|
147
147
|
* Limited to 300 requests per minute per user.
|
|
148
148
|
* This call is free.
|
|
149
149
|
*
|
|
150
|
-
* @param {
|
|
150
|
+
* @param {spyglass.IndexBrandStatusRequest} request
|
|
151
151
|
* @param {IndexingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
152
152
|
*
|
|
153
|
-
* @throws {@link
|
|
154
|
-
* @throws {@link
|
|
155
|
-
* @throws {@link
|
|
156
|
-
* @throws {@link
|
|
157
|
-
* @throws {@link
|
|
158
|
-
* @throws {@link
|
|
159
|
-
* @throws {@link
|
|
153
|
+
* @throws {@link spyglass.BadRequestError}
|
|
154
|
+
* @throws {@link spyglass.UnauthorizedError}
|
|
155
|
+
* @throws {@link spyglass.ForbiddenError}
|
|
156
|
+
* @throws {@link spyglass.NotFoundError}
|
|
157
|
+
* @throws {@link spyglass.MethodNotAllowedError}
|
|
158
|
+
* @throws {@link spyglass.TooManyRequestsError}
|
|
159
|
+
* @throws {@link spyglass.InternalServerError}
|
|
160
160
|
* @throws {@link errors.SpyglassError}
|
|
161
161
|
* @throws {@link errors.SpyglassTimeoutError}
|
|
162
162
|
*
|
|
@@ -191,19 +191,19 @@ class IndexingClient {
|
|
|
191
191
|
if (_response.error.reason === "status-code") {
|
|
192
192
|
switch (_response.error.statusCode) {
|
|
193
193
|
case 400:
|
|
194
|
-
throw new
|
|
194
|
+
throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
|
|
195
195
|
case 401:
|
|
196
|
-
throw new
|
|
196
|
+
throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
197
197
|
case 403:
|
|
198
|
-
throw new
|
|
198
|
+
throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
199
199
|
case 404:
|
|
200
|
-
throw new
|
|
200
|
+
throw new spyglass.NotFoundError(_response.error.body, _response.rawResponse);
|
|
201
201
|
case 405:
|
|
202
|
-
throw new
|
|
202
|
+
throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
|
|
203
203
|
case 429:
|
|
204
|
-
throw new
|
|
204
|
+
throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
205
205
|
case 500:
|
|
206
|
-
throw new
|
|
206
|
+
throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
|
|
207
207
|
default:
|
|
208
208
|
throw new errors.SpyglassError({
|
|
209
209
|
statusCode: _response.error.statusCode,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
2
|
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
3
|
import * as core from "../../../../core/index.js";
|
|
4
|
-
import * as
|
|
4
|
+
import * as spyglass from "../../../index.js";
|
|
5
5
|
export declare namespace SearchClient {
|
|
6
6
|
type Options = BaseClientOptions;
|
|
7
7
|
interface RequestOptions extends BaseRequestOptions {
|
|
@@ -48,28 +48,28 @@ export declare class SearchClient {
|
|
|
48
48
|
* A `query` search runs a language model, so it bills a minimum of one
|
|
49
49
|
* row even when nothing matches.
|
|
50
50
|
*
|
|
51
|
-
* @param {
|
|
51
|
+
* @param {spyglass.SearchBrandsRequest} request
|
|
52
52
|
* @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
53
53
|
*
|
|
54
|
-
* @throws {@link
|
|
55
|
-
* @throws {@link
|
|
56
|
-
* @throws {@link
|
|
57
|
-
* @throws {@link
|
|
58
|
-
* @throws {@link
|
|
59
|
-
* @throws {@link
|
|
60
|
-
* @throws {@link
|
|
61
|
-
* @throws {@link
|
|
54
|
+
* @throws {@link spyglass.BadRequestError}
|
|
55
|
+
* @throws {@link spyglass.UnauthorizedError}
|
|
56
|
+
* @throws {@link spyglass.PaymentRequiredError}
|
|
57
|
+
* @throws {@link spyglass.ForbiddenError}
|
|
58
|
+
* @throws {@link spyglass.MethodNotAllowedError}
|
|
59
|
+
* @throws {@link spyglass.ContentTooLargeError}
|
|
60
|
+
* @throws {@link spyglass.TooManyRequestsError}
|
|
61
|
+
* @throws {@link spyglass.InternalServerError}
|
|
62
62
|
* @throws {@link errors.SpyglassError}
|
|
63
63
|
* @throws {@link errors.SpyglassTimeoutError}
|
|
64
64
|
*
|
|
65
65
|
* @example
|
|
66
|
-
* await client.search.
|
|
66
|
+
* await client.search.brands({
|
|
67
67
|
* names: ["Nike"],
|
|
68
68
|
* limit: 3
|
|
69
69
|
* })
|
|
70
70
|
*/
|
|
71
|
-
|
|
72
|
-
private
|
|
71
|
+
brands(request?: spyglass.SearchBrandsRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.SearchBrandsResponse>;
|
|
72
|
+
private __brands;
|
|
73
73
|
/**
|
|
74
74
|
* Find creators only.
|
|
75
75
|
*
|
|
@@ -107,17 +107,17 @@ export declare class SearchClient {
|
|
|
107
107
|
* A `query` search runs a language model, so it bills a minimum of one
|
|
108
108
|
* row even when nothing matches.
|
|
109
109
|
*
|
|
110
|
-
* @param {
|
|
110
|
+
* @param {spyglass.SearchCreatorsRequest} request
|
|
111
111
|
* @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
112
112
|
*
|
|
113
|
-
* @throws {@link
|
|
114
|
-
* @throws {@link
|
|
115
|
-
* @throws {@link
|
|
116
|
-
* @throws {@link
|
|
117
|
-
* @throws {@link
|
|
118
|
-
* @throws {@link
|
|
119
|
-
* @throws {@link
|
|
120
|
-
* @throws {@link
|
|
113
|
+
* @throws {@link spyglass.BadRequestError}
|
|
114
|
+
* @throws {@link spyglass.UnauthorizedError}
|
|
115
|
+
* @throws {@link spyglass.PaymentRequiredError}
|
|
116
|
+
* @throws {@link spyglass.ForbiddenError}
|
|
117
|
+
* @throws {@link spyglass.MethodNotAllowedError}
|
|
118
|
+
* @throws {@link spyglass.ContentTooLargeError}
|
|
119
|
+
* @throws {@link spyglass.TooManyRequestsError}
|
|
120
|
+
* @throws {@link spyglass.InternalServerError}
|
|
121
121
|
* @throws {@link errors.SpyglassError}
|
|
122
122
|
* @throws {@link errors.SpyglassTimeoutError}
|
|
123
123
|
*
|
|
@@ -128,7 +128,7 @@ export declare class SearchClient {
|
|
|
128
128
|
* gender: "female"
|
|
129
129
|
* })
|
|
130
130
|
*/
|
|
131
|
-
creators(request?:
|
|
131
|
+
creators(request?: spyglass.SearchCreatorsRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.SearchCreatorsResponse>;
|
|
132
132
|
private __creators;
|
|
133
133
|
/**
|
|
134
134
|
* Fetch a single brand or creator by id. The `type` field tells you
|
|
@@ -139,17 +139,17 @@ export declare class SearchClient {
|
|
|
139
139
|
* Costs 2,000 microdollars ($0.0020) per account returned, charged against your plan's monthly credits.
|
|
140
140
|
* An id that matches nothing returns 404 and is free.
|
|
141
141
|
*
|
|
142
|
-
* @param {
|
|
142
|
+
* @param {spyglass.GetAccountRequest} request
|
|
143
143
|
* @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
144
144
|
*
|
|
145
|
-
* @throws {@link
|
|
146
|
-
* @throws {@link
|
|
147
|
-
* @throws {@link
|
|
148
|
-
* @throws {@link
|
|
149
|
-
* @throws {@link
|
|
150
|
-
* @throws {@link
|
|
151
|
-
* @throws {@link
|
|
152
|
-
* @throws {@link
|
|
145
|
+
* @throws {@link spyglass.BadRequestError}
|
|
146
|
+
* @throws {@link spyglass.UnauthorizedError}
|
|
147
|
+
* @throws {@link spyglass.PaymentRequiredError}
|
|
148
|
+
* @throws {@link spyglass.ForbiddenError}
|
|
149
|
+
* @throws {@link spyglass.NotFoundError}
|
|
150
|
+
* @throws {@link spyglass.MethodNotAllowedError}
|
|
151
|
+
* @throws {@link spyglass.TooManyRequestsError}
|
|
152
|
+
* @throws {@link spyglass.InternalServerError}
|
|
153
153
|
* @throws {@link errors.SpyglassError}
|
|
154
154
|
* @throws {@link errors.SpyglassTimeoutError}
|
|
155
155
|
*
|
|
@@ -158,7 +158,7 @@ export declare class SearchClient {
|
|
|
158
158
|
* id: "id"
|
|
159
159
|
* })
|
|
160
160
|
*/
|
|
161
|
-
getAccount(request:
|
|
161
|
+
getAccount(request: spyglass.GetAccountRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.GetAccountResponse>;
|
|
162
162
|
private __getAccount;
|
|
163
163
|
/**
|
|
164
164
|
* Find taxonomy paths you can pass to POST /media as `taxonomy`.
|
|
@@ -168,16 +168,16 @@ export declare class SearchClient {
|
|
|
168
168
|
* Limited to 120 requests per minute per user.
|
|
169
169
|
* This call is free and does not use credits.
|
|
170
170
|
*
|
|
171
|
-
* @param {
|
|
171
|
+
* @param {spyglass.SearchTaxonomiesRequest} request
|
|
172
172
|
* @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
173
173
|
*
|
|
174
|
-
* @throws {@link
|
|
175
|
-
* @throws {@link
|
|
176
|
-
* @throws {@link
|
|
177
|
-
* @throws {@link
|
|
178
|
-
* @throws {@link
|
|
179
|
-
* @throws {@link
|
|
180
|
-
* @throws {@link
|
|
174
|
+
* @throws {@link spyglass.BadRequestError}
|
|
175
|
+
* @throws {@link spyglass.UnauthorizedError}
|
|
176
|
+
* @throws {@link spyglass.PaymentRequiredError}
|
|
177
|
+
* @throws {@link spyglass.ForbiddenError}
|
|
178
|
+
* @throws {@link spyglass.MethodNotAllowedError}
|
|
179
|
+
* @throws {@link spyglass.TooManyRequestsError}
|
|
180
|
+
* @throws {@link spyglass.InternalServerError}
|
|
181
181
|
* @throws {@link errors.SpyglassError}
|
|
182
182
|
* @throws {@link errors.SpyglassTimeoutError}
|
|
183
183
|
*
|
|
@@ -186,7 +186,7 @@ export declare class SearchClient {
|
|
|
186
186
|
* query: "running shoes"
|
|
187
187
|
* })
|
|
188
188
|
*/
|
|
189
|
-
taxonomies(request:
|
|
189
|
+
taxonomies(request: spyglass.SearchTaxonomiesRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.SearchTaxonomiesResponse>;
|
|
190
190
|
private __taxonomies;
|
|
191
191
|
/**
|
|
192
192
|
* Return creatives. Pass `brandId` to scope to one brand or creator,
|
|
@@ -198,29 +198,29 @@ export declare class SearchClient {
|
|
|
198
198
|
* The call bills a minimum of one row even when nothing matches. In that
|
|
199
199
|
* case `count` is 0 but you are charged for one row.
|
|
200
200
|
*
|
|
201
|
-
* @param {
|
|
201
|
+
* @param {spyglass.GetMediaRequest} request
|
|
202
202
|
* @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
203
203
|
*
|
|
204
|
-
* @throws {@link
|
|
205
|
-
* @throws {@link
|
|
206
|
-
* @throws {@link
|
|
207
|
-
* @throws {@link
|
|
208
|
-
* @throws {@link
|
|
209
|
-
* @throws {@link
|
|
210
|
-
* @throws {@link
|
|
211
|
-
* @throws {@link
|
|
212
|
-
* @throws {@link
|
|
204
|
+
* @throws {@link spyglass.BadRequestError}
|
|
205
|
+
* @throws {@link spyglass.UnauthorizedError}
|
|
206
|
+
* @throws {@link spyglass.PaymentRequiredError}
|
|
207
|
+
* @throws {@link spyglass.ForbiddenError}
|
|
208
|
+
* @throws {@link spyglass.NotFoundError}
|
|
209
|
+
* @throws {@link spyglass.MethodNotAllowedError}
|
|
210
|
+
* @throws {@link spyglass.ContentTooLargeError}
|
|
211
|
+
* @throws {@link spyglass.TooManyRequestsError}
|
|
212
|
+
* @throws {@link spyglass.InternalServerError}
|
|
213
213
|
* @throws {@link errors.SpyglassError}
|
|
214
214
|
* @throws {@link errors.SpyglassTimeoutError}
|
|
215
215
|
*
|
|
216
216
|
* @example
|
|
217
|
-
* await client.search.
|
|
217
|
+
* await client.search.getMedia({
|
|
218
218
|
* query: "comfort-focused video ads",
|
|
219
219
|
* limit: 20
|
|
220
220
|
* })
|
|
221
221
|
*/
|
|
222
|
-
|
|
223
|
-
private
|
|
222
|
+
getMedia(request?: spyglass.GetMediaRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.GetMediaResponse>;
|
|
223
|
+
private __getMedia;
|
|
224
224
|
/**
|
|
225
225
|
* Return clustered creative themes for an account. `MEDIA_MIX` returns a
|
|
226
226
|
* breakdown by media type; the other types return weekly buckets plus
|
|
@@ -232,17 +232,17 @@ export declare class SearchClient {
|
|
|
232
232
|
* Limited to 120 requests per minute per user.
|
|
233
233
|
* Costs 1,000 microdollars ($0.0010) per cluster returned, charged against your plan's monthly credits. The count field is what you were charged for.
|
|
234
234
|
*
|
|
235
|
-
* @param {
|
|
235
|
+
* @param {spyglass.GetBrandMediaInsightsRequest} request
|
|
236
236
|
* @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
237
237
|
*
|
|
238
|
-
* @throws {@link
|
|
239
|
-
* @throws {@link
|
|
240
|
-
* @throws {@link
|
|
241
|
-
* @throws {@link
|
|
242
|
-
* @throws {@link
|
|
243
|
-
* @throws {@link
|
|
244
|
-
* @throws {@link
|
|
245
|
-
* @throws {@link
|
|
238
|
+
* @throws {@link spyglass.BadRequestError}
|
|
239
|
+
* @throws {@link spyglass.UnauthorizedError}
|
|
240
|
+
* @throws {@link spyglass.PaymentRequiredError}
|
|
241
|
+
* @throws {@link spyglass.ForbiddenError}
|
|
242
|
+
* @throws {@link spyglass.NotFoundError}
|
|
243
|
+
* @throws {@link spyglass.MethodNotAllowedError}
|
|
244
|
+
* @throws {@link spyglass.TooManyRequestsError}
|
|
245
|
+
* @throws {@link spyglass.InternalServerError}
|
|
246
246
|
* @throws {@link errors.SpyglassError}
|
|
247
247
|
* @throws {@link errors.SpyglassTimeoutError}
|
|
248
248
|
*
|
|
@@ -252,7 +252,7 @@ export declare class SearchClient {
|
|
|
252
252
|
* type: "HOOK"
|
|
253
253
|
* })
|
|
254
254
|
*/
|
|
255
|
-
getBrandMediaInsights(request:
|
|
255
|
+
getBrandMediaInsights(request: spyglass.GetBrandMediaInsightsRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.GetBrandMediaInsightsResponse>;
|
|
256
256
|
private __getBrandMediaInsights;
|
|
257
257
|
/**
|
|
258
258
|
* Return the landing-page URLs a brand sends ad traffic to, ranked by
|
|
@@ -261,17 +261,17 @@ export declare class SearchClient {
|
|
|
261
261
|
* Limited to 120 requests per minute per user.
|
|
262
262
|
* Costs 5,000 microdollars ($0.0050) per landing page returned, charged against your plan's monthly credits. The count field is what you were charged for.
|
|
263
263
|
*
|
|
264
|
-
* @param {
|
|
264
|
+
* @param {spyglass.GetBrandLandingPagesRequest} request
|
|
265
265
|
* @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
266
266
|
*
|
|
267
|
-
* @throws {@link
|
|
268
|
-
* @throws {@link
|
|
269
|
-
* @throws {@link
|
|
270
|
-
* @throws {@link
|
|
271
|
-
* @throws {@link
|
|
272
|
-
* @throws {@link
|
|
273
|
-
* @throws {@link
|
|
274
|
-
* @throws {@link
|
|
267
|
+
* @throws {@link spyglass.BadRequestError}
|
|
268
|
+
* @throws {@link spyglass.UnauthorizedError}
|
|
269
|
+
* @throws {@link spyglass.PaymentRequiredError}
|
|
270
|
+
* @throws {@link spyglass.ForbiddenError}
|
|
271
|
+
* @throws {@link spyglass.NotFoundError}
|
|
272
|
+
* @throws {@link spyglass.MethodNotAllowedError}
|
|
273
|
+
* @throws {@link spyglass.TooManyRequestsError}
|
|
274
|
+
* @throws {@link spyglass.InternalServerError}
|
|
275
275
|
* @throws {@link errors.SpyglassError}
|
|
276
276
|
* @throws {@link errors.SpyglassTimeoutError}
|
|
277
277
|
*
|
|
@@ -280,7 +280,7 @@ export declare class SearchClient {
|
|
|
280
280
|
* id: "id"
|
|
281
281
|
* })
|
|
282
282
|
*/
|
|
283
|
-
getBrandLandingPages(request:
|
|
283
|
+
getBrandLandingPages(request: spyglass.GetBrandLandingPagesRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.GetBrandLandingPagesResponse>;
|
|
284
284
|
private __getBrandLandingPages;
|
|
285
285
|
/**
|
|
286
286
|
* Return public comments for specific Instagram or TikTok posts.
|
|
@@ -307,17 +307,17 @@ export declare class SearchClient {
|
|
|
307
307
|
* Each comment page fetched live (`limit`, default 1) is one billed
|
|
308
308
|
* unit. Cached posts do not scrape and are not billed.
|
|
309
309
|
*
|
|
310
|
-
* @param {
|
|
310
|
+
* @param {spyglass.GetCommentsRequest} request
|
|
311
311
|
* @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
312
312
|
*
|
|
313
|
-
* @throws {@link
|
|
314
|
-
* @throws {@link
|
|
315
|
-
* @throws {@link
|
|
316
|
-
* @throws {@link
|
|
317
|
-
* @throws {@link
|
|
318
|
-
* @throws {@link
|
|
319
|
-
* @throws {@link
|
|
320
|
-
* @throws {@link
|
|
313
|
+
* @throws {@link spyglass.BadRequestError}
|
|
314
|
+
* @throws {@link spyglass.UnauthorizedError}
|
|
315
|
+
* @throws {@link spyglass.PaymentRequiredError}
|
|
316
|
+
* @throws {@link spyglass.ForbiddenError}
|
|
317
|
+
* @throws {@link spyglass.MethodNotAllowedError}
|
|
318
|
+
* @throws {@link spyglass.ContentTooLargeError}
|
|
319
|
+
* @throws {@link spyglass.TooManyRequestsError}
|
|
320
|
+
* @throws {@link spyglass.InternalServerError}
|
|
321
321
|
* @throws {@link errors.SpyglassError}
|
|
322
322
|
* @throws {@link errors.SpyglassTimeoutError}
|
|
323
323
|
*
|
|
@@ -328,6 +328,6 @@ export declare class SearchClient {
|
|
|
328
328
|
* limit: 1
|
|
329
329
|
* })
|
|
330
330
|
*/
|
|
331
|
-
getComments(request?:
|
|
331
|
+
getComments(request?: spyglass.GetCommentsRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.GetCommentsResponse>;
|
|
332
332
|
private __getComments;
|
|
333
333
|
}
|