Skip to content

Instantly share code, notes, and snippets.

@jacob-jonkman
Created March 1, 2019 10:46
Show Gist options
  • Save jacob-jonkman/d3bea4c36687e8fb848e9536731b4121 to your computer and use it in GitHub Desktop.
Save jacob-jonkman/d3bea4c36687e8fb848e9536731b4121 to your computer and use it in GitHub Desktop.
import { api_key } from './poeditor-params';
const listLanguageURI = 'https://api.poeditor.com/v2/languages/list';
const listTermsURI = 'https://api.poeditor.com/v2/terms/list';
const listProjectsURI = 'https://api.poeditor.com/v2/projects/list';
// Options for reading the projects in POEditor
export const listProjectOptions = {
method: 'POST',
uri: listProjectsURI,
formData: {
api_token: api_key
}
};
// Options for reading the languages of a project in POEditor
export const listLanguagesOptions = {
method: 'POST',
uri: listLanguageURI,
formData: {
api_token: api_key,
id: ''
}
};
// Options for reading the terms of a project's language in POEditor
export const listTermsOptions = {
method: 'POST',
uri: listTermsURI,
formData: {
api_token: api_key,
id: '',
language: ''
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment