Skip to content

Commit

Permalink
Merge pull request #4 from FriendsOfApi/patch-1
Browse files Browse the repository at this point in the history
Updated docs and readme
  • Loading branch information
prolic authored Feb 1, 2017
2 parents d451466 + 50b7100 commit 33dc93d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# PhraseApp API client

[![Latest Version](https://img.shields.io/github/release/FriendsOfApi/phraseapp.svg?style=flat-square)](https://github.com/FriendsOfApi/phraseapp/releases)
[![Build Status](https://img.shields.io/travis/FriendsOfApi/phraseapp/master.svg?style=flat-square)](https://travis-ci.org/FriendsOfApi/phraseapp)
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/FriendsOfApi/phraseapp.svg?style=flat-square)](https://scrutinizer-ci.com/g/FriendsOfApi/phraseapp)
[![Quality Score](https://img.shields.io/scrutinizer/g/FriendsOfApi/phraseapp.svg?style=flat-square)](https://scrutinizer-ci.com/g/FriendsOfApi/phraseapp)
[![Total Downloads](https://img.shields.io/packagist/dt/friendsofapi/phraseapp.svg?style=flat-square)](https://packagist.org/packages/FriendsOfApi/phraseapp)

A community client for [PhraseApp](https://phraseapp.com).

## Install
Expand Down
8 changes: 6 additions & 2 deletions src/Api/Key.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Key extends HttpApi
* @param string $localeId
* @param array $params
*
* @return mixed|ResponseInterface
* @return KeyCreated|ResponseInterface
*/
public function create(string $projectKey, string $name, array $params = [])
{
Expand All @@ -50,7 +50,7 @@ public function create(string $projectKey, string $name, array $params = [])
* @param string $projectKey
* @param array $params
*
* @return mixed|ResponseInterface
* @return KeySearchResults|ResponseInterface
*/
public function search(string $projectKey, array $params = [])
{
Expand Down Expand Up @@ -97,6 +97,10 @@ public function delete(string $projectKey, string $keyId)
{
$response = $this->httpDelete(sprintf('/api/v2/projects/%s/keys/%s', $projectKey, $keyId));

if (!$this->hydrator) {
return $response;
}

if ($response->getStatusCode() !== 204) {
$this->handleErrors($response);
}
Expand Down
8 changes: 4 additions & 4 deletions src/Api/Translation.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Translation extends HttpApi
* @param string $localeId
* @param array $params
*
* @return mixed|ResponseInterface
* @return Index|ResponseInterface
*/
public function indexLocale(string $projectKey, string $localeId, array $params = [])
{
Expand Down Expand Up @@ -56,7 +56,7 @@ public function indexLocale(string $projectKey, string $localeId, array $params
* @param string $content
* @param array $params
*
* @return mixed|ResponseInterface
* @return TranslationCreated|ResponseInterface
*/
public function create(string $projectKey, string $localeId, string $keyId, string $content, array $params = [])
{
Expand Down Expand Up @@ -85,7 +85,7 @@ public function create(string $projectKey, string $localeId, string $keyId, stri
* @param string $content
* @param array $params
*
* @return mixed|ResponseInterface
* @return TranslationUpdated|ResponseInterface
*/
public function update(string $projectKey, string $translationId, string $content, array $params = [])
{
Expand All @@ -111,7 +111,7 @@ public function update(string $projectKey, string $translationId, string $conten
* @param string $keyId
* @param array $params
*
* @return mixed|ResponseInterface
* @return Index|ResponseInterface
*/
public function indexKey(string $projectKey, string $keyId, array $params = [])
{
Expand Down
2 changes: 1 addition & 1 deletion src/Api/Upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Upload extends HttpApi
*
* @throws Exception
*
* @return string|ResponseInterface
* @return Uploaded|ResponseInterface
*/
public function upload(string $projectKey, string $ext, string $filename, array $params)
{
Expand Down
2 changes: 1 addition & 1 deletion src/PhraseAppClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function __construct(
* @param Hydrator|null $hydrator
* @param RequestBuilder|null $requestBuilder
*
* @return ApiClient
* @return PhraseAppClient
*/
public static function configure(
HttpClientConfigurator $httpClientConfigurator,
Expand Down

0 comments on commit 33dc93d

Please sign in to comment.