Skip to content

Commit a5efa65

Browse files
committed
Regenerated API with better naming
1 parent e98db4d commit a5efa65

29 files changed

Lines changed: 152 additions & 149 deletions

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ To install the bindings via [Composer](http://getcomposer.org/), add the followi
2222
"repositories": [
2323
{
2424
"type": "vcs",
25-
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
25+
"url": "https://github.com/onemusicapi/client-php.git"
2626
}
2727
],
2828
"require": {
29-
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
29+
"onemusicapi/client-php": "*@dev"
3030
}
3131
}
3232
```
@@ -60,7 +60,7 @@ require_once(__DIR__ . '/vendor/autoload.php');
6060

6161

6262

63-
$apiInstance = new OpenAPI\Client\Api\DefaultApi(
63+
$apiInstance = new OneMusicAPI\Client\Api\ReleaseApi(
6464
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
6565
// This is optional, `GuzzleHttp\Client` will be used as default.
6666
new GuzzleHttp\Client()
@@ -83,7 +83,7 @@ try {
8383
$result = $apiInstance->release($user_key, $inc, $must_inc, $max_result_count, $min_certainty, $min_image_score, $min_image_width, $min_image_height, $max_image_width, $max_image_height, $title, $artist, $barcode);
8484
print_r($result);
8585
} catch (Exception $e) {
86-
echo 'Exception when calling DefaultApi->release: ', $e->getMessage(), PHP_EOL;
86+
echo 'Exception when calling ReleaseApi->release: ', $e->getMessage(), PHP_EOL;
8787
}
8888

8989
?>
@@ -95,7 +95,7 @@ All URIs are relative to *http://api.onemusicapi.com*
9595

9696
Class | Method | HTTP request | Description
9797
------------ | ------------- | ------------- | -------------
98-
*DefaultApi* | [**release**](docs/Api/DefaultApi.md#release) | **GET** /20190716/release |
98+
*ReleaseApi* | [**release**](docs/Api/ReleaseApi.md#release) | **GET** /20190716/release |
9999

100100

101101
## Documentation For Models

composer.json

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,41 @@
22
"name": "onemusicapi/client-php",
33
"description": "OneMusicAPI is a low cost music metadata API",
44
"keywords": [
5-
"openapitools",
6-
"openapi-generator",
7-
"openapi",
5+
"music",
6+
"audio",
7+
"metadata",
8+
"cover art",
9+
"album art",
10+
"images",
811
"php",
912
"sdk",
1013
"rest",
1114
"api"
1215
],
13-
"homepage": "https://openapi-generator.tech",
14-
"license": "unlicense",
16+
"homepage": "http://www.onemusicapi.com",
17+
"license": "MIT",
1518
"authors": [
1619
{
17-
"name": "OpenAPI-Generator contributors",
18-
"homepage": "https://openapi-generator.tech"
20+
"name": "Dan Gravell",
21+
"homepage": "http://www.onemusicapi.com"
1922
}
2023
],
2124
"require": {
22-
"php": ">=7.1",
25+
"php": ">=7.2",
2326
"ext-curl": "*",
2427
"ext-json": "*",
2528
"ext-mbstring": "*",
2629
"guzzlehttp/guzzle": "^6.2"
2730
},
2831
"require-dev": {
29-
"phpunit/phpunit": "^7.4",
30-
"squizlabs/php_codesniffer": "~2.6",
31-
"friendsofphp/php-cs-fixer": "~2.12"
32+
"phpunit/phpunit": "^8.0 || ^9.0",
33+
"friendsofphp/php-cs-fixer": "^2.12"
3234
},
3335
"autoload": {
34-
"psr-4": { "OpenAPI\\Client\\" : "lib/" }
36+
"psr-4": { "OneMusicAPI\\Client\\" : "lib/" }
3537
},
3638
"autoload-dev": {
37-
"psr-4": { "OpenAPI\\Client\\" : "test/" }
39+
"psr-4": { "OneMusicAPI\\Client\\" : "test/" }
3840
}
3941
}
42+
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# OpenAPI\Client\DefaultApi
1+
# OneMusicAPI\Client\ReleaseApi
22

33
All URIs are relative to *http://api.onemusicapi.com*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7-
[**release**](DefaultApi.md#release) | **GET** /20190716/release |
7+
[**release**](ReleaseApi.md#release) | **GET** /20190716/release |
88

99

1010

1111
## release
1212

13-
> \OpenAPI\Client\Model\Release[] release($user_key, $inc, $must_inc, $max_result_count, $min_certainty, $min_image_score, $min_image_width, $min_image_height, $max_image_width, $max_image_height, $title, $artist, $barcode)
13+
> \OneMusicAPI\Client\Model\Release[] release($user_key, $inc, $must_inc, $max_result_count, $min_certainty, $min_image_score, $min_image_width, $min_image_height, $max_image_width, $max_image_height, $title, $artist, $barcode)
1414
1515

1616

@@ -23,7 +23,7 @@ Searches for releases. Queries to /release must be either a name query, an Acous
2323
require_once(__DIR__ . '/vendor/autoload.php');
2424

2525

26-
$apiInstance = new OpenAPI\Client\Api\DefaultApi(
26+
$apiInstance = new OneMusicAPI\Client\Api\ReleaseApi(
2727
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
2828
// This is optional, `GuzzleHttp\Client` will be used as default.
2929
new GuzzleHttp\Client()
@@ -46,7 +46,7 @@ try {
4646
$result = $apiInstance->release($user_key, $inc, $must_inc, $max_result_count, $min_certainty, $min_image_score, $min_image_width, $min_image_height, $max_image_width, $max_image_height, $title, $artist, $barcode);
4747
print_r($result);
4848
} catch (Exception $e) {
49-
echo 'Exception when calling DefaultApi->release: ', $e->getMessage(), PHP_EOL;
49+
echo 'Exception when calling ReleaseApi->release: ', $e->getMessage(), PHP_EOL;
5050
}
5151
?>
5252
```
@@ -72,7 +72,7 @@ Name | Type | Description | Notes
7272

7373
### Return type
7474

75-
[**\OpenAPI\Client\Model\Release[]**](../Model/Release.md)
75+
[**\OneMusicAPI\Client\Model\Release[]**](../Model/Release.md)
7676

7777
### Authorization
7878

docs/Model/Medium.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
77
**total_discs** | **string** | | [optional]
88
**position** | **string** | | [optional]
99
**format** | **string** | | [optional]
10-
**tracks** | [**\OpenAPI\Client\Model\Track[]**](Track.md) | | [optional]
10+
**tracks** | [**\OneMusicAPI\Client\Model\Track[]**](Track.md) | | [optional]
1111

1212
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
1313

docs/Model/Release.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ Name | Type | Description | Notes
1212
**country** | **string** | | [optional]
1313
**genre** | **string[]** | | [optional]
1414
**compilation** | **bool** | | [optional]
15-
**media** | [**\OpenAPI\Client\Model\Medium[]**](Medium.md) | | [optional]
16-
**images** | [**\OpenAPI\Client\Model\Image[]**](Image.md) | | [optional]
15+
**media** | [**\OneMusicAPI\Client\Model\Medium[]**](Medium.md) | | [optional]
16+
**images** | [**\OneMusicAPI\Client\Model\Image[]**](Image.md) | | [optional]
1717
**uris** | **string[]** | | [optional]
1818
**types** | **string[]** | | [optional]
19-
**label** | [**\OpenAPI\Client\Model\ReleaseLabel**](ReleaseLabel.md) | | [optional]
19+
**label** | [**\OneMusicAPI\Client\Model\ReleaseLabel**](ReleaseLabel.md) | | [optional]
2020
**barcode** | **string** | | [optional]
2121
**score** | **double** | |
2222

