influship 0.5.0 → 0.10.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/CHANGELOG.md +126 -0
- package/api-promise.d.mts +1 -0
- package/api-promise.d.mts.map +1 -1
- package/api-promise.d.ts +1 -0
- package/api-promise.d.ts.map +1 -1
- package/api-promise.mjs +1 -0
- package/api-promise.mjs.map +1 -1
- package/client.d.mts +1 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +1 -0
- package/client.d.ts.map +1 -1
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/uploads.d.mts.map +1 -1
- package/core/uploads.d.ts.map +1 -1
- package/core/uploads.mjs.map +1 -1
- package/error.d.mts +1 -0
- package/error.d.mts.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.mjs +1 -0
- package/error.mjs.map +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.mjs.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/qs/formats.d.mts.map +1 -1
- package/internal/qs/formats.d.ts.map +1 -1
- package/internal/qs/index.d.mts +2 -2
- package/internal/qs/index.d.mts.map +1 -1
- package/internal/qs/index.d.ts +2 -2
- package/internal/qs/index.d.ts.map +1 -1
- package/internal/qs/index.mjs.map +1 -1
- package/internal/qs/stringify.d.mts.map +1 -1
- package/internal/qs/stringify.d.ts.map +1 -1
- package/internal/qs/stringify.mjs.map +1 -1
- package/internal/qs/utils.d.mts.map +1 -1
- package/internal/qs/utils.d.ts.map +1 -1
- package/internal/qs/utils.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.d.mts +6 -0
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +6 -0
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +4 -4
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +4 -4
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +3 -2
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +3 -2
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.mjs.map +1 -1
- package/package.json +9 -15
- package/pagination.d.mts +1 -0
- package/pagination.d.mts.map +1 -1
- package/pagination.d.ts +1 -0
- package/pagination.d.ts.map +1 -1
- package/pagination.mjs +1 -0
- package/pagination.mjs.map +1 -1
- package/resource.d.mts +1 -0
- package/resource.d.mts.map +1 -1
- package/resource.d.ts +1 -0
- package/resource.d.ts.map +1 -1
- package/resource.mjs +1 -0
- package/resource.mjs.map +1 -1
- package/resources/creators.d.mts +30 -3
- package/resources/creators.d.mts.map +1 -1
- package/resources/creators.d.ts +30 -3
- package/resources/creators.d.ts.map +1 -1
- package/resources/creators.js +13 -2
- package/resources/creators.js.map +1 -1
- package/resources/creators.mjs +13 -2
- package/resources/creators.mjs.map +1 -1
- package/resources/health.d.mts.map +1 -1
- package/resources/health.d.ts.map +1 -1
- package/resources/health.mjs.map +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/posts.d.mts +3 -0
- package/resources/posts.d.mts.map +1 -1
- package/resources/posts.d.ts +3 -0
- package/resources/posts.d.ts.map +1 -1
- package/resources/posts.js +3 -0
- package/resources/posts.js.map +1 -1
- package/resources/posts.mjs +3 -0
- package/resources/posts.mjs.map +1 -1
- package/resources/profiles.d.mts +6 -0
- package/resources/profiles.d.mts.map +1 -1
- package/resources/profiles.d.ts +6 -0
- package/resources/profiles.d.ts.map +1 -1
- package/resources/profiles.js +6 -0
- package/resources/profiles.js.map +1 -1
- package/resources/profiles.mjs +6 -0
- package/resources/profiles.mjs.map +1 -1
- package/resources/raw/index.d.mts +1 -1
- package/resources/raw/index.d.mts.map +1 -1
- package/resources/raw/index.d.ts +1 -1
- package/resources/raw/index.d.ts.map +1 -1
- package/resources/raw/index.js.map +1 -1
- package/resources/raw/index.mjs +1 -1
- package/resources/raw/index.mjs.map +1 -1
- package/resources/raw/instagram.d.mts +380 -1
- package/resources/raw/instagram.d.mts.map +1 -1
- package/resources/raw/instagram.d.ts +380 -1
- package/resources/raw/instagram.d.ts.map +1 -1
- package/resources/raw/instagram.js +83 -0
- package/resources/raw/instagram.js.map +1 -1
- package/resources/raw/instagram.mjs +83 -0
- package/resources/raw/instagram.mjs.map +1 -1
- package/resources/raw/raw.d.mts +2 -2
- package/resources/raw/raw.d.mts.map +1 -1
- package/resources/raw/raw.d.ts +2 -2
- package/resources/raw/raw.d.ts.map +1 -1
- package/resources/raw/raw.js.map +1 -1
- package/resources/raw/raw.mjs +1 -1
- package/resources/raw/raw.mjs.map +1 -1
- package/resources/raw/youtube.d.mts +29 -0
- package/resources/raw/youtube.d.mts.map +1 -1
- package/resources/raw/youtube.d.ts +29 -0
- package/resources/raw/youtube.d.ts.map +1 -1
- package/resources/raw/youtube.js +29 -0
- package/resources/raw/youtube.js.map +1 -1
- package/resources/raw/youtube.mjs +29 -0
- package/resources/raw/youtube.mjs.map +1 -1
- package/resources/raw.d.mts.map +1 -1
- package/resources/raw.d.ts.map +1 -1
- package/resources/raw.mjs.map +1 -1
- package/resources/search.d.mts +8 -0
- package/resources/search.d.mts.map +1 -1
- package/resources/search.d.ts +8 -0
- package/resources/search.d.ts.map +1 -1
- package/resources/search.js +3 -0
- package/resources/search.js.map +1 -1
- package/resources/search.mjs +3 -0
- package/resources/search.mjs.map +1 -1
- package/resources/shared.d.mts +6 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +6 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/client.ts +1 -0
- package/src/internal/utils/log.ts +2 -1
- package/src/resources/creators.ts +34 -3
- package/src/resources/posts.ts +3 -0
- package/src/resources/profiles.ts +6 -0
- package/src/resources/raw/index.ts +14 -1
- package/src/resources/raw/instagram.ts +595 -0
- package/src/resources/raw/raw.ts +23 -1
- package/src/resources/raw/youtube.ts +29 -0
- package/src/resources/search.ts +9 -0
- package/src/resources/shared.ts +10 -0
- package/src/version.ts +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as InstagramAPI from './instagram';
|
|
5
|
+
import * as Shared from '../shared';
|
|
4
6
|
import { APIPromise } from '../../core/api-promise';
|
|
5
7
|
import { RequestOptions } from '../../internal/request-options';
|
|
6
8
|
import { path } from '../../internal/utils/path';
|
|
@@ -9,6 +11,48 @@ import { path } from '../../internal/utils/path';
|
|
|
9
11
|
* Fetch fresh data directly from social platforms in real-time. Use when you need the most current information or data for profiles not yet in our database.
|
|
10
12
|
*/
|
|
11
13
|
export class Instagram extends APIResource {
|
|
14
|
+
/**
|
|
15
|
+
* Fetch fresh Instagram post-page data by shortcode. This raw endpoint includes
|
|
16
|
+
* rich post-page fields like coauthors, tagged users, paid partnership metadata,
|
|
17
|
+
* product mentions, music attribution, location, display resources, and video
|
|
18
|
+
* versions.
|
|
19
|
+
*
|
|
20
|
+
* **Note:** These fields are only guaranteed on this raw single-post lookup.
|
|
21
|
+
* Cached post-list endpoints may not include them.
|
|
22
|
+
*
|
|
23
|
+
* **Pricing**: 1 credit per post scraped ($0.01)
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* const response = await client.raw.instagram.getPost(
|
|
28
|
+
* 'C0ABC123xyz',
|
|
29
|
+
* );
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
getPost(shortcode: string, options?: RequestOptions): APIPromise<InstagramGetPostResponse> {
|
|
33
|
+
return this._client.get(path`/v1/raw/instagram/post/${shortcode}`, options);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Fetch fresh Instagram post-page data for a bounded list of shortcodes. This
|
|
38
|
+
* returns one item per requested shortcode with per-item success or error details.
|
|
39
|
+
*
|
|
40
|
+
* **Note:** Batch post lookup is capped at 20 shortcodes per request and is
|
|
41
|
+
* charged for every requested shortcode.
|
|
42
|
+
*
|
|
43
|
+
* **Pricing**: 1 credit per post scraped ($0.01)
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const response = await client.raw.instagram.getPosts({
|
|
48
|
+
* shortcodes: ['C0ABC123xyz', 'D1DEF456uvw'],
|
|
49
|
+
* });
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
getPosts(body: InstagramGetPostsParams, options?: RequestOptions): APIPromise<InstagramGetPostsResponse> {
|
|
53
|
+
return this._client.post('/v1/raw/instagram/posts', { body, ...options });
|
|
54
|
+
}
|
|
55
|
+
|
|
12
56
|
/**
|
|
13
57
|
* Fetch fresh Instagram profile data directly from Instagram in real-time. Use
|
|
14
58
|
* this when you need the most current follower counts, bio, or recent activity.
|
|
@@ -23,6 +67,13 @@ export class Instagram extends APIResource {
|
|
|
23
67
|
* Use cached endpoints when freshness isn't critical.
|
|
24
68
|
*
|
|
25
69
|
* **Pricing**: 0.5 credits per profile scraped ($0.005)
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* const response = await client.raw.instagram.getProfile(
|
|
74
|
+
* 'fitness_coach_jane',
|
|
75
|
+
* );
|
|
76
|
+
* ```
|
|
26
77
|
*/
|
|
27
78
|
getProfile(
|
|
28
79
|
username: string,
|
|
@@ -31,6 +82,385 @@ export class Instagram extends APIResource {
|
|
|
31
82
|
): APIPromise<InstagramGetProfileResponse> {
|
|
32
83
|
return this._client.get(path`/v1/raw/instagram/profile/${username}`, { query, ...options });
|
|
33
84
|
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Transcribe an Instagram video post by shortcode and return the raw post-page
|
|
88
|
+
* data used for transcription.
|
|
89
|
+
*
|
|
90
|
+
* **Pricing**: 5 credits per transcript ($0.05)
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```ts
|
|
94
|
+
* const response = await client.raw.instagram.getTranscript(
|
|
95
|
+
* 'C0ABC123xyz',
|
|
96
|
+
* );
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
getTranscript(
|
|
100
|
+
shortcode: string,
|
|
101
|
+
query: InstagramGetTranscriptParams | null | undefined = {},
|
|
102
|
+
options?: RequestOptions,
|
|
103
|
+
): APIPromise<InstagramGetTranscriptResponse> {
|
|
104
|
+
return this._client.get(path`/v1/raw/instagram/transcript/${shortcode}`, { query, ...options });
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Transcribe a bounded list of Instagram video posts by shortcode and return one
|
|
109
|
+
* item per requested shortcode with per-item success or error details. Successful
|
|
110
|
+
* items include the raw post-page data used for transcription.
|
|
111
|
+
*
|
|
112
|
+
* **Note:** Batch transcription is capped at 10 shortcodes per request and is
|
|
113
|
+
* charged for every requested shortcode.
|
|
114
|
+
*
|
|
115
|
+
* **Pricing**: 5 credits per transcript ($0.05)
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* ```ts
|
|
119
|
+
* const response = await client.raw.instagram.getTranscripts({
|
|
120
|
+
* shortcodes: ['C0ABC123xyz', 'D1DEF456uvw'],
|
|
121
|
+
* });
|
|
122
|
+
* ```
|
|
123
|
+
*/
|
|
124
|
+
getTranscripts(
|
|
125
|
+
body: InstagramGetTranscriptsParams,
|
|
126
|
+
options?: RequestOptions,
|
|
127
|
+
): APIPromise<InstagramGetTranscriptsResponse> {
|
|
128
|
+
return this._client.post('/v1/raw/instagram/transcripts', { body, ...options });
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export interface InstagramSinglePostResponse {
|
|
133
|
+
post: InstagramSinglePostResponse.Post;
|
|
134
|
+
|
|
135
|
+
scraped_at: string;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export namespace InstagramSinglePostResponse {
|
|
139
|
+
export interface Post {
|
|
140
|
+
id: string;
|
|
141
|
+
|
|
142
|
+
caption: string | null;
|
|
143
|
+
|
|
144
|
+
comment_count: number;
|
|
145
|
+
|
|
146
|
+
display_url: string;
|
|
147
|
+
|
|
148
|
+
is_video: boolean;
|
|
149
|
+
|
|
150
|
+
like_count: number;
|
|
151
|
+
|
|
152
|
+
post_type: 'image' | 'video' | 'carousel';
|
|
153
|
+
|
|
154
|
+
shortcode: string;
|
|
155
|
+
|
|
156
|
+
taken_at: number | null;
|
|
157
|
+
|
|
158
|
+
accessibility_caption?: string | null;
|
|
159
|
+
|
|
160
|
+
carousel_items?: Array<Post.CarouselItem>;
|
|
161
|
+
|
|
162
|
+
coauthor_usernames?: Array<string>;
|
|
163
|
+
|
|
164
|
+
display_resources?: Array<Post.DisplayResource>;
|
|
165
|
+
|
|
166
|
+
engagement_visibility?: Post.EngagementVisibility | null;
|
|
167
|
+
|
|
168
|
+
is_paid_partnership?: boolean | null;
|
|
169
|
+
|
|
170
|
+
is_pinned?: boolean | null;
|
|
171
|
+
|
|
172
|
+
location?: Post.Location | null;
|
|
173
|
+
|
|
174
|
+
music_attribution?: Post.MusicAttribution | null;
|
|
175
|
+
|
|
176
|
+
owner_username?: string;
|
|
177
|
+
|
|
178
|
+
product_mentions?: Array<Post.ProductMention>;
|
|
179
|
+
|
|
180
|
+
sponsor_usernames?: Array<string>;
|
|
181
|
+
|
|
182
|
+
tagged_usernames?: Array<string>;
|
|
183
|
+
|
|
184
|
+
thumbnail_url?: string;
|
|
185
|
+
|
|
186
|
+
video_url?: string;
|
|
187
|
+
|
|
188
|
+
video_versions?: Array<Post.VideoVersion>;
|
|
189
|
+
|
|
190
|
+
view_count?: number;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export namespace Post {
|
|
194
|
+
export interface CarouselItem {
|
|
195
|
+
display_url: string;
|
|
196
|
+
|
|
197
|
+
index: number;
|
|
198
|
+
|
|
199
|
+
is_video: boolean;
|
|
200
|
+
|
|
201
|
+
thumbnail_url?: string;
|
|
202
|
+
|
|
203
|
+
video_url?: string;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export interface DisplayResource {
|
|
207
|
+
config_height: number;
|
|
208
|
+
|
|
209
|
+
config_width: number;
|
|
210
|
+
|
|
211
|
+
src: string;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export interface EngagementVisibility {
|
|
215
|
+
comments_disabled?: boolean | null;
|
|
216
|
+
|
|
217
|
+
like_and_view_counts_disabled?: boolean | null;
|
|
218
|
+
|
|
219
|
+
viewer_can_reshare?: boolean | null;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export interface Location {
|
|
223
|
+
id?: string | null;
|
|
224
|
+
|
|
225
|
+
address_json?: { [key: string]: unknown } | null;
|
|
226
|
+
|
|
227
|
+
has_public_page?: boolean | null;
|
|
228
|
+
|
|
229
|
+
lat?: number | null;
|
|
230
|
+
|
|
231
|
+
lng?: number | null;
|
|
232
|
+
|
|
233
|
+
name?: string | null;
|
|
234
|
+
|
|
235
|
+
slug?: string | null;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export interface MusicAttribution {
|
|
239
|
+
artist_name?: string | null;
|
|
240
|
+
|
|
241
|
+
audio_id?: string | null;
|
|
242
|
+
|
|
243
|
+
should_mute_audio?: boolean | null;
|
|
244
|
+
|
|
245
|
+
song_name?: string | null;
|
|
246
|
+
|
|
247
|
+
uses_original_audio?: boolean | null;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export interface ProductMention {
|
|
251
|
+
merchant_username?: string | null;
|
|
252
|
+
|
|
253
|
+
product_id?: string | null;
|
|
254
|
+
|
|
255
|
+
product_name?: string | null;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export interface VideoVersion {
|
|
259
|
+
url: string;
|
|
260
|
+
|
|
261
|
+
id?: string;
|
|
262
|
+
|
|
263
|
+
height?: number;
|
|
264
|
+
|
|
265
|
+
type?: number;
|
|
266
|
+
|
|
267
|
+
width?: number;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export interface InstagramTranscriptResponse {
|
|
273
|
+
full_text: string;
|
|
274
|
+
|
|
275
|
+
language: string;
|
|
276
|
+
|
|
277
|
+
post: InstagramTranscriptResponse.Post;
|
|
278
|
+
|
|
279
|
+
scraped_at: string;
|
|
280
|
+
|
|
281
|
+
shortcode: string;
|
|
282
|
+
|
|
283
|
+
transcript: string;
|
|
284
|
+
|
|
285
|
+
word_count: number;
|
|
286
|
+
|
|
287
|
+
duration_seconds?: number;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
export namespace InstagramTranscriptResponse {
|
|
291
|
+
export interface Post {
|
|
292
|
+
id: string;
|
|
293
|
+
|
|
294
|
+
caption: string | null;
|
|
295
|
+
|
|
296
|
+
comment_count: number;
|
|
297
|
+
|
|
298
|
+
display_url: string;
|
|
299
|
+
|
|
300
|
+
is_video: boolean;
|
|
301
|
+
|
|
302
|
+
like_count: number;
|
|
303
|
+
|
|
304
|
+
post_type: 'image' | 'video' | 'carousel';
|
|
305
|
+
|
|
306
|
+
shortcode: string;
|
|
307
|
+
|
|
308
|
+
taken_at: number | null;
|
|
309
|
+
|
|
310
|
+
accessibility_caption?: string | null;
|
|
311
|
+
|
|
312
|
+
carousel_items?: Array<Post.CarouselItem>;
|
|
313
|
+
|
|
314
|
+
coauthor_usernames?: Array<string>;
|
|
315
|
+
|
|
316
|
+
display_resources?: Array<Post.DisplayResource>;
|
|
317
|
+
|
|
318
|
+
engagement_visibility?: Post.EngagementVisibility | null;
|
|
319
|
+
|
|
320
|
+
is_paid_partnership?: boolean | null;
|
|
321
|
+
|
|
322
|
+
is_pinned?: boolean | null;
|
|
323
|
+
|
|
324
|
+
location?: Post.Location | null;
|
|
325
|
+
|
|
326
|
+
music_attribution?: Post.MusicAttribution | null;
|
|
327
|
+
|
|
328
|
+
owner_username?: string;
|
|
329
|
+
|
|
330
|
+
product_mentions?: Array<Post.ProductMention>;
|
|
331
|
+
|
|
332
|
+
sponsor_usernames?: Array<string>;
|
|
333
|
+
|
|
334
|
+
tagged_usernames?: Array<string>;
|
|
335
|
+
|
|
336
|
+
thumbnail_url?: string;
|
|
337
|
+
|
|
338
|
+
video_url?: string;
|
|
339
|
+
|
|
340
|
+
video_versions?: Array<Post.VideoVersion>;
|
|
341
|
+
|
|
342
|
+
view_count?: number;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
export namespace Post {
|
|
346
|
+
export interface CarouselItem {
|
|
347
|
+
display_url: string;
|
|
348
|
+
|
|
349
|
+
index: number;
|
|
350
|
+
|
|
351
|
+
is_video: boolean;
|
|
352
|
+
|
|
353
|
+
thumbnail_url?: string;
|
|
354
|
+
|
|
355
|
+
video_url?: string;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
export interface DisplayResource {
|
|
359
|
+
config_height: number;
|
|
360
|
+
|
|
361
|
+
config_width: number;
|
|
362
|
+
|
|
363
|
+
src: string;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
export interface EngagementVisibility {
|
|
367
|
+
comments_disabled?: boolean | null;
|
|
368
|
+
|
|
369
|
+
like_and_view_counts_disabled?: boolean | null;
|
|
370
|
+
|
|
371
|
+
viewer_can_reshare?: boolean | null;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
export interface Location {
|
|
375
|
+
id?: string | null;
|
|
376
|
+
|
|
377
|
+
address_json?: { [key: string]: unknown } | null;
|
|
378
|
+
|
|
379
|
+
has_public_page?: boolean | null;
|
|
380
|
+
|
|
381
|
+
lat?: number | null;
|
|
382
|
+
|
|
383
|
+
lng?: number | null;
|
|
384
|
+
|
|
385
|
+
name?: string | null;
|
|
386
|
+
|
|
387
|
+
slug?: string | null;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
export interface MusicAttribution {
|
|
391
|
+
artist_name?: string | null;
|
|
392
|
+
|
|
393
|
+
audio_id?: string | null;
|
|
394
|
+
|
|
395
|
+
should_mute_audio?: boolean | null;
|
|
396
|
+
|
|
397
|
+
song_name?: string | null;
|
|
398
|
+
|
|
399
|
+
uses_original_audio?: boolean | null;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
export interface ProductMention {
|
|
403
|
+
merchant_username?: string | null;
|
|
404
|
+
|
|
405
|
+
product_id?: string | null;
|
|
406
|
+
|
|
407
|
+
product_name?: string | null;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
export interface VideoVersion {
|
|
411
|
+
url: string;
|
|
412
|
+
|
|
413
|
+
id?: string;
|
|
414
|
+
|
|
415
|
+
height?: number;
|
|
416
|
+
|
|
417
|
+
type?: number;
|
|
418
|
+
|
|
419
|
+
width?: number;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
export interface InstagramGetPostResponse {
|
|
425
|
+
data: InstagramSinglePostResponse;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
export interface InstagramGetPostsResponse {
|
|
429
|
+
data: InstagramGetPostsResponse.Data;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
export namespace InstagramGetPostsResponse {
|
|
433
|
+
export interface Data {
|
|
434
|
+
failed: number;
|
|
435
|
+
|
|
436
|
+
items: Array<Data.InstagramPostBatchSuccessItem | Data.InstagramPostBatchErrorItem>;
|
|
437
|
+
|
|
438
|
+
requested: number;
|
|
439
|
+
|
|
440
|
+
scraped_at: string;
|
|
441
|
+
|
|
442
|
+
succeeded: number;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
export namespace Data {
|
|
446
|
+
export interface InstagramPostBatchSuccessItem {
|
|
447
|
+
data: InstagramAPI.InstagramSinglePostResponse;
|
|
448
|
+
|
|
449
|
+
shortcode: string;
|
|
450
|
+
|
|
451
|
+
success: true;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
export interface InstagramPostBatchErrorItem {
|
|
455
|
+
error: Shared.RawScraperError;
|
|
456
|
+
|
|
457
|
+
shortcode: string;
|
|
458
|
+
|
|
459
|
+
status: number;
|
|
460
|
+
|
|
461
|
+
success: false;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
34
464
|
}
|
|
35
465
|
|
|
36
466
|
export interface InstagramGetProfileResponse {
|
|
@@ -116,10 +546,34 @@ export namespace InstagramGetProfileResponse {
|
|
|
116
546
|
|
|
117
547
|
carousel_items?: Array<Post.CarouselItem>;
|
|
118
548
|
|
|
549
|
+
coauthor_usernames?: Array<string>;
|
|
550
|
+
|
|
551
|
+
display_resources?: Array<Post.DisplayResource>;
|
|
552
|
+
|
|
553
|
+
engagement_visibility?: Post.EngagementVisibility | null;
|
|
554
|
+
|
|
555
|
+
is_paid_partnership?: boolean | null;
|
|
556
|
+
|
|
557
|
+
is_pinned?: boolean | null;
|
|
558
|
+
|
|
559
|
+
location?: Post.Location | null;
|
|
560
|
+
|
|
561
|
+
music_attribution?: Post.MusicAttribution | null;
|
|
562
|
+
|
|
563
|
+
owner_username?: string;
|
|
564
|
+
|
|
565
|
+
product_mentions?: Array<Post.ProductMention>;
|
|
566
|
+
|
|
567
|
+
sponsor_usernames?: Array<string>;
|
|
568
|
+
|
|
569
|
+
tagged_usernames?: Array<string>;
|
|
570
|
+
|
|
119
571
|
thumbnail_url?: string;
|
|
120
572
|
|
|
121
573
|
video_url?: string;
|
|
122
574
|
|
|
575
|
+
video_versions?: Array<Post.VideoVersion>;
|
|
576
|
+
|
|
123
577
|
view_count?: number;
|
|
124
578
|
}
|
|
125
579
|
|
|
@@ -135,6 +589,70 @@ export namespace InstagramGetProfileResponse {
|
|
|
135
589
|
|
|
136
590
|
video_url?: string;
|
|
137
591
|
}
|
|
592
|
+
|
|
593
|
+
export interface DisplayResource {
|
|
594
|
+
config_height: number;
|
|
595
|
+
|
|
596
|
+
config_width: number;
|
|
597
|
+
|
|
598
|
+
src: string;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
export interface EngagementVisibility {
|
|
602
|
+
comments_disabled?: boolean | null;
|
|
603
|
+
|
|
604
|
+
like_and_view_counts_disabled?: boolean | null;
|
|
605
|
+
|
|
606
|
+
viewer_can_reshare?: boolean | null;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
export interface Location {
|
|
610
|
+
id?: string | null;
|
|
611
|
+
|
|
612
|
+
address_json?: { [key: string]: unknown } | null;
|
|
613
|
+
|
|
614
|
+
has_public_page?: boolean | null;
|
|
615
|
+
|
|
616
|
+
lat?: number | null;
|
|
617
|
+
|
|
618
|
+
lng?: number | null;
|
|
619
|
+
|
|
620
|
+
name?: string | null;
|
|
621
|
+
|
|
622
|
+
slug?: string | null;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
export interface MusicAttribution {
|
|
626
|
+
artist_name?: string | null;
|
|
627
|
+
|
|
628
|
+
audio_id?: string | null;
|
|
629
|
+
|
|
630
|
+
should_mute_audio?: boolean | null;
|
|
631
|
+
|
|
632
|
+
song_name?: string | null;
|
|
633
|
+
|
|
634
|
+
uses_original_audio?: boolean | null;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
export interface ProductMention {
|
|
638
|
+
merchant_username?: string | null;
|
|
639
|
+
|
|
640
|
+
product_id?: string | null;
|
|
641
|
+
|
|
642
|
+
product_name?: string | null;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
export interface VideoVersion {
|
|
646
|
+
url: string;
|
|
647
|
+
|
|
648
|
+
id?: string;
|
|
649
|
+
|
|
650
|
+
height?: number;
|
|
651
|
+
|
|
652
|
+
type?: number;
|
|
653
|
+
|
|
654
|
+
width?: number;
|
|
655
|
+
}
|
|
138
656
|
}
|
|
139
657
|
|
|
140
658
|
export interface RelatedProfile {
|
|
@@ -151,6 +669,55 @@ export namespace InstagramGetProfileResponse {
|
|
|
151
669
|
}
|
|
152
670
|
}
|
|
153
671
|
|
|
672
|
+
export interface InstagramGetTranscriptResponse {
|
|
673
|
+
data: InstagramTranscriptResponse;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
export interface InstagramGetTranscriptsResponse {
|
|
677
|
+
data: InstagramGetTranscriptsResponse.Data;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
export namespace InstagramGetTranscriptsResponse {
|
|
681
|
+
export interface Data {
|
|
682
|
+
failed: number;
|
|
683
|
+
|
|
684
|
+
items: Array<Data.InstagramTranscriptBatchSuccessItem | Data.InstagramTranscriptBatchErrorItem>;
|
|
685
|
+
|
|
686
|
+
requested: number;
|
|
687
|
+
|
|
688
|
+
scraped_at: string;
|
|
689
|
+
|
|
690
|
+
succeeded: number;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
export namespace Data {
|
|
694
|
+
export interface InstagramTranscriptBatchSuccessItem {
|
|
695
|
+
data: InstagramAPI.InstagramTranscriptResponse;
|
|
696
|
+
|
|
697
|
+
shortcode: string;
|
|
698
|
+
|
|
699
|
+
success: true;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
export interface InstagramTranscriptBatchErrorItem {
|
|
703
|
+
error: Shared.RawScraperError;
|
|
704
|
+
|
|
705
|
+
shortcode: string;
|
|
706
|
+
|
|
707
|
+
status: number;
|
|
708
|
+
|
|
709
|
+
success: false;
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
export interface InstagramGetPostsParams {
|
|
715
|
+
/**
|
|
716
|
+
* Instagram post shortcodes from /p/, /reel/, or /tv/ URLs
|
|
717
|
+
*/
|
|
718
|
+
shortcodes: Array<string>;
|
|
719
|
+
}
|
|
720
|
+
|
|
154
721
|
export interface InstagramGetProfileParams {
|
|
155
722
|
/**
|
|
156
723
|
* Include recent posts in response
|
|
@@ -163,9 +730,37 @@ export interface InstagramGetProfileParams {
|
|
|
163
730
|
post_limit?: number;
|
|
164
731
|
}
|
|
165
732
|
|
|
733
|
+
export interface InstagramGetTranscriptParams {
|
|
734
|
+
/**
|
|
735
|
+
* Optional language code for transcription. Omit to auto-detect.
|
|
736
|
+
*/
|
|
737
|
+
language?: string;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
export interface InstagramGetTranscriptsParams {
|
|
741
|
+
/**
|
|
742
|
+
* Instagram video post shortcodes from /p/, /reel/, or /tv/ URLs
|
|
743
|
+
*/
|
|
744
|
+
shortcodes: Array<string>;
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* Optional language code for transcription. Omit to auto-detect.
|
|
748
|
+
*/
|
|
749
|
+
language?: string;
|
|
750
|
+
}
|
|
751
|
+
|
|
166
752
|
export declare namespace Instagram {
|
|
167
753
|
export {
|
|
754
|
+
type InstagramSinglePostResponse as InstagramSinglePostResponse,
|
|
755
|
+
type InstagramTranscriptResponse as InstagramTranscriptResponse,
|
|
756
|
+
type InstagramGetPostResponse as InstagramGetPostResponse,
|
|
757
|
+
type InstagramGetPostsResponse as InstagramGetPostsResponse,
|
|
168
758
|
type InstagramGetProfileResponse as InstagramGetProfileResponse,
|
|
759
|
+
type InstagramGetTranscriptResponse as InstagramGetTranscriptResponse,
|
|
760
|
+
type InstagramGetTranscriptsResponse as InstagramGetTranscriptsResponse,
|
|
761
|
+
type InstagramGetPostsParams as InstagramGetPostsParams,
|
|
169
762
|
type InstagramGetProfileParams as InstagramGetProfileParams,
|
|
763
|
+
type InstagramGetTranscriptParams as InstagramGetTranscriptParams,
|
|
764
|
+
type InstagramGetTranscriptsParams as InstagramGetTranscriptsParams,
|
|
170
765
|
};
|
|
171
766
|
}
|
package/src/resources/raw/raw.ts
CHANGED
|
@@ -2,7 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import * as InstagramAPI from './instagram';
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
Instagram,
|
|
7
|
+
InstagramGetPostResponse,
|
|
8
|
+
InstagramGetPostsParams,
|
|
9
|
+
InstagramGetPostsResponse,
|
|
10
|
+
InstagramGetProfileParams,
|
|
11
|
+
InstagramGetProfileResponse,
|
|
12
|
+
InstagramGetTranscriptParams,
|
|
13
|
+
InstagramGetTranscriptResponse,
|
|
14
|
+
InstagramGetTranscriptsParams,
|
|
15
|
+
InstagramGetTranscriptsResponse,
|
|
16
|
+
InstagramSinglePostResponse,
|
|
17
|
+
InstagramTranscriptResponse,
|
|
18
|
+
} from './instagram';
|
|
6
19
|
import * as YoutubeAPI from './youtube';
|
|
7
20
|
import {
|
|
8
21
|
TranscriptSegment,
|
|
@@ -28,8 +41,17 @@ Raw.Youtube = Youtube;
|
|
|
28
41
|
export declare namespace Raw {
|
|
29
42
|
export {
|
|
30
43
|
Instagram as Instagram,
|
|
44
|
+
type InstagramSinglePostResponse as InstagramSinglePostResponse,
|
|
45
|
+
type InstagramTranscriptResponse as InstagramTranscriptResponse,
|
|
46
|
+
type InstagramGetPostResponse as InstagramGetPostResponse,
|
|
47
|
+
type InstagramGetPostsResponse as InstagramGetPostsResponse,
|
|
31
48
|
type InstagramGetProfileResponse as InstagramGetProfileResponse,
|
|
49
|
+
type InstagramGetTranscriptResponse as InstagramGetTranscriptResponse,
|
|
50
|
+
type InstagramGetTranscriptsResponse as InstagramGetTranscriptsResponse,
|
|
51
|
+
type InstagramGetPostsParams as InstagramGetPostsParams,
|
|
32
52
|
type InstagramGetProfileParams as InstagramGetProfileParams,
|
|
53
|
+
type InstagramGetTranscriptParams as InstagramGetTranscriptParams,
|
|
54
|
+
type InstagramGetTranscriptsParams as InstagramGetTranscriptsParams,
|
|
33
55
|
};
|
|
34
56
|
|
|
35
57
|
export {
|