Skip to content

ARKie-AI/open-api-nodejs-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ARKIE Open API Node.js SDK

中文 | English

安装

npm i @arkie-ai/open-api
yarn add @arkie-ai/open-api

快速上手

import {
  ArkieAPIClient,
  getTemplateById,
  createPosterByTemplateId,
  getPosterById,
  getPosters,
  deletePosterById,
} from '@arkie-ai/open-api'

const client = new ArkieAPIClient('<你的 app key>', '<你的 app secret>')

// 获取模板
await getTemplateById(client, templateId)

// 创建海报
await createPosterByTemplateId(client, templateId, [
  {
    id: '<文本1的id>',
    type: 'text',
    text: 'ARKIE作图',
  },
  {
    id: '<图片1的id>',
    type: 'image',
    url: '<图片地址>',
    width: 1483,
    height: 532,
  },
])


// 查询海报
await getPosterById(client, posterId)

// 查询所有海报
await getPosters(client, { skip: 0, limit: 5 })

// 删除海报
await deletePosterById(client, posterId)

About

Node.js SDK for ARKie Open API

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors