@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
|
|
2
2
|
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
3
3
|
import * as core from "../../../../core/index.mjs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as spyglass from "../../../index.mjs";
|
|
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
|
}
|
|
@@ -15,7 +15,7 @@ import { mergeAdditionalBodyParameters } from "../../../../core/requestBody.mjs"
|
|
|
15
15
|
import * as environments from "../../../../environments.mjs";
|
|
16
16
|
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
17
17
|
import * as errors from "../../../../errors/index.mjs";
|
|
18
|
-
import * as
|
|
18
|
+
import * as spyglass from "../../../index.mjs";
|
|
19
19
|
/**
|
|
20
20
|
* Add an account we do not have yet, then poll until ready.
|
|
21
21
|
*/
|
|
@@ -35,16 +35,16 @@ export class IndexingClient {
|
|
|
35
35
|
* Limited to 50 requests per minute per user.
|
|
36
36
|
* This call is free.
|
|
37
37
|
*
|
|
38
|
-
* @param {
|
|
38
|
+
* @param {spyglass.IndexBrandRequest} request
|
|
39
39
|
* @param {IndexingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
40
40
|
*
|
|
41
|
-
* @throws {@link
|
|
42
|
-
* @throws {@link
|
|
43
|
-
* @throws {@link
|
|
44
|
-
* @throws {@link
|
|
45
|
-
* @throws {@link
|
|
46
|
-
* @throws {@link
|
|
47
|
-
* @throws {@link
|
|
41
|
+
* @throws {@link spyglass.BadRequestError}
|
|
42
|
+
* @throws {@link spyglass.UnauthorizedError}
|
|
43
|
+
* @throws {@link spyglass.ForbiddenError}
|
|
44
|
+
* @throws {@link spyglass.MethodNotAllowedError}
|
|
45
|
+
* @throws {@link spyglass.ContentTooLargeError}
|
|
46
|
+
* @throws {@link spyglass.TooManyRequestsError}
|
|
47
|
+
* @throws {@link spyglass.InternalServerError}
|
|
48
48
|
* @throws {@link errors.SpyglassError}
|
|
49
49
|
* @throws {@link errors.SpyglassTimeoutError}
|
|
50
50
|
*
|
|
@@ -81,19 +81,19 @@ export class IndexingClient {
|
|
|
81
81
|
if (_response.error.reason === "status-code") {
|
|
82
82
|
switch (_response.error.statusCode) {
|
|
83
83
|
case 400:
|
|
84
|
-
throw new
|
|
84
|
+
throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
|
|
85
85
|
case 401:
|
|
86
|
-
throw new
|
|
86
|
+
throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
87
87
|
case 403:
|
|
88
|
-
throw new
|
|
88
|
+
throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
89
89
|
case 405:
|
|
90
|
-
throw new
|
|
90
|
+
throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
|
|
91
91
|
case 413:
|
|
92
|
-
throw new
|
|
92
|
+
throw new spyglass.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
93
93
|
case 429:
|
|
94
|
-
throw new
|
|
94
|
+
throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
95
95
|
case 500:
|
|
96
|
-
throw new
|
|
96
|
+
throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
|
|
97
97
|
default:
|
|
98
98
|
throw new errors.SpyglassError({
|
|
99
99
|
statusCode: _response.error.statusCode,
|
|
@@ -111,16 +111,16 @@ export class IndexingClient {
|
|
|
111
111
|
* Limited to 300 requests per minute per user.
|
|
112
112
|
* This call is free.
|
|
113
113
|
*
|
|
114
|
-
* @param {
|
|
114
|
+
* @param {spyglass.IndexBrandStatusRequest} request
|
|
115
115
|
* @param {IndexingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
116
116
|
*
|
|
117
|
-
* @throws {@link
|
|
118
|
-
* @throws {@link
|
|
119
|
-
* @throws {@link
|
|
120
|
-
* @throws {@link
|
|
121
|
-
* @throws {@link
|
|
122
|
-
* @throws {@link
|
|
123
|
-
* @throws {@link
|
|
117
|
+
* @throws {@link spyglass.BadRequestError}
|
|
118
|
+
* @throws {@link spyglass.UnauthorizedError}
|
|
119
|
+
* @throws {@link spyglass.ForbiddenError}
|
|
120
|
+
* @throws {@link spyglass.NotFoundError}
|
|
121
|
+
* @throws {@link spyglass.MethodNotAllowedError}
|
|
122
|
+
* @throws {@link spyglass.TooManyRequestsError}
|
|
123
|
+
* @throws {@link spyglass.InternalServerError}
|
|
124
124
|
* @throws {@link errors.SpyglassError}
|
|
125
125
|
* @throws {@link errors.SpyglassTimeoutError}
|
|
126
126
|
*
|
|
@@ -155,19 +155,19 @@ export class IndexingClient {
|
|
|
155
155
|
if (_response.error.reason === "status-code") {
|
|
156
156
|
switch (_response.error.statusCode) {
|
|
157
157
|
case 400:
|
|
158
|
-
throw new
|
|
158
|
+
throw new spyglass.BadRequestError(_response.error.body, _response.rawResponse);
|
|
159
159
|
case 401:
|
|
160
|
-
throw new
|
|
160
|
+
throw new spyglass.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
161
161
|
case 403:
|
|
162
|
-
throw new
|
|
162
|
+
throw new spyglass.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
163
163
|
case 404:
|
|
164
|
-
throw new
|
|
164
|
+
throw new spyglass.NotFoundError(_response.error.body, _response.rawResponse);
|
|
165
165
|
case 405:
|
|
166
|
-
throw new
|
|
166
|
+
throw new spyglass.MethodNotAllowedError(_response.error.body, _response.rawResponse);
|
|
167
167
|
case 429:
|
|
168
|
-
throw new
|
|
168
|
+
throw new spyglass.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
169
169
|
case 500:
|
|
170
|
-
throw new
|
|
170
|
+
throw new spyglass.InternalServerError(_response.error.body, _response.rawResponse);
|
|
171
171
|
default:
|
|
172
172
|
throw new errors.SpyglassError({
|
|
173
173
|
statusCode: _response.error.statusCode,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
|
|
2
2
|
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
3
3
|
import * as core from "../../../../core/index.mjs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as spyglass from "../../../index.mjs";
|
|
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
|
}
|