docs/Model/Track.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Name | Type | Description | Notes
88
**title** | **string** | | [optional]
99
**number** | **string** | | [optional]
1010
**artists** | **string[]** | | [optional]
11-
**match** | [**\OpenAPI\Client\Model\TrackMatch**](TrackMatch.md) | | [optional]
12-
**releases** | [**\OpenAPI\Client\Model\TrackRelease[]**](TrackRelease.md) | | [optional]
11+
**match** | [**\OneMusicAPI\Client\Model\TrackMatch**](TrackMatch.md) | | [optional]
12+
**releases** | [**\OneMusicAPI\Client\Model\TrackRelease[]**](TrackRelease.md) | | [optional]
1313
**uris** | **string[]** | | [optional]
1414
**composers** | **string[]** | | [optional]
1515
**isrc** | **string[]** | | [optional]

docs/Model/TrackRelease.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**position** | **string** | | [optional]
88
**medium_position** | **string** | | [optional]
9-
**release** | [**\OpenAPI\Client\Model\Release**](Release.md) | |
9+
**release** | [**\OneMusicAPI\Client\Model\Release**](Release.md) | |
1010

1111
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
1212

git_push.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ if [ "$git_host" = "" ]; then
1414
fi
1515

1616
if [ "$git_user_id" = "" ]; then
17-
git_user_id="GIT_USER_ID"
17+
git_user_id="onemusicapi"
1818
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
1919
fi
2020

2121
if [ "$git_repo_id" = "" ]; then
22-
git_repo_id="GIT_REPO_ID"
22+
git_repo_id="client-php"
2323
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
2424
fi
2525

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22
/**
3-
* DefaultApi
3+
* ReleaseApi
44
* PHP version 5
55
*
66
* @category Class
7-
* @package OpenAPI\Client
7+
* @package OneMusicAPI\Client
88
* @author OpenAPI Generator team
99
* @link https://openapi-generator.tech
1010
*/
@@ -26,28 +26,28 @@
2626
* Do not edit the class manually.
2727
*/
2828

29-
namespace OpenAPI\Client\Api;
29+
namespace OneMusicAPI\Client\Api;
3030

3131
use GuzzleHttp\Client;
3232
use GuzzleHttp\ClientInterface;
3333
use GuzzleHttp\Exception\RequestException;
3434
use GuzzleHttp\Psr7\MultipartStream;
3535
use GuzzleHttp\Psr7\Request;
3636
use GuzzleHttp\RequestOptions;
37-
use OpenAPI\Client\ApiException;
38-
use OpenAPI\Client\Configuration;
39-
use OpenAPI\Client\HeaderSelector;
40-
use OpenAPI\Client\ObjectSerializer;
37+
use OneMusicAPI\Client\ApiException;
38+
use OneMusicAPI\Client\Configuration;
39+
use OneMusicAPI\Client\HeaderSelector;
40+
use OneMusicAPI\Client\ObjectSerializer;
4141

