lingualeo/wti-api 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

lingualeo/wti-api

最新稳定版本:2.0.7

Composer 安装命令:

composer require lingualeo/wti-api

包简介

PHP Library to work with WebTranslateIt API

README 文档

README

Installation:

You can install this library using composer. Check https://packagist.org/packages/lingualeo/wti-api for instructions.

Usage:

$apiKey = 'YOUR_API_KEY';
$api = new WtiApi($apiKey);

// Add translator to project with proofreader rights
// https://webtranslateit.com/en/docs/api/user/#create-user
$api->addUser('email@email.com', 'ru', true);

// Add manager to project with proofreader rights
// https://webtranslateit.com/en/docs/api/user/#create-user
$api->addUser('email@email.com', 'ru', true, 'manager');


// Search strings by key in file
// https://webtranslateit.com/en/docs/api/string/#list-string
$strings = $api->getStringsByKey('someKey', 'FILE_ID');

// Get Top Translators
// https://webtranslateit.com/en/docs/api/stats/#top-translators
$topTranslators = $api->getTopTranslators();

All implemented methods:

getProjectInfo()

getProjectStatistics([$params])
getTopTranslators([$params])

addLocale($localeCode)
deleteLocale($localeCode)

getTranslation($stringId, $localeCode)
getStringsByKey($key, $fileId)
listStrings([$params, $page])
getStringId($key, $fileId)
addString($key, $value, $file[, $label, $locale, $type])
deleteString($stringId)
addTranslate($stringId, $locale, $value[, $status])
updateStringLabel($stringId, $label)

createFile($name, $filePath[, $mime])
updateFile($masterFileId, $localeCode, $name, $filePath[, $merge, $ignoreMissing, $minorChanges, $label, $mime])
createEmptyFile($filename[, $ext])
loadFile($fileId, $locale)
isMasterFileExists($masterFileId)
getFileIdByName($filename)

addUser($email, $locale, $proofread[, $role])
updateMembership($membershipId[, $params])
deleteFile($fileId)
listUsers([$params])
approveInvitation($invitationId[, $params])
removeInvitation($invitationId)
removeMembership($userId)

统计信息

  • 总下载量: 14.39k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 22
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-04-17