25 lines
634 B
Lua
25 lines
634 B
Lua
local tencent_sdk_tmt = {}
|
|
tencent_sdk_tmt.__index = tencent_sdk_tmt
|
|
|
|
--[[
|
|
创建一个新的 tencent_tmt 对象
|
|
@return 返回一个新的 tencent_sdk_tmt 对象
|
|
]]
|
|
function tencent_sdk_tmt.new(db)
|
|
local instance = setmetatable({}, tencent_sdk_tmt)
|
|
if db == nil then
|
|
instance.module = fw_tencent_sdk_tmt.new()
|
|
else
|
|
instance.module = db
|
|
end
|
|
|
|
return instance
|
|
end
|
|
|
|
|
|
function tencent_sdk_tmt:text(secret_id,secret_key,source_text,source_language,target_language)
|
|
return self.module:text(secret_id,secret_key,source_text,source_language,target_language)
|
|
end
|
|
|
|
return tencent_sdk_tmt
|