Skip to content

Commit 63e7ce3

Browse files
authored
switch to Sigwin namespace (#3)
1 parent e576314 commit 63e7ce3

24 files changed

+80
-80
lines changed

.openapi-generator.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"packageName": "Flexolabs\\RedditClient",
3-
"invokerPackage": "Flexolabs\\RedditClient",
2+
"packageName": "RedditClient",
3+
"invokerPackage": "Sigwin\\RedditClient",
44
"srcBasePath": "src",
5-
"gitUserId": "flexolabs",
5+
"gitUserId": "sigwin",
66
"gitRepoId": "reddit-client"
77
}

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Flexolabs\RedditClient
1+
# RedditClient
22

33
Reddit.com API
44

@@ -19,11 +19,11 @@ To install the bindings via [Composer](https://getcomposer.org/), add the follow
1919
"repositories": [
2020
{
2121
"type": "vcs",
22-
"url": "https://github.com/flexolabs/reddit-client.git"
22+
"url": "https://github.com/sigwin/reddit-client.git"
2323
}
2424
],
2525
"require": {
26-
"flexolabs/reddit-client": "*@dev"
26+
"sigwin/reddit-client": "*@dev"
2727
}
2828
}
2929
```
@@ -36,7 +36,7 @@ Download the files and include `autoload.php`:
3636

3737
```php
3838
<?php
39-
require_once('/path/to/Flexolabs\RedditClient/vendor/autoload.php');
39+
require_once('/path/to/RedditClient/vendor/autoload.php');
4040
```
4141

4242
## Getting Started
@@ -50,10 +50,10 @@ require_once(__DIR__ . '/vendor/autoload.php');
5050

5151

5252
// Configure OAuth2 access token for authorization: oauth2
53-
$config = Flexolabs\RedditClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
53+
$config = Sigwin\RedditClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
5454

5555

56-
$apiInstance = new Flexolabs\RedditClient\Api\UserApi(
56+
$apiInstance = new Sigwin\RedditClient\Api\UserApi(
5757
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
5858
// This is optional, `GuzzleHttp\Client` will be used as default.
5959
new GuzzleHttp\Client(),

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "flexolabs/reddit-client",
2+
"name": "sigwin/reddit-client",
33
"description": "Reddit.com API",
44
"keywords": [
55
"openapitools",
@@ -29,12 +29,12 @@
2929
},
3030
"autoload": {
3131
"psr-4": {
32-
"Flexolabs\\RedditClient\\": "src/"
32+
"Sigwin\\RedditClient\\": "src/"
3333
}
3434
},
3535
"autoload-dev": {
3636
"psr-4": {
37-
"Flexolabs\\RedditClient\\Test\\": "test/"
37+
"Sigwin\\RedditClient\\Test\\": "test/"
3838
}
3939
}
4040
}

docs/Api/UserApi.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Flexolabs\RedditClient\UserApi
1+
# Sigwin\RedditClient\UserApi
22

33
All URIs are relative to https://oauth.reddit.com.
44

@@ -11,7 +11,7 @@ Method | HTTP request | Description
1111
## `getSaved()`
1212

1313
```php
14-
getSaved($username, $after, $before, $limit): \Flexolabs\RedditClient\Model\ListingEnvelope
14+
getSaved($username, $after, $before, $limit): \Sigwin\RedditClient\Model\ListingEnvelope
1515
```
1616

1717
Get user saved things
@@ -24,10 +24,10 @@ require_once(__DIR__ . '/vendor/autoload.php');
2424

2525

2626
// Configure OAuth2 access token for authorization: oauth2
27-
$config = Flexolabs\RedditClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
27+
$config = Sigwin\RedditClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
2828

2929

30-
$apiInstance = new Flexolabs\RedditClient\Api\UserApi(
30+
$apiInstance = new Sigwin\RedditClient\Api\UserApi(
3131
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
3232
// This is optional, `GuzzleHttp\Client` will be used as default.
3333
new GuzzleHttp\Client(),
@@ -57,7 +57,7 @@ Name | Type | Description | Notes
5757

5858
### Return type
5959

60-
[**\Flexolabs\RedditClient\Model\ListingEnvelope**](../Model/ListingEnvelope.md)
60+
[**\Sigwin\RedditClient\Model\ListingEnvelope**](../Model/ListingEnvelope.md)
6161

6262
### Authorization
6363

@@ -75,7 +75,7 @@ Name | Type | Description | Notes
7575
## `me()`
7676

7777
```php
78-
me(): \Flexolabs\RedditClient\Model\Me
78+
me(): \Sigwin\RedditClient\Model\Me
7979
```
8080

8181
Returns the identity of the user.
@@ -88,10 +88,10 @@ require_once(__DIR__ . '/vendor/autoload.php');
8888

8989

9090
// Configure OAuth2 access token for authorization: oauth2
91-
$config = Flexolabs\RedditClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
91+
$config = Sigwin\RedditClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
9292

9393

94-
$apiInstance = new Flexolabs\RedditClient\Api\UserApi(
94+
$apiInstance = new Sigwin\RedditClient\Api\UserApi(
9595
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
9696
// This is optional, `GuzzleHttp\Client` will be used as default.
9797
new GuzzleHttp\Client(),
@@ -112,7 +112,7 @@ This endpoint does not need any parameter.
112112

113113
### Return type
114114

115-
[**\Flexolabs\RedditClient\Model\Me**](../Model/Me.md)
115+
[**\Sigwin\RedditClient\Model\Me**](../Model/Me.md)
116116

117117
### Authorization
118118

docs/Model/Listing.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
**modhash** | **string** | |
88
**dist** | **int** | |
9-
**children** | [**\Flexolabs\RedditClient\Model\Thing[]**](Thing.md) | |
9+
**children** | [**\Sigwin\RedditClient\Model\Thing[]**](Thing.md) | |
1010
**after** | **string** | | [optional]
1111
**before** | **string** | | [optional]
1212

docs/Model/ListingEnvelope.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**kind** | **string** | |
8-
**data** | [**\Flexolabs\RedditClient\Model\Listing**](Listing.md) | |
8+
**data** | [**\Sigwin\RedditClient\Model\Listing**](Listing.md) | |
99

1010
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

docs/Model/Thing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**kind** | **string** | | [optional]
8-
**data** | [**\Flexolabs\RedditClient\Model\ThingData**](ThingData.md) | | [optional]
8+
**data** | [**\Sigwin\RedditClient\Model\ThingData**](ThingData.md) | | [optional]
99

1010
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

src/Api/UserApi.php

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
declare(strict_types=1);
44

5-
namespace Flexolabs\RedditClient\Api;
5+
namespace Sigwin\RedditClient\Api;
66

7-
use Flexolabs\RedditClient\ApiException;
8-
use Flexolabs\RedditClient\Configuration;
9-
use Flexolabs\RedditClient\HeaderSelector;
10-
use Flexolabs\RedditClient\ObjectSerializer;
117
use GuzzleHttp\Client;
128
use GuzzleHttp\ClientInterface;
139
use GuzzleHttp\Exception\RequestException;
1410
use GuzzleHttp\Psr7\MultipartStream;
1511
use GuzzleHttp\Psr7\Request;
1612
use GuzzleHttp\RequestOptions;
13+
use Sigwin\RedditClient\ApiException;
14+
use Sigwin\RedditClient\Configuration;
15+
use Sigwin\RedditClient\HeaderSelector;
16+
use Sigwin\RedditClient\ObjectSerializer;
1717

1818
/**
1919
* UserApi Class Doc Comment.
@@ -99,10 +99,10 @@ public function getConfig(): Configuration
9999
* @param string $before before (optional)
100100
* @param int $limit limit (optional, default to 25)
101101
*
102-
* @throws \Flexolabs\RedditClient\ApiException on non-2xx response
102+
* @throws \Sigwin\RedditClient\ApiException on non-2xx response
103103
* @throws \InvalidArgumentException
104104
*/
105-
public function getSaved($username, $after = null, $before = null, $limit = 25): \Flexolabs\RedditClient\Model\ListingEnvelope
105+
public function getSaved($username, $after = null, $before = null, $limit = 25): \Sigwin\RedditClient\Model\ListingEnvelope
106106
{
107107
list($response) = $this->getSavedWithHttpInfo($username, $after, $before, $limit);
108108

@@ -119,10 +119,10 @@ public function getSaved($username, $after = null, $before = null, $limit = 25):
119119
* @param string $before (optional)
120120
* @param int $limit (optional, default to 25)
121121
*
122-
* @throws \Flexolabs\RedditClient\ApiException on non-2xx response
122+
* @throws \Sigwin\RedditClient\ApiException on non-2xx response
123123
* @throws \InvalidArgumentException
124124
*
125-
* @return array of \Flexolabs\RedditClient\Model\ListingEnvelope, HTTP status code, HTTP response headers (array of strings)
125+
* @return array of \Sigwin\RedditClient\Model\ListingEnvelope, HTTP status code, HTTP response headers (array of strings)
126126
*/
127127
public function getSavedWithHttpInfo($username, $after = null, $before = null, $limit = 25): array
128128
{
@@ -145,20 +145,20 @@ public function getSavedWithHttpInfo($username, $after = null, $before = null, $
145145
$responseBody = $response->getBody();
146146
switch ($statusCode) {
147147
case 200:
148-
if ('\Flexolabs\RedditClient\Model\ListingEnvelope' === '\SplFileObject') {
148+
if ('\Sigwin\RedditClient\Model\ListingEnvelope' === '\SplFileObject') {
149149
$content = $responseBody; //stream goes to serializer
150150
} else {
151151
$content = (string) $responseBody;
152152
}
153153

154154
return [
155-
ObjectSerializer::deserialize($content, '\Flexolabs\RedditClient\Model\ListingEnvelope', []),
155+
ObjectSerializer::deserialize($content, '\Sigwin\RedditClient\Model\ListingEnvelope', []),
156156
$response->getStatusCode(),
157157
$response->getHeaders(),
158158
];
159159
}
160160

161-
$returnType = '\Flexolabs\RedditClient\Model\ListingEnvelope';
161+
$returnType = '\Sigwin\RedditClient\Model\ListingEnvelope';
162162
$responseBody = $response->getBody();
163163
if ($returnType === '\SplFileObject') {
164164
$content = $responseBody; //stream goes to serializer
@@ -176,7 +176,7 @@ public function getSavedWithHttpInfo($username, $after = null, $before = null, $
176176
case 200:
177177
$data = ObjectSerializer::deserialize(
178178
$e->getResponseBody(),
179-
'\Flexolabs\RedditClient\Model\ListingEnvelope',
179+
'\Sigwin\RedditClient\Model\ListingEnvelope',
180180
$e->getResponseHeaders()
181181
);
182182
$e->setResponseObject($data);
@@ -222,7 +222,7 @@ static function ($response) {
222222
*/
223223
public function getSavedAsyncWithHttpInfo($username, $after = null, $before = null, $limit = 25): \GuzzleHttp\Promise\PromiseInterface
224224
{
225-
$returnType = '\Flexolabs\RedditClient\Model\ListingEnvelope';
225+
$returnType = '\Sigwin\RedditClient\Model\ListingEnvelope';
226226
$request = $this->getSavedRequest($username, $after, $before, $limit);
227227

228228
return $this->client
@@ -379,10 +379,10 @@ public function getSavedRequest($username, $after = null, $before = null, $limit
379379
* This oepration contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host.
380380
* URL: https://oauth.reddit.com/api/v1
381381
*
382-
* @throws \Flexolabs\RedditClient\ApiException on non-2xx response
382+
* @throws \Sigwin\RedditClient\ApiException on non-2xx response
383383
* @throws \InvalidArgumentException
384384
*/
385-
public function me(): \Flexolabs\RedditClient\Model\Me
385+
public function me(): \Sigwin\RedditClient\Model\Me
386386
{
387387
list($response) = $this->meWithHttpInfo();
388388

@@ -397,10 +397,10 @@ public function me(): \Flexolabs\RedditClient\Model\Me
397397
* This oepration contains host(s) defined in the OpenAP spec. Use 'hostIndex' to select the host.
398398
* URL: https://oauth.reddit.com/api/v1
399399
*
400-
* @throws \Flexolabs\RedditClient\ApiException on non-2xx response
400+
* @throws \Sigwin\RedditClient\ApiException on non-2xx response
401401
* @throws \InvalidArgumentException
402402
*
403-
* @return array of \Flexolabs\RedditClient\Model\Me, HTTP status code, HTTP response headers (array of strings)
403+
* @return array of \Sigwin\RedditClient\Model\Me, HTTP status code, HTTP response headers (array of strings)
404404
*/
405405
public function meWithHttpInfo(): array
406406
{
@@ -423,20 +423,20 @@ public function meWithHttpInfo(): array
423423
$responseBody = $response->getBody();
424424
switch ($statusCode) {
425425
case 200:
426-
if ('\Flexolabs\RedditClient\Model\Me' === '\SplFileObject') {
426+
if ('\Sigwin\RedditClient\Model\Me' === '\SplFileObject') {
427427
$content = $responseBody; //stream goes to serializer
428428
} else {
429429
$content = (string) $responseBody;
430430
}
431431

432432
return [
433-
ObjectSerializer::deserialize($content, '\Flexolabs\RedditClient\Model\Me', []),
433+
ObjectSerializer::deserialize($content, '\Sigwin\RedditClient\Model\Me', []),
434434
$response->getStatusCode(),
435435
$response->getHeaders(),
436436
];
437437
}
438438

439-
$returnType = '\Flexolabs\RedditClient\Model\Me';
439+
$returnType = '\Sigwin\RedditClient\Model\Me';
440440
$responseBody = $response->getBody();
441441
if ($returnType === '\SplFileObject') {
442442
$content = $responseBody; //stream goes to serializer
@@ -454,7 +454,7 @@ public function meWithHttpInfo(): array
454454
case 200:
455455
$data = ObjectSerializer::deserialize(
456456
$e->getResponseBody(),
457-
'\Flexolabs\RedditClient\Model\Me',
457+
'\Sigwin\RedditClient\Model\Me',
458458
$e->getResponseHeaders()
459459
);
460460
$e->setResponseObject($data);
@@ -496,7 +496,7 @@ static function ($response) {
496496
*/
497497
public function meAsyncWithHttpInfo(): \GuzzleHttp\Promise\PromiseInterface
498498
{
499-
$returnType = '\Flexolabs\RedditClient\Model\Me';
499+
$returnType = '\Sigwin\RedditClient\Model\Me';
500500
$request = $this->meRequest();
501501

502502
return $this->client

src/ApiException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Flexolabs\RedditClient;
5+
namespace Sigwin\RedditClient;
66

77
use Exception;
88

src/Configuration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Flexolabs\RedditClient;
5+
namespace Sigwin\RedditClient;
66

77
/**
88
* Configuration Class Doc Comment
@@ -373,7 +373,7 @@ public static function setDefaultConfiguration(self $config): void
373373
*/
374374
public static function toDebugReport(): string
375375
{
376-
$report = 'PHP SDK (Flexolabs\RedditClient) Debug Report:'.PHP_EOL;
376+
$report = 'PHP SDK (Sigwin\RedditClient) Debug Report:'.PHP_EOL;
377377
$report .= ' OS: '.php_uname().PHP_EOL;
378378
$report .= ' PHP Version: '.PHP_VERSION.PHP_EOL;
379379
$report .= ' The version of the OpenAPI document: 1.0.2'.PHP_EOL;

0 commit comments

Comments
 (0)