instagram-private-api / services / PublishService
services.PublishService
-
Repository
↳
PublishService
• new PublishService(client
)
Name | Type |
---|---|
client |
IgApiClient |
Repository.constructor
▸ album(options
): Promise
<any
>
Name | Type |
---|---|
options |
PostingAlbumOptions |
Promise
<any
>
src/services/publish.service.ts:211
▸ igtvVideo(options
): Promise
<any
>
Name | Type |
---|---|
options |
PostingIgtvOptions |
Promise
<any
>
src/services/publish.service.ts:400
▸ photo(options
): Promise
<MediaRepositoryConfigureResponseRootObject
>
Uploads a single photo to the timeline-feed
Name | Type | Description |
---|---|---|
options |
PostingPhotoOptions |
the options, containing caption and image-data |
Promise
<MediaRepositoryConfigureResponseRootObject
>
src/services/publish.service.ts:136
▸ story(options
): Promise
<any
>
Name | Type |
---|---|
options |
PostingStoryPhotoOptions | PostingStoryVideoOptions |
Promise
<any
>
src/services/publish.service.ts:284
▸ video(options
): Promise
<MediaRepositoryConfigureResponseRootObject
>
Name | Type |
---|---|
options |
PostingVideoOptions |
Promise
<MediaRepositoryConfigureResponseRootObject
>
src/services/publish.service.ts:154
▸ Static
catchTranscodeError(videoInfo
, transcodeDelayInMs
): (error
: any
) => Bluebird
<void
>
The current way of handling the 202 - Accepted; Transcode pending -error
Name | Type | Description |
---|---|---|
videoInfo |
any |
The video info for debugging reasons |
transcodeDelayInMs |
number |
The delay for instagram to transcode the video |
fn
▸ (error
): Bluebird
<void
>
Name | Type |
---|---|
error |
any |
Bluebird
<void
>
src/services/publish.service.ts:42
▸ Static
getMP4Duration(buffer
): number
Reads the duration in ms from any MP4 file with at least one stream (a/v)
Name | Type |
---|---|
buffer |
Buffer |
number
src/services/publish.service.ts:74
▸ Static
getVideoInfo(buffer
): Object
Gets duration in ms, width and height info for a video in the mp4 container
Name | Type | Description |
---|---|---|
buffer |
Buffer |
Buffer, containing the video-file |
Object
duration in ms, width and height in px
Name | Type |
---|---|
duration |
number |
height |
number |
width |
number |