Skip to content

Commit

Permalink
API version 1.0.28
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Whitlock committed May 5, 2023
1 parent 4945b5d commit 7ede6c2
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 110 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 @@ -32,6 +32,7 @@ protected function configure()
->addOption('path', '', InputOption::VALUE_REQUIRED, 'Specify original file path for source code references (excluding line number)', null)
->addOption('ignore-new', '', InputOption::VALUE_REQUIRED, 'Specify that new assets will NOT be added to the project', null)
->addOption('ignore-existing', '', InputOption::VALUE_REQUIRED, 'Specify that existing assets encountered in the file will NOT be updated', null)
->addOption('ignore-blank', '', InputOption::VALUE_REQUIRED, 'Specify that blank translations should NOT be imported', null)
->addOption('tag-new', '', InputOption::VALUE_REQUIRED, 'Tag any NEW assets added during the import with the given tags (comma separated)', null)
->addOption('tag-all', '', InputOption::VALUE_REQUIRED, 'Tag ALL assets in the file with the given tags (comma separated)', null)
->addOption('untag-all', '', InputOption::VALUE_REQUIRED, 'Remove existing tags from any assets matched in the imported file (comma separated)', null)
Expand Down
4 changes: 2 additions & 2 deletions src/Http/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
*/
class ApiClient extends GuzzleClient
{
public const SDK_VERSION = '2.0.11';
public const API_VERSION = '1.0.27';
public const SDK_VERSION = '2.0.12';
public const API_VERSION = '1.0.28';

/**
* Factory method to create a new Loco API client.
Expand Down
208 changes: 103 additions & 105 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.27",
"apiVersion": "1.0.28",
"baseUri": "https://localise.biz/",
"description": "Loco REST API",
"operations": {
Expand Down Expand Up @@ -843,6 +843,13 @@
"description": "Specify that existing assets encountered in the file will NOT be updated",
"location": "query"
},
"ignore-blank": {
"name": "ignore-blank",
"type": "boolean",
"required": false,
"description": "Specify that blank translations should NOT be imported",
"location": "query"
},
"tag-new": {
"name": "tag-new",
"type": "string",
Expand Down Expand Up @@ -949,7 +956,7 @@
"summary": "Get project tags",
"responseNotes": "Lists all tags in currently authenticated project",
"httpMethod": "GET",
"uri": "/api/tags.json",
"uri": "/api/tags",
"name": "getTags",
"responseModel": "TagList",
"parameters": {
Expand Down Expand Up @@ -977,7 +984,7 @@
"summary": "Create a new tag",
"responseNotes": "Adds a new tag to the currently authenticated project",
"httpMethod": "POST",
"uri": "/api/tags.json",
"uri": "/api/tags",
"name": "createTag",
"responseModel": "Success",
"parameters": {
Expand Down Expand Up @@ -2581,6 +2588,99 @@
"type": "object",
"additionalProperties": false
},
"ImportResult": {
"properties": {
"status": {
"description": "Whether import was synchronous (200) or asynchronous (201)",
"type": "integer",
"enum": [
200,
201
],
"name": "status",
"default": 200,
"required": true,
"location": "json"
},
"message": {
"description": "Summary of import result",
"type": "string",
"name": "message",
"required": true,
"location": "json"
},
"locales": {
"description": "Locales identified during import with their progress statistics",
"type": "array",
"items": {
"$ref": "Locale"
},
"name": "locales",
"required": true,
"location": "json"
}
},
"name": "ImportResult",
"type": "object",
"additionalProperties": false
},
"AsyncProgress": {
"description": "Job progress for checking asynchronous operations",
"properties": {
"progress": {
"description": "Percentage progress through asynchronous operation",
"type": "integer",
"minimum": 0,
"maximum": 100,
"name": "progress",
"required": true,
"location": "json"
},
"success": {
"description": "Message populated after successful completion",
"type": "string",
"name": "success",
"location": "json"
},
"error": {
"description": "Description of any error that prevented the operation from finishing",
"type": "string",
"name": "error",
"location": "json"
}
},
"name": "AsyncProgress",
"type": "object",
"additionalProperties": false
},
"Success": {
"properties": {
"status": {
"description": "HTTP status 2xx code",
"type": "integer",
"name": "status",
"required": true,
"location": "json"
},
"message": {
"description": "Descriptive success message",
"type": "string",
"name": "message",
"required": true,
"location": "json"
}
},
"name": "Success",
"type": "object",
"additionalProperties": false
},
"TagList": {
"type": "array",
"items": {
"type": "string"
},
"location": "json"
},
"object": {
"properties": [],
"description": "Generic object",
Expand Down Expand Up @@ -2703,108 +2803,6 @@
"type": "object",
"additionalProperties": false
},
"ImportResult": {
"properties": {
"status": {
"description": "Whether import was synchronous (200) or asynchronous (201)",
"type": "integer",
"enum": [
200,
201
],
"name": "status",
"default": 200,
"required": true,
"location": "json"
},
"message": {
"description": "Summary of import result",
"type": "string",
"name": "message",
"required": true,
"location": "json"
},
"locales": {
"description": "Locales identified during import with their progress statistics",
"type": "array",
"items": {
"$ref": "Locale"
},
"name": "locales",
"required": true,
"location": "json"
},
"assets": {
"description": "DEPRECATED: Assets added to project; empty when async=1",
"type": "array",
"items": {
"$ref": "Asset"
},
"name": "assets",
"location": "json"
}
},
"name": "ImportResult",
"type": "object",
"additionalProperties": false
},
"AsyncProgress": {
"description": "Job progress for checking asynchronous operations",
"properties": {
"progress": {
"description": "Percentage progress through asynchronous operation",
"type": "integer",
"minimum": 0,
"maximum": 100,
"name": "progress",
"required": true,
"location": "json"
},
"success": {
"description": "Message populated after successful completion",
"type": "string",
"name": "success",
"location": "json"
},
"error": {
"description": "Description of any error that prevented the operation from finishing",
"type": "string",
"name": "error",
"location": "json"
}
},
"name": "AsyncProgress",
"type": "object",
"additionalProperties": false
},
"Success": {
"properties": {
"status": {
"description": "HTTP status 2xx code",
"type": "integer",
"name": "status",
"required": true,
"location": "json"
},
"message": {
"description": "Descriptive success message",
"type": "string",
"name": "message",
"required": true,
"location": "json"
}
},
"name": "Success",
"type": "object",
"additionalProperties": false
},
"TagList": {
"type": "array",
"items": {
"type": "string"
},
"location": "json"
},
"AssetList": {
"type": "array",
"items": {
Expand Down
5 changes: 2 additions & 3 deletions tests/Meta/CodeStyleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ class CodeStyleTest extends \PHPUnit\Framework\TestCase
{
/**
* Find path to php-cs-fixer executable
* @return string
*/
private function findLinter()
private function findLinter(): string
{
foreach (['cs-fixer','php-cs-fixer','php-cs-fixer.phar'] as $name) {
if ($command = rtrim(shell_exec('which '.$name))) {
Expand All @@ -23,7 +22,7 @@ private function findLinter()
$this->markTestSkipped('Install php-cs-fixer or run with --exclude-group meta');
}

public function testCodeStyleLinterPasses()
public function testCodeStyleLinterPasses(): void
{
$executable = $this->findLinter();
foreach (['src','dev','tests','example'] as $name) {
Expand Down

0 comments on commit 7ede6c2

Please sign in to comment.