@spyglasshq/sdk 0.1.0 → 0.1.2
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 +93 -89
- package/dist/cjs/api/resources/search/client/Client.js +153 -149
- 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 +93 -89
- package/dist/esm/api/resources/search/client/Client.mjs +153 -149
- 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 +31 -27
|
@@ -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 {
|
|
@@ -14,7 +14,10 @@ export declare class SearchClient {
|
|
|
14
14
|
protected readonly _options: NormalizedClientOptionsWithAuth<SearchClient.Options>;
|
|
15
15
|
constructor(options: SearchClient.Options);
|
|
16
16
|
/**
|
|
17
|
-
* Find brands
|
|
17
|
+
* Find brands.
|
|
18
|
+
* Search semantically with `query`, or look them up by name, id, or
|
|
19
|
+
* social handle. Either way, you can also narrow the results with
|
|
20
|
+
* filters such as product taxonomy, location, and follower count.
|
|
18
21
|
*
|
|
19
22
|
* Send one search field. Each field is its own mode:
|
|
20
23
|
*
|
|
@@ -48,32 +51,33 @@ export declare class SearchClient {
|
|
|
48
51
|
* A `query` search runs a language model, so it bills a minimum of one
|
|
49
52
|
* row even when nothing matches.
|
|
50
53
|
*
|
|
51
|
-
* @param {
|
|
54
|
+
* @param {spyglass.SearchBrandsRequest} request
|
|
52
55
|
* @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
53
56
|
*
|
|
54
|
-
* @throws {@link
|
|
55
|
-
* @throws {@link
|
|
56
|
-
* @throws {@link
|
|
57
|
-
* @throws {@link
|
|
58
|
-
* @throws {@link
|
|
59
|
-
* @throws {@link
|
|
60
|
-
* @throws {@link
|
|
61
|
-
* @throws {@link
|
|
57
|
+
* @throws {@link spyglass.BadRequestError}
|
|
58
|
+
* @throws {@link spyglass.UnauthorizedError}
|
|
59
|
+
* @throws {@link spyglass.PaymentRequiredError}
|
|
60
|
+
* @throws {@link spyglass.ForbiddenError}
|
|
61
|
+
* @throws {@link spyglass.MethodNotAllowedError}
|
|
62
|
+
* @throws {@link spyglass.ContentTooLargeError}
|
|
63
|
+
* @throws {@link spyglass.TooManyRequestsError}
|
|
64
|
+
* @throws {@link spyglass.InternalServerError}
|
|
62
65
|
* @throws {@link errors.SpyglassError}
|
|
63
66
|
* @throws {@link errors.SpyglassTimeoutError}
|
|
64
67
|
*
|
|
65
68
|
* @example
|
|
66
|
-
* await client.search.
|
|
69
|
+
* await client.search.brands({
|
|
67
70
|
* names: ["Nike"],
|
|
68
71
|
* limit: 3
|
|
69
72
|
* })
|
|
70
73
|
*/
|
|
71
|
-
|
|
72
|
-
private
|
|
74
|
+
brands(request?: spyglass.SearchBrandsRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.SearchBrandsResponse>;
|
|
75
|
+
private __brands;
|
|
73
76
|
/**
|
|
74
|
-
* Find creators
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
+
* Find creators.
|
|
78
|
+
* Search semantically with `query`, or look them up by name, id, or
|
|
79
|
+
* social handle. Either way, you can also narrow the results with
|
|
80
|
+
* filters such as audience profile, location, and follower count.
|
|
77
81
|
*
|
|
78
82
|
* Send one search field. Each field is its own mode:
|
|
79
83
|
*
|
|
@@ -107,17 +111,17 @@ export declare class SearchClient {
|
|
|
107
111
|
* A `query` search runs a language model, so it bills a minimum of one
|
|
108
112
|
* row even when nothing matches.
|
|
109
113
|
*
|
|
110
|
-
* @param {
|
|
114
|
+
* @param {spyglass.SearchCreatorsRequest} request
|
|
111
115
|
* @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
112
116
|
*
|
|
113
|
-
* @throws {@link
|
|
114
|
-
* @throws {@link
|
|
115
|
-
* @throws {@link
|
|
116
|
-
* @throws {@link
|
|
117
|
-
* @throws {@link
|
|
118
|
-
* @throws {@link
|
|
119
|
-
* @throws {@link
|
|
120
|
-
* @throws {@link
|
|
117
|
+
* @throws {@link spyglass.BadRequestError}
|
|
118
|
+
* @throws {@link spyglass.UnauthorizedError}
|
|
119
|
+
* @throws {@link spyglass.PaymentRequiredError}
|
|
120
|
+
* @throws {@link spyglass.ForbiddenError}
|
|
121
|
+
* @throws {@link spyglass.MethodNotAllowedError}
|
|
122
|
+
* @throws {@link spyglass.ContentTooLargeError}
|
|
123
|
+
* @throws {@link spyglass.TooManyRequestsError}
|
|
124
|
+
* @throws {@link spyglass.InternalServerError}
|
|
121
125
|
* @throws {@link errors.SpyglassError}
|
|
122
126
|
* @throws {@link errors.SpyglassTimeoutError}
|
|
123
127
|
*
|
|
@@ -128,7 +132,7 @@ export declare class SearchClient {
|
|
|
128
132
|
* gender: "female"
|
|
129
133
|
* })
|
|
130
134
|
*/
|
|
131
|
-
creators(request?:
|
|
135
|
+
creators(request?: spyglass.SearchCreatorsRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.SearchCreatorsResponse>;
|
|
132
136
|
private __creators;
|
|
133
137
|
/**
|
|
134
138
|
* Fetch a single brand or creator by id. The `type` field tells you
|
|
@@ -139,17 +143,17 @@ export declare class SearchClient {
|
|
|
139
143
|
* Costs 2,000 microdollars ($0.0020) per account returned, charged against your plan's monthly credits.
|
|
140
144
|
* An id that matches nothing returns 404 and is free.
|
|
141
145
|
*
|
|
142
|
-
* @param {
|
|
146
|
+
* @param {spyglass.GetAccountRequest} request
|
|
143
147
|
* @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
144
148
|
*
|
|
145
|
-
* @throws {@link
|
|
146
|
-
* @throws {@link
|
|
147
|
-
* @throws {@link
|
|
148
|
-
* @throws {@link
|
|
149
|
-
* @throws {@link
|
|
150
|
-
* @throws {@link
|
|
151
|
-
* @throws {@link
|
|
152
|
-
* @throws {@link
|
|
149
|
+
* @throws {@link spyglass.BadRequestError}
|
|
150
|
+
* @throws {@link spyglass.UnauthorizedError}
|
|
151
|
+
* @throws {@link spyglass.PaymentRequiredError}
|
|
152
|
+
* @throws {@link spyglass.ForbiddenError}
|
|
153
|
+
* @throws {@link spyglass.NotFoundError}
|
|
154
|
+
* @throws {@link spyglass.MethodNotAllowedError}
|
|
155
|
+
* @throws {@link spyglass.TooManyRequestsError}
|
|
156
|
+
* @throws {@link spyglass.InternalServerError}
|
|
153
157
|
* @throws {@link errors.SpyglassError}
|
|
154
158
|
* @throws {@link errors.SpyglassTimeoutError}
|
|
155
159
|
*
|
|
@@ -158,7 +162,7 @@ export declare class SearchClient {
|
|
|
158
162
|
* id: "id"
|
|
159
163
|
* })
|
|
160
164
|
*/
|
|
161
|
-
getAccount(request:
|
|
165
|
+
getAccount(request: spyglass.GetAccountRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.GetAccountResponse>;
|
|
162
166
|
private __getAccount;
|
|
163
167
|
/**
|
|
164
168
|
* Find taxonomy paths you can pass to POST /media as `taxonomy`.
|
|
@@ -168,16 +172,16 @@ export declare class SearchClient {
|
|
|
168
172
|
* Limited to 120 requests per minute per user.
|
|
169
173
|
* This call is free and does not use credits.
|
|
170
174
|
*
|
|
171
|
-
* @param {
|
|
175
|
+
* @param {spyglass.SearchTaxonomiesRequest} request
|
|
172
176
|
* @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
173
177
|
*
|
|
174
|
-
* @throws {@link
|
|
175
|
-
* @throws {@link
|
|
176
|
-
* @throws {@link
|
|
177
|
-
* @throws {@link
|
|
178
|
-
* @throws {@link
|
|
179
|
-
* @throws {@link
|
|
180
|
-
* @throws {@link
|
|
178
|
+
* @throws {@link spyglass.BadRequestError}
|
|
179
|
+
* @throws {@link spyglass.UnauthorizedError}
|
|
180
|
+
* @throws {@link spyglass.PaymentRequiredError}
|
|
181
|
+
* @throws {@link spyglass.ForbiddenError}
|
|
182
|
+
* @throws {@link spyglass.MethodNotAllowedError}
|
|
183
|
+
* @throws {@link spyglass.TooManyRequestsError}
|
|
184
|
+
* @throws {@link spyglass.InternalServerError}
|
|
181
185
|
* @throws {@link errors.SpyglassError}
|
|
182
186
|
* @throws {@link errors.SpyglassTimeoutError}
|
|
183
187
|
*
|
|
@@ -186,7 +190,7 @@ export declare class SearchClient {
|
|
|
186
190
|
* query: "running shoes"
|
|
187
191
|
* })
|
|
188
192
|
*/
|
|
189
|
-
taxonomies(request:
|
|
193
|
+
taxonomies(request: spyglass.SearchTaxonomiesRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.SearchTaxonomiesResponse>;
|
|
190
194
|
private __taxonomies;
|
|
191
195
|
/**
|
|
192
196
|
* Return creatives. Pass `brandId` to scope to one brand or creator,
|
|
@@ -198,29 +202,29 @@ export declare class SearchClient {
|
|
|
198
202
|
* The call bills a minimum of one row even when nothing matches. In that
|
|
199
203
|
* case `count` is 0 but you are charged for one row.
|
|
200
204
|
*
|
|
201
|
-
* @param {
|
|
205
|
+
* @param {spyglass.GetMediaRequest} request
|
|
202
206
|
* @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
203
207
|
*
|
|
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
|
|
208
|
+
* @throws {@link spyglass.BadRequestError}
|
|
209
|
+
* @throws {@link spyglass.UnauthorizedError}
|
|
210
|
+
* @throws {@link spyglass.PaymentRequiredError}
|
|
211
|
+
* @throws {@link spyglass.ForbiddenError}
|
|
212
|
+
* @throws {@link spyglass.NotFoundError}
|
|
213
|
+
* @throws {@link spyglass.MethodNotAllowedError}
|
|
214
|
+
* @throws {@link spyglass.ContentTooLargeError}
|
|
215
|
+
* @throws {@link spyglass.TooManyRequestsError}
|
|
216
|
+
* @throws {@link spyglass.InternalServerError}
|
|
213
217
|
* @throws {@link errors.SpyglassError}
|
|
214
218
|
* @throws {@link errors.SpyglassTimeoutError}
|
|
215
219
|
*
|
|
216
220
|
* @example
|
|
217
|
-
* await client.search.
|
|
221
|
+
* await client.search.getMedia({
|
|
218
222
|
* query: "comfort-focused video ads",
|
|
219
223
|
* limit: 20
|
|
220
224
|
* })
|
|
221
225
|
*/
|
|
222
|
-
|
|
223
|
-
private
|
|
226
|
+
getMedia(request?: spyglass.GetMediaRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.GetMediaResponse>;
|
|
227
|
+
private __getMedia;
|
|
224
228
|
/**
|
|
225
229
|
* Return clustered creative themes for an account. `MEDIA_MIX` returns a
|
|
226
230
|
* breakdown by media type; the other types return weekly buckets plus
|
|
@@ -232,17 +236,17 @@ export declare class SearchClient {
|
|
|
232
236
|
* Limited to 120 requests per minute per user.
|
|
233
237
|
* 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
238
|
*
|
|
235
|
-
* @param {
|
|
239
|
+
* @param {spyglass.GetBrandMediaInsightsRequest} request
|
|
236
240
|
* @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
237
241
|
*
|
|
238
|
-
* @throws {@link
|
|
239
|
-
* @throws {@link
|
|
240
|
-
* @throws {@link
|
|
241
|
-
* @throws {@link
|
|
242
|
-
* @throws {@link
|
|
243
|
-
* @throws {@link
|
|
244
|
-
* @throws {@link
|
|
245
|
-
* @throws {@link
|
|
242
|
+
* @throws {@link spyglass.BadRequestError}
|
|
243
|
+
* @throws {@link spyglass.UnauthorizedError}
|
|
244
|
+
* @throws {@link spyglass.PaymentRequiredError}
|
|
245
|
+
* @throws {@link spyglass.ForbiddenError}
|
|
246
|
+
* @throws {@link spyglass.NotFoundError}
|
|
247
|
+
* @throws {@link spyglass.MethodNotAllowedError}
|
|
248
|
+
* @throws {@link spyglass.TooManyRequestsError}
|
|
249
|
+
* @throws {@link spyglass.InternalServerError}
|
|
246
250
|
* @throws {@link errors.SpyglassError}
|
|
247
251
|
* @throws {@link errors.SpyglassTimeoutError}
|
|
248
252
|
*
|
|
@@ -252,7 +256,7 @@ export declare class SearchClient {
|
|
|
252
256
|
* type: "HOOK"
|
|
253
257
|
* })
|
|
254
258
|
*/
|
|
255
|
-
getBrandMediaInsights(request:
|
|
259
|
+
getBrandMediaInsights(request: spyglass.GetBrandMediaInsightsRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.GetBrandMediaInsightsResponse>;
|
|
256
260
|
private __getBrandMediaInsights;
|
|
257
261
|
/**
|
|
258
262
|
* Return the landing-page URLs a brand sends ad traffic to, ranked by
|
|
@@ -261,17 +265,17 @@ export declare class SearchClient {
|
|
|
261
265
|
* Limited to 120 requests per minute per user.
|
|
262
266
|
* 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
267
|
*
|
|
264
|
-
* @param {
|
|
268
|
+
* @param {spyglass.GetBrandLandingPagesRequest} request
|
|
265
269
|
* @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
266
270
|
*
|
|
267
|
-
* @throws {@link
|
|
268
|
-
* @throws {@link
|
|
269
|
-
* @throws {@link
|
|
270
|
-
* @throws {@link
|
|
271
|
-
* @throws {@link
|
|
272
|
-
* @throws {@link
|
|
273
|
-
* @throws {@link
|
|
274
|
-
* @throws {@link
|
|
271
|
+
* @throws {@link spyglass.BadRequestError}
|
|
272
|
+
* @throws {@link spyglass.UnauthorizedError}
|
|
273
|
+
* @throws {@link spyglass.PaymentRequiredError}
|
|
274
|
+
* @throws {@link spyglass.ForbiddenError}
|
|
275
|
+
* @throws {@link spyglass.NotFoundError}
|
|
276
|
+
* @throws {@link spyglass.MethodNotAllowedError}
|
|
277
|
+
* @throws {@link spyglass.TooManyRequestsError}
|
|
278
|
+
* @throws {@link spyglass.InternalServerError}
|
|
275
279
|
* @throws {@link errors.SpyglassError}
|
|
276
280
|
* @throws {@link errors.SpyglassTimeoutError}
|
|
277
281
|
*
|
|
@@ -280,7 +284,7 @@ export declare class SearchClient {
|
|
|
280
284
|
* id: "id"
|
|
281
285
|
* })
|
|
282
286
|
*/
|
|
283
|
-
getBrandLandingPages(request:
|
|
287
|
+
getBrandLandingPages(request: spyglass.GetBrandLandingPagesRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.GetBrandLandingPagesResponse>;
|
|
284
288
|
private __getBrandLandingPages;
|
|
285
289
|
/**
|
|
286
290
|
* Return public comments for specific Instagram or TikTok posts.
|
|
@@ -307,17 +311,17 @@ export declare class SearchClient {
|
|
|
307
311
|
* Each comment page fetched live (`limit`, default 1) is one billed
|
|
308
312
|
* unit. Cached posts do not scrape and are not billed.
|
|
309
313
|
*
|
|
310
|
-
* @param {
|
|
314
|
+
* @param {spyglass.GetCommentsRequest} request
|
|
311
315
|
* @param {SearchClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
312
316
|
*
|
|
313
|
-
* @throws {@link
|
|
314
|
-
* @throws {@link
|
|
315
|
-
* @throws {@link
|
|
316
|
-
* @throws {@link
|
|
317
|
-
* @throws {@link
|
|
318
|
-
* @throws {@link
|
|
319
|
-
* @throws {@link
|
|
320
|
-
* @throws {@link
|
|
317
|
+
* @throws {@link spyglass.BadRequestError}
|
|
318
|
+
* @throws {@link spyglass.UnauthorizedError}
|
|
319
|
+
* @throws {@link spyglass.PaymentRequiredError}
|
|
320
|
+
* @throws {@link spyglass.ForbiddenError}
|
|
321
|
+
* @throws {@link spyglass.MethodNotAllowedError}
|
|
322
|
+
* @throws {@link spyglass.ContentTooLargeError}
|
|
323
|
+
* @throws {@link spyglass.TooManyRequestsError}
|
|
324
|
+
* @throws {@link spyglass.InternalServerError}
|
|
321
325
|
* @throws {@link errors.SpyglassError}
|
|
322
326
|
* @throws {@link errors.SpyglassTimeoutError}
|
|
323
327
|
*
|
|
@@ -328,6 +332,6 @@ export declare class SearchClient {
|
|
|
328
332
|
* limit: 1
|
|
329
333
|
* })
|
|
330
334
|
*/
|
|
331
|
-
getComments(request?:
|
|
335
|
+
getComments(request?: spyglass.GetCommentsRequest, requestOptions?: SearchClient.RequestOptions): core.HttpResponsePromise<spyglass.GetCommentsResponse>;
|
|
332
336
|
private __getComments;
|
|
333
337
|
}
|