4242
/**
43-
* DefaultApi Class Doc Comment
43+
* ReleaseApi Class Doc Comment
4444
*
4545
* @category Class
46-
* @package OpenAPI\Client
46+
* @package OneMusicAPI\Client
4747
* @author OpenAPI Generator team
4848
* @link https://openapi-generator.tech
4949
*/
50-
class DefaultApi
50+
class ReleaseApi
5151
{
5252
/**
5353
* @var ClientInterface
@@ -132,9 +132,9 @@ public function getConfig()
132132
* @param string $artist The name of the artist for the release. (optional)
133133
* @param string $barcode The barcode for the release. (optional)
134134
*
135-
* @throws \OpenAPI\Client\ApiException on non-2xx response
135+
* @throws \OneMusicAPI\Client\ApiException on non-2xx response
136136
* @throws \InvalidArgumentException
137-
* @return \OpenAPI\Client\Model\Release[]
137+
* @return \OneMusicAPI\Client\Model\Release[]
138138
*/
139139
public function release($user_key, $inc = null, $must_inc = null, $max_result_count = null, $min_certainty = null, $min_image_score = null, $min_image_width = null, $min_image_height = null, $max_image_width = null, $max_image_height = null, $title = null, $artist = null, $barcode = null)
140140
{
@@ -159,9 +159,9 @@ public function release($user_key, $inc = null, $must_inc = null, $max_result_co
159159
* @param string $artist The name of the artist for the release. (optional)
160160
* @param string $barcode The barcode for the release. (optional)
161161
*
162-
* @throws \OpenAPI\Client\ApiException on non-2xx response
162+
* @throws \OneMusicAPI\Client\ApiException on non-2xx response
163163
* @throws \InvalidArgumentException
164-
* @return array of \OpenAPI\Client\Model\Release[], HTTP status code, HTTP response headers (array of strings)
164+
* @return array of \OneMusicAPI\Client\Model\Release[], HTTP status code, HTTP response headers (array of strings)
165165
*/
166166
public function releaseWithHttpInfo($user_key, $inc = null, $must_inc = null, $max_result_count = null, $min_certainty = null, $min_image_score = null, $min_image_width = null, $min_image_height = null, $max_image_width = null, $max_image_height = null, $title = null, $artist = null, $barcode = null)
167167
{
@@ -198,20 +198,20 @@ public function releaseWithHttpInfo($user_key, $inc = null, $must_inc = null, $m
198198
$responseBody = $response->getBody();
199199
switch($statusCode) {
200200
case 200:
201-
if ('\OpenAPI\Client\Model\Release[]' === '\SplFileObject') {
201+
if ('\OneMusicAPI\Client\Model\Release[]' === '\SplFileObject') {
202202
$content = $responseBody; //stream goes to serializer
203203
} else {
204204
$content = (string) $responseBody;
205205
}
206206

207207
return [
208-
ObjectSerializer::deserialize($content, '\OpenAPI\Client\Model\Release[]', []),
208+
ObjectSerializer::deserialize($content, '\OneMusicAPI\Client\Model\Release[]', []),
209209
$response->getStatusCode(),
210210
$response->getHeaders()
211211
];
212212
}
213213

214-
$returnType = '\OpenAPI\Client\Model\Release[]';
214+
$returnType = '\OneMusicAPI\Client\Model\Release[]';
215215
$responseBody = $response->getBody();
216216
if ($returnType === '\SplFileObject') {
217217
$content = $responseBody; //stream goes to serializer
@@ -230,7 +230,7 @@ public function releaseWithHttpInfo($user_key, $inc = null, $must_inc = null, $m
230230
case 200:
231231
$data = ObjectSerializer::deserialize(
232232
$e->getResponseBody(),
233-
'\OpenAPI\Client\Model\Release[]',
233+
'\OneMusicAPI\Client\Model\Release[]',
234234
$e->getResponseHeaders()
235235
);
236236
$e->setResponseObject($data);
@@ -296,7 +296,7 @@ function ($response) {
296296
*/
297297
public function releaseAsyncWithHttpInfo($user_key, $inc = null, $must_inc = null, $max_result_count = null, $min_certainty = null, $min_image_score = null, $min_image_width = null, $min_image_height = null, $max_image_width = null, $max_image_height = null, $title = null, $artist = null, $barcode = null)
298298
{
299-
$returnType = '\OpenAPI\Client\Model\Release[]';
299+
$returnType = '\OneMusicAPI\Client\Model\Release[]';
300300
$request = $this->releaseRequest($user_key, $inc, $must_inc, $max_result_count, $min_certainty, $min_image_score, $min_image_width, $min_image_height, $max_image_width, $max_image_height, $title, $artist, $barcode);
301301

302302
return $this->client

lib/ApiException.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* PHP version 5
55
*
66
* @category Class
7-
* @package OpenAPI\Client
7+
* @package OneMusicAPI\Client
88
* @author OpenAPI Generator team
99
* @link https://openapi-generator.tech
1010
*/
@@ -26,15 +26,15 @@
2626
* Do not edit the class manually.
2727
*/
2828

29-
namespace OpenAPI\Client;
29+
namespace OneMusicAPI\Client;
3030

3131
use \Exception;
3232

3333
/**
3434
* ApiException Class Doc Comment
3535
*
3636
* @category Class
37-
* @package OpenAPI\Client
37+
* @package OneMusicAPI\Client
3838
* @author OpenAPI Generator team
3939
* @link https://openapi-generator.tech
4040
*/

0 commit comments

Comments
 (0)