bmw-lac
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -1,3 +0,5 @@ | ||
import { CreateTextPostParams, CreateMultiImagePostParams } from '../interfaces/params/CreatePostParams'; | ||
import { CreateTextPostParams, CreateMultiImagePostParams, CreatePostWithVideoParams } from '../interfaces/params/CreatePostParams'; | ||
import CreateTextPost from '../interfaces/types/CreateTextPostTypes'; | ||
import CreateMultiImagePost from '../interfaces/types/CreateMultiImagePostTypes'; | ||
import CreatePostWithVideo from '../interfaces/types/CreatePostWithVideoTypes'; | ||
import Transport from '../base/Transport'; | ||
@@ -20,4 +22,11 @@ declare class PostsClient { | ||
*/ | ||
createMultiImagePost(parameters: CreateMultiImagePostParams): Promise<import("axios").AxiosResponse<unknown, any>>; | ||
createMultiImagePost(parameters: CreateMultiImagePostParams): Promise<import("axios").AxiosResponse<CreateMultiImagePost, any>>; | ||
/** | ||
* Create a new post with one or more images | ||
* | ||
* @link https://developer.linkedin.com/docs/guide/v2/shares/share-api | ||
* @param parameters | ||
*/ | ||
createPostWithVideo(parameters: CreatePostWithVideoParams): Promise<import("axios").AxiosResponse<CreatePostWithVideo, any>>; | ||
} | ||
export default PostsClient; |
@@ -78,4 +78,20 @@ "use strict"; | ||
}; | ||
/** | ||
* Create a new post with one or more images | ||
* | ||
* @link https://developer.linkedin.com/docs/guide/v2/shares/share-api | ||
* @param parameters | ||
*/ | ||
PostsClient.prototype.createPostWithVideo = function (parameters) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: return [4 /*yield*/, this.transport.doPostRequest('https://api.linkedin.com/v2/posts', parameters, 'application/json')]; | ||
case 1: return [2 /*return*/, _a.sent()]; | ||
} | ||
}); | ||
}); | ||
}; | ||
return PostsClient; | ||
}()); | ||
exports.default = PostsClient; |
import IClientOptions from './base/IClientOptions'; | ||
export { CreateTextPostParams, CreateMultiImagePostParams, } from './interfaces/params/CreatePostParams'; | ||
export { CreateTextPostParams, CreateMultiImagePostParams, CreatePostWithVideoParams, } from './interfaces/params/CreatePostParams'; | ||
import CreateTextPost from './interfaces/types/CreateTextPostTypes'; | ||
export { CreateTextPost }; | ||
import CreateMultiImagePost from './interfaces/types/CreateMultiImagePostTypes'; | ||
export { CreateMultiImagePost }; | ||
import CreatePostWithVideo from './interfaces/types/CreatePostWithVideoTypes'; | ||
export { CreatePostWithVideo }; | ||
export { InitializeVideoUploadParams, FinalizeUploadParams, VideoByVideoIdParams, } from './interfaces/params/VideosUploadingParams'; | ||
import InitializeVideoUpload from './interfaces/types/InitializeVideoUploadTypes'; | ||
export { InitializeVideoUpload }; | ||
import FinalizeUpload from './interfaces/types/FinalizeUploadTypes'; | ||
export { FinalizeUpload }; | ||
import VideoByVideoId from './interfaces/types/VideoByVideoIdTypes'; | ||
export { VideoByVideoId }; | ||
import PostsClient from './clients/PostsClient'; | ||
import VideosClient from './clients/VideosClient'; | ||
declare class LinkedinClient { | ||
private postsClient; | ||
private videosClient; | ||
private transport; | ||
@@ -15,3 +28,4 @@ /** | ||
get posts(): PostsClient; | ||
get videos(): VideosClient; | ||
} | ||
export { LinkedinClient }; |
@@ -9,2 +9,3 @@ "use strict"; | ||
var PostsClient_1 = __importDefault(require("./clients/PostsClient")); | ||
var VideosClient_1 = __importDefault(require("./clients/VideosClient")); | ||
var LinkedinClient = /** @class */ (function () { | ||
@@ -37,4 +38,14 @@ /** | ||
}); | ||
Object.defineProperty(LinkedinClient.prototype, "videos", { | ||
get: function () { | ||
if (!this.videosClient) { | ||
this.videosClient = new VideosClient_1.default(this.transport); | ||
} | ||
return this.videosClient; | ||
}, | ||
enumerable: false, | ||
configurable: true | ||
}); | ||
return LinkedinClient; | ||
}()); | ||
exports.LinkedinClient = LinkedinClient; |
@@ -102,1 +102,55 @@ export interface CreateTextPostParams { | ||
} | ||
export interface CreatePostWithVideoParams { | ||
/** | ||
* The URN of the author of the post. This field is required. | ||
Eg: urn:li:person:123456789 | ||
*/ | ||
'author': string; | ||
/** | ||
* The lifecycle state of the post. This field is required. | ||
Eg: PUBLISHED | ||
*/ | ||
'lifecycleState': string; | ||
/** | ||
* The text of the post. This field is required. | ||
Eg: Hello World! | ||
*/ | ||
'commentary': string; | ||
/** | ||
* The visibility of the post. This field is required. | ||
Eg: PUBLIC | ||
*/ | ||
'visibility': string; | ||
/** | ||
* The distribution of the post. This field is required. | ||
Eg: { | ||
"feedDistribution": "PUBLIC", | ||
"targetEntities": [ | ||
"urn:li:organization:123456789" | ||
], | ||
"thirdPartyDistributionChannels": [ | ||
"FACEBOOK", | ||
"TWITTER" | ||
] | ||
} | ||
*/ | ||
'distribution': { | ||
feedDistribution: string; | ||
targetEntities: string[]; | ||
thirdPartyDistributionChannels: string[]; | ||
}; | ||
/** | ||
* content json | ||
*/ | ||
'content': { | ||
media: { | ||
title: string; | ||
id: string; | ||
}; | ||
}; | ||
} |
{ | ||
"name": "bmw-lac", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Linkedin client", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
39643
35
909