Skip to content

Latest commit

 

History

History
237 lines (135 loc) · 5.32 KB

PublishService.md

File metadata and controls

237 lines (135 loc) · 5.32 KB

instagram-private-api / services / PublishService

Class: PublishService

services.PublishService

Hierarchy

  • Repository

    PublishService

Table of contents

Constructors

Methods

Constructors

constructor

new PublishService(client)

Parameters

Name Type
client IgApiClient

Inherited from

Repository.constructor

Defined in

src/core/repository.ts:7

Methods

album

album(options): Promise<any>

Parameters

Name Type
options PostingAlbumOptions

Returns

Promise<any>

Defined in

src/services/publish.service.ts:211


igtvVideo

igtvVideo(options): Promise<any>

Parameters

Name Type
options PostingIgtvOptions

Returns

Promise<any>

Defined in

src/services/publish.service.ts:400


photo

photo(options): Promise<MediaRepositoryConfigureResponseRootObject>

Uploads a single photo to the timeline-feed

Parameters

Name Type Description
options PostingPhotoOptions the options, containing caption and image-data

Returns

Promise<MediaRepositoryConfigureResponseRootObject>

Defined in

src/services/publish.service.ts:136


story

story(options): Promise<any>

Parameters

Name Type
options PostingStoryPhotoOptions | PostingStoryVideoOptions

Returns

Promise<any>

Defined in

src/services/publish.service.ts:284


video

video(options): Promise<MediaRepositoryConfigureResponseRootObject>

Parameters

Name Type
options PostingVideoOptions

Returns

Promise<MediaRepositoryConfigureResponseRootObject>

Defined in

src/services/publish.service.ts:154


catchTranscodeError

Static catchTranscodeError(videoInfo, transcodeDelayInMs): (error: any) => Bluebird<void>

The current way of handling the 202 - Accepted; Transcode pending -error

Parameters

Name Type Description
videoInfo any The video info for debugging reasons
transcodeDelayInMs number The delay for instagram to transcode the video

Returns

fn

▸ (error): Bluebird<void>

Parameters
Name Type
error any
Returns

Bluebird<void>

Defined in

src/services/publish.service.ts:42


getMP4Duration

Static getMP4Duration(buffer): number

Reads the duration in ms from any MP4 file with at least one stream (a/v)

Parameters

Name Type
buffer Buffer

Returns

number

Defined in

src/services/publish.service.ts:74


getVideoInfo

Static getVideoInfo(buffer): Object

Gets duration in ms, width and height info for a video in the mp4 container

Parameters

Name Type Description
buffer Buffer Buffer, containing the video-file

Returns

Object

duration in ms, width and height in px

Name Type
duration number
height number
width number

Defined in

src/services/publish.service.ts:60