@ionia/tiktok
v0.0.9
Published
Tiktok module for Nest framework (node.js) ๐
Downloads
5
Readme
Tiktok module for Nest framework (node.js) ๐
Installation
To begin using it, we first install the required dependency.
yarn add @ionia/tiktok
# or
npm install @ionia/tiktok
Getting started
Once the installation process is complete, to use the TikTokService
, first import TikTokModule
.
import { TikTokModule } from "@ionia/tiktok";
@Module({
imports: [
TikTokModule.register({
appId: "Your AppId",
appSecret: "Your AppSecret",
}),
],
providers: [MemberService],
})
export class MemberModule {}
Next, inject TikTokService
using normal constructor injection.
@Injectable()
export class MemberService {
constructor(private tikTokService: TikTokService) {}
async login(@Body() dto: Code2SessionRequest): Promise<Code2SessionResult> {
return await this.tikTokService.code2Session(dto);
}
}