onesky-api-wrapper
Version:
A fully typed wrapper for the OneSky API.
23 lines (22 loc) • 989 B
JavaScript
import { HttpHelper } from '../../http/index.js';
export class TranslationApi {
constructor(config) {
this._http = new HttpHelper(config);
}
export(options) {
const url = `projects/${options.projectId}/translations`;
return this._http.get(url, new URLSearchParams(Object.assign({}, options.params)));
}
exportMultilingual(options) {
const url = `projects/${options.projectId}/translations/multilingual`;
return this._http.get(url, new URLSearchParams(Object.assign({}, options.params)));
}
exportAppStoreDescription(options) {
const url = `projects/${options.projectId}/translations/app-descriptions`;
return this._http.get(url, new URLSearchParams({ locale: options.locale }));
}
getStatus(options) {
const url = `projects/${options.projectId}/translations/status`;
return this._http.get(url, new URLSearchParams(Object.assign({}, options.params)));
}
}