addSourceText method
Add a source text. Parameters
source
The source content.gameVersions
The game version of the text.key
The key of the text.type
The type of the text.token
The token to use for authentication (optional if you have set a global token).
Implementation
Future<SourceText> addSourceText(
{required String source,
required List<String> gameVersions,
required String key,
required SourceTextType type,
String? token}) async {
APIHttpResponse response = await httpClient.post('/translate/source-text/',
body: {
'source': source,
'gameVersions': gameVersions,
'key': key,
'type': type.name
},
token: token);
return SourceText.fromMap(response.data);
}