Skip to content

Commit

Permalink
added tag param and flagger field for 1.0.14
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Whitlock committed Mar 19, 2016
1 parent f6c6dad commit 256c385
Show file tree
Hide file tree
Showing 5 changed files with 336 additions and 37 deletions.
1 change: 1 addition & 0 deletions src/Console/Command/Generated/ImportCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ protected function configure(){
->addOption('src','',InputOption::VALUE_REQUIRED,'Raw source of file being imported','{}')
->addOption('index','',InputOption::VALUE_REQUIRED,'Specify whether file indexes translations by asset ID or source texts',null)
->addOption('locale','',InputOption::VALUE_REQUIRED,'Specify target locale if importing translations',null)
->addOption('tag','',InputOption::VALUE_REQUIRED,'Override name of default tag applied to new and modified assets',null)
->addOption('async','',InputOption::VALUE_REQUIRED,'Specify that import should be done asynchronously',null)
->addOption('key','k',InputOption::VALUE_OPTIONAL,'Override configured API key for this request','')
;
Expand Down
2 changes: 1 addition & 1 deletion src/Console/Command/Generated/UntranslateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected function configure(){
$this
->setName( 'loco:untranslate' )
->setMethod( 'untranslate' )
->setDescription( 'Untranslate an asset in a single locale' )
->setDescription( 'Erase translation data in a single locale' )
->addOption('key','k',InputOption::VALUE_OPTIONAL,'Override configured API key for this request','')
->addArgument('id',InputArgument::REQUIRED,'Asset ID',null)
->addArgument('locale',InputArgument::REQUIRED,'Short code of project locale, e.g. `fr` or `fr_CH`',null)
Expand Down
2 changes: 1 addition & 1 deletion src/Http/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/
class ApiClient extends Client {

const VERSION = '1.0.13';
const VERSION = '1.0.14';

/**
* Factory method to create a new Loco API client.
Expand Down
171 changes: 153 additions & 18 deletions src/Http/Resources/service.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Loco",
"apiVersion": "1.0.13",
"apiVersion": "1.0.14",
"baseUrl": "https:\/\/localise.biz\/",
"description": "Loco REST API",
"operations": {
Expand Down Expand Up @@ -657,6 +657,11 @@
"type": "string",
"location": "query"
},
"tag": {
"description": "Override name of default tag applied to new and modified assets",
"type": "string",
"location": "query"
},
"async": {
"description": "Specify that import should be done asynchronously",
"type": "boolean",
Expand Down Expand Up @@ -694,7 +699,7 @@
"class": "\\Loco\\Http\\Command\\LocoCommand",
"responseClass": "Creds",
"responseType": "model",
"responseNotes": "<p>Loco API keys authenticate your user account for accessing a specific project.<br \/>\n This endpoint verifies an API key and returns the authenticated user, account and project.<\/p>\n <p>If you want to verify whether the key has read or write access, just send this endpoint a POST request instead. Read only keys will respond 403 to any non-GET request.<\/p>",
"responseNotes": "<p>Loco API keys authenticate your user account for accessing a specific project.<br \/>\n This endpoint verifies an API key and returns the authenticated user, account and project.<\/p>\n <p>If you want to verify whether the key has write access, just send this endpoint a POST request instead. A read-only key will give 403 for any POST request.<\/p>",
"summary": "Verify an API project key",
"parameters": {
"key": {
Expand Down Expand Up @@ -1474,8 +1479,8 @@
"class": "\\Loco\\Http\\Command\\LocoCommand",
"responseClass": "Success",
"responseType": "model",
"responseNotes": "<p>Deletes a single translation of an asset in currently authenticated project.<\/p>\n <p><strong>Warning<\/strong>: Untranslating is not the same as setting an empty translation. \n This operation clears the asset's translation history and user comments for the given locale.<\/p>",
"summary": "Untranslate an asset in a single locale",
"responseNotes": "<p>Erases translation data of a localised asset in the currently authenticated project.<\/p>\n <p><strong>Warning<\/strong>: Erasing is not the same as setting an empty translation. \n This operation clears the asset's translation history and user comments for the given locale.<\/p>",
"summary": "Erase translation data in a single locale",
"parameters": {
"key": {
"required": true,
Expand Down Expand Up @@ -2332,6 +2337,7 @@
}
},
"PluralTranslation": {
"description": "Base class containing subset of the fields of LocoApiTranslationModel Doesn't need $plurals or $locale",
"type": "object",
"additionalProperties": false,
"properties": {
Expand All @@ -2349,18 +2355,23 @@
},
"translated": {
"required": true,
"description": "Whether plural translation exists, even if marked intentionally blank",
"description": "Whether asset is translated and contributing to project completion",
"type": "boolean",
"location": "json",
"default": false
},
"flagged": {
"required": true,
"description": "Whether translation is flagged as requiring attention",
"description": "Whether translation is flagged by user action",
"type": "boolean",
"location": "json",
"default": false
},
"status": {
"description": "Status of translation as string compatible with export status parameter",
"type": "string",
"location": "json"
},
"translation": {
"required": true,
"description": "Translated text in specified locale",
Expand All @@ -2369,9 +2380,10 @@
},
"revision": {
"required": true,
"description": "Number of edits made, zero if not translated",
"description": "Number of edits made, zero if never translated",
"type": "integer",
"location": "json"
"location": "json",
"default": 0
},
"comments": {
"required": true,
Expand All @@ -2380,10 +2392,56 @@
"location": "json"
},
"modified": {
"description": "Time last modified in UTC, null if not translated",
"description": "Time last modified in UTC, null if translation doesn't exist",
"type": "string",
"format": "date-time",
"location": "json"
},
"author": {
"type": "object",
"location": "json",
"additionalProperties": false,
"properties": {
"id": {
"required": true,
"description": "User id",
"type": "integer",
"location": "json"
},
"name": {
"description": "Full user name",
"type": "string",
"location": "json"
},
"email": {
"description": "Contact email address if you have permission to see it",
"type": "string",
"location": "json"
}
}
},
"flagger": {
"type": "object",
"location": "json",
"additionalProperties": false,
"properties": {
"id": {
"required": true,
"description": "User id",
"type": "integer",
"location": "json"
},
"name": {
"description": "Full user name",
"type": "string",
"location": "json"
},
"email": {
"description": "Contact email address if you have permission to see it",
"type": "string",
"location": "json"
}
}
}
}
},
Expand All @@ -2405,14 +2463,14 @@
},
"translated": {
"required": true,
"description": "Whether this translation exists, even if marked intentionally blank",
"description": "Whether asset is translated and contributing to project completion",
"type": "boolean",
"location": "json",
"default": false
},
"flagged": {
"required": true,
"description": "Whether translation is flagged as requiring attention",
"description": "Whether translation is flagged by user action",
"type": "boolean",
"location": "json",
"default": false
Expand All @@ -2430,9 +2488,10 @@
},
"revision": {
"required": true,
"description": "Number of edits made, zero if not translated",
"description": "Number of edits made, zero if never translated",
"type": "integer",
"location": "json"
"location": "json",
"default": 0
},
"comments": {
"required": true,
Expand Down Expand Up @@ -2469,6 +2528,29 @@
}
}
},
"flagger": {
"type": "object",
"location": "json",
"additionalProperties": false,
"properties": {
"id": {
"required": true,
"description": "User id",
"type": "integer",
"location": "json"
},
"name": {
"description": "Full user name",
"type": "string",
"location": "json"
},
"email": {
"description": "Contact email address if you have permission to see it",
"type": "string",
"location": "json"
}
}
},
"locale": {
"required": true,
"type": "object",
Expand Down Expand Up @@ -2540,6 +2622,7 @@
"type": "array",
"location": "json",
"items": {
"description": "Base class containing subset of the fields of LocoApiTranslationModel Doesn't need $plurals or $locale",
"type": "object",
"additionalProperties": false,
"properties": {
Expand All @@ -2557,18 +2640,23 @@
},
"translated": {
"required": true,
"description": "Whether plural translation exists, even if marked intentionally blank",
"description": "Whether asset is translated and contributing to project completion",
"type": "boolean",
"location": "json",
"default": false
},
"flagged": {
"required": true,
"description": "Whether translation is flagged as requiring attention",
"description": "Whether translation is flagged by user action",
"type": "boolean",
"location": "json",
"default": false
},
"status": {
"description": "Status of translation as string compatible with export status parameter",
"type": "string",
"location": "json"
},
"translation": {
"required": true,
"description": "Translated text in specified locale",
Expand All @@ -2577,9 +2665,10 @@
},
"revision": {
"required": true,
"description": "Number of edits made, zero if not translated",
"description": "Number of edits made, zero if never translated",
"type": "integer",
"location": "json"
"location": "json",
"default": 0
},
"comments": {
"required": true,
Expand All @@ -2588,10 +2677,56 @@
"location": "json"
},
"modified": {
"description": "Time last modified in UTC, null if not translated",
"description": "Time last modified in UTC, null if translation doesn't exist",
"type": "string",
"format": "date-time",
"location": "json"
},
"author": {
"type": "object",
"location": "json",
"additionalProperties": false,
"properties": {
"id": {
"required": true,
"description": "User id",
"type": "integer",
"location": "json"
},
"name": {
"description": "Full user name",
"type": "string",
"location": "json"
},
"email": {
"description": "Contact email address if you have permission to see it",
"type": "string",
"location": "json"
}
}
},
"flagger": {
"type": "object",
"location": "json",
"additionalProperties": false,
"properties": {
"id": {
"required": true,
"description": "User id",
"type": "integer",
"location": "json"
},
"name": {
"description": "Full user name",
"type": "string",
"location": "json"
},
"email": {
"description": "Contact email address if you have permission to see it",
"type": "string",
"location": "json"
}
}
}
}
}
Expand Down
Loading

0 comments on commit 256c385

Please sign in to comment.