Permalink
Browse files

Semi-working client, I guess

  • Loading branch information...
jacobemerick committed Feb 4, 2019
1 parent 038f600 commit f13bd550156be360f22c6382d74f60209b458f8a
23 .php_cs
@@ -0,0 +1,23 @@
<?php
return PhpCsFixer\Config::create()
->setUsingCache(true)
->setRules([
'@PSR2' => true,
'ordered_imports' => true,
'phpdoc_order' => true,
'array_syntax' => [ 'syntax' => 'short' ],
'strict_comparison' => true,
'strict_param' => true,
'no_trailing_whitespace' => false,
'no_trailing_whitespace_in_comment' => false,
'braces' => false,
'single_blank_line_at_eof' => false,
'blank_line_after_namespace' => false,
])
->setFinder(
PhpCsFixer\Finder::create()
->exclude('test')
->exclude('tests')
->in(__DIR__)
);
@@ -0,0 +1,23 @@
# Swagger Codegen Ignore
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
@@ -0,0 +1 @@
2.4.0
@@ -0,0 +1,10 @@
language: php
sudo: false
php:
- 5.4
- 5.5
- 5.6
- 7.0
- hhvm
before_install: "composer install"
script: "vendor/bin/phpunit"
113 README.md
@@ -1 +1,112 @@
# lifestream-service-client
#
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: 0.1.0
- Build package: io.swagger.codegen.languages.PhpClientCodegen

## Requirements

PHP 5.5 and later

## Installation & Usage
### Composer

To install the bindings via [Composer](http://getcomposer.org/), add the following to `composer.json`:

```
{
"repositories": [
{
"type": "git",
"url": "https://github.com/jacobemerick/lifestream-service-client.git"
}
],
"require": {
"jacobemerick/lifestream-service-client": "*@dev"
}
}
```

Then run `composer install`

### Manual Installation

Download the files and include `autoload.php`:

```php
require_once('/path/to//vendor/autoload.php');
```

## Tests

To run the unit tests:

```
composer install
./vendor/bin/phpunit
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Jacobemerick\LifestreamService\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Jacobemerick\LifestreamService\Api\DefaultApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$event_id = "event_id_example"; // string | Event identifier
try {
$result = $apiInstance->getEvent($event_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->getEvent: ', $e->getMessage(), PHP_EOL;
}
?>
```

## Documentation for API Endpoints

All URIs are relative to *http://localhost*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DefaultApi* | [**getEvent**](docs/Api/DefaultApi.md#getevent) | **GET** /events/{event_id} |
*DefaultApi* | [**getEvents**](docs/Api/DefaultApi.md#getevents) | **GET** /events |
*DefaultApi* | [**getTypes**](docs/Api/DefaultApi.md#gettypes) | **GET** /types |


## Documentation For Models

- [Error](docs/Model/Error.md)
- [Event](docs/Model/Event.md)
- [Type](docs/Model/Type.md)


## Documentation For Authorization


## basicAuth

- **Type**: HTTP basic authentication


## Author




@@ -0,0 +1,5 @@
#!/usr/bin/env sh

rm -r lib
swagger-codegen generate -i https://lifestream.reynrick.com/api-docs -l php -c config.json
composer update
@@ -0,0 +1,36 @@
{
"name": "jacobemerick/lifestream-service-client",
"description": "",
"keywords": [
"swagger",
"php",
"sdk",
"api"
],
"homepage": "http://swagger.io",
"license": "proprietary",
"authors": [
{
"name": "Swagger and contributors",
"homepage": "https://github.com/swagger-api/swagger-codegen"
}
],
"require": {
"php": ">=5.5",
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"guzzlehttp/guzzle": "^6.2"
},
"require-dev": {
"phpunit/phpunit": "^4.8",
"squizlabs/php_codesniffer": "~2.6",
"friendsofphp/php-cs-fixer": "~2.12"
},
"autoload": {
"psr-4": { "Jacobemerick\\LifestreamService\\" : "lib/" }
},
"autoload-dev": {
"psr-4": { "Jacobemerick\\LifestreamService\\" : "test/" }
}
}
@@ -0,0 +1,8 @@
{
"invokerPackage": "Jacobemerick\\LifestreamService",
"modelPackage": "Jacobemerick\\LifestreamService\\Model",
"apiPackage": "Jacobemerick\\LifestreamService\\Api",
"packagePath": "",
"composerVendorName": "jacobemerick",
"composerProjectName": "lifestream-service-client"
}
Oops, something went wrong.

0 comments on commit f13bd55

Please sign in to comment.