Skip to content

1.x #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 9, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/vendor
.idea
.idea
vendor
composer.lock
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
PHP Api Proxy for Laravel
PHP Api Proxy for Laravel 4
================

[![Latest Version](http://img.shields.io/github/release/thinkingmik/api-proxy-laravel.svg?style=flat-square)](https://packagist.org/packages/andreoli/api-proxy-laravel)
[![Latest Version](http://img.shields.io/github/release/thinkingmik/api-proxy-laravel.svg?style=flat-square)](https://packagist.org/packages/thinkingmik/api-proxy-laravel)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
[![Build Status](https://img.shields.io/travis/thinkingmik/api-proxy-laravel/master.svg?style=flat-square)](https://travis-ci.org/thinkingmik/api-proxy-laravel)
[![Code Quality](https://img.shields.io/scrutinizer/g/thinkingmik/api-proxy-laravel.svg?style=flat-square)](https://scrutinizer-ci.com/g/thinkingmik/api-proxy-laravel/?branch=master)
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/thinkingmik/api-proxy-laravel.svg?style=flat-square)](https://scrutinizer-ci.com/g/thinkingmik/api-proxy-laravel/code-structure)
[![Total Downloads](https://img.shields.io/packagist/dt/thinkingmik/api-proxy-laravel.svg?style=flat-square)](https://packagist.org/packages/andreoli/api-proxy-laravel)
[![Total Downloads](https://img.shields.io/packagist/dt/thinkingmik/api-proxy-laravel.svg?style=flat-square)](https://packagist.org/packages/thinkingmik/api-proxy-laravel)

## Summary

- [Introduction](#introduction)
- [Installation](#installation)
- [Setup](#setup)
Expand Down Expand Up @@ -177,25 +176,25 @@ Add the following line to the `require` section of `composer.json`:
```json
{
"require": {
"andreoli/api-proxy-laravel": "1.*@dev"
"thinkingmik/api-proxy-laravel": "1.x"
}
}
```

## Setup

1. Add `'Andreoli\ApiProxy\ApiProxyServiceProvider',` to the service provider list in `app/config/app.php`.
2. Add `'Proxify' => 'Andreoli\ApiProxy\Facades\ApiProxyFacade',` to the list of aliases in `app/config/app.php`.
1. Add `'ThinKingMik\ApiProxy\ApiProxyServiceProvider',` to the service provider list in `app/config/app.php`.
2. Add `'Proxify' => 'ThinKingMik\ApiProxy\Facades\ApiProxyFacade',` to the list of aliases in `app/config/app.php`.

## Configuration

In order to use the Api Proxy publish its configuration first

```
php artisan config:publish andreoli/api-proxy-laravel
php artisan config:publish thinkingmik/api-proxy-laravel
```

Afterwards edit the file ```app/config/packages/andreoli/api-proxy-laravel/proxy.php``` to suit your needs.
Afterwards edit the file ```app/config/packages/thinkingmik/api-proxy-laravel/proxy.php``` to suit your needs.

## Usage

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "andreoli/api-proxy-laravel",
"name": "thinkingmik/api-proxy-laravel",
"description": "A Laravel proxy package for javascript API calls",
"keywords": [
"laravel",
Expand All @@ -24,7 +24,7 @@
"classmap": [
],
"psr-0": {
"Andreoli\\ApiProxy\\": "src/"
"ThinKingMik\\ApiProxy\\": "src/"
}
},
"minimum-stability": "stable",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?php

/**
* @package andreoli/api-proxy-laravel
* @package thinkingmik/api-proxy-laravel
* @author Michele Andreoli <michi.andreoli[at]gmail.com>
* @copyright Copyright (c) Michele Andreoli
* @license http://mit-license.org/
* @link https://github.com/mandreoli/api-proxy-laravel
* @link https://github.com/thinkingmik/api-proxy-laravel
*/

namespace Andreoli\ApiProxy;
namespace ThinKingMik\ApiProxy;

use Illuminate\Support\ServiceProvider;
use Illuminate\Http\JsonResponse;
use Andreoli\ApiProxy\Exceptions\ProxyException;
use ThinKingMik\ApiProxy\Exceptions\ProxyException;

class ApiProxyServiceProvider extends ServiceProvider {

Expand All @@ -29,7 +29,7 @@ class ApiProxyServiceProvider extends ServiceProvider {
* @return void
*/
public function boot() {
$this->package('andreoli/api-proxy-laravel');
$this->package('thinkingmik/api-proxy-laravel');
}

/**
Expand All @@ -53,7 +53,7 @@ public function registerApiProxy() {
return $proxy;
});

$this->app->bind('Andreoli\ApiProxy\Proxy', function($app) {
$this->app->bind('ThinKingMik\ApiProxy\Proxy', function($app) {
return $app['api-proxy.proxy'];
});
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

/**
* @package andreoli/api-proxy-laravel
* @package thinkingmik/api-proxy-laravel
* @author Michele Andreoli <michi.andreoli[at]gmail.com>
* @copyright Copyright (c) Michele Andreoli
* @license http://mit-license.org/
* @link https://github.com/mandreoli/api-proxy-laravel
* @link https://github.com/thinkingmik/api-proxy-laravel
*/

namespace Andreoli\ApiProxy\Exceptions;
namespace ThinKingMik\ApiProxy\Exceptions;

/**
* Exception class
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

/**
* @package andreoli/api-proxy-laravel
* @package thinkingmik/api-proxy-laravel
* @author Michele Andreoli <michi.andreoli[at]gmail.com>
* @copyright Copyright (c) Michele Andreoli
* @license http://mit-license.org/
* @link https://github.com/mandreoli/api-proxy-laravel
* @link https://github.com/thinkingmik/api-proxy-laravel
*/

namespace Andreoli\ApiProxy\Exceptions;
namespace ThinKingMik\ApiProxy\Exceptions;

/**
* Exception class
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

/**
* @package andreoli/api-proxy-laravel
* @package thinkingmik/api-proxy-laravel
* @author Michele Andreoli <michi.andreoli[at]gmail.com>
* @copyright Copyright (c) Michele Andreoli
* @license http://mit-license.org/
* @link https://github.com/mandreoli/api-proxy-laravel
* @link https://github.com/thinkingmik/api-proxy-laravel
*/

namespace Andreoli\ApiProxy\Exceptions;
namespace ThinKingMik\ApiProxy\Exceptions;

/**
* Exception class
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

/**
* @package andreoli/api-proxy-laravel
* @package thinkingmik/api-proxy-laravel
* @author Michele Andreoli <michi.andreoli[at]gmail.com>
* @copyright Copyright (c) Michele Andreoli
* @license http://mit-license.org/
* @link https://github.com/mandreoli/api-proxy-laravel
* @link https://github.com/thinkingmik/api-proxy-laravel
*/

namespace Andreoli\ApiProxy\Exceptions;
namespace ThinKingMik\ApiProxy\Exceptions;

/**
* Exception class
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

/**
* @package andreoli/api-proxy-laravel
* @package thinkingmik/api-proxy-laravel
* @author Michele Andreoli <michi.andreoli[at]gmail.com>
* @copyright Copyright (c) Michele Andreoli
* @license http://mit-license.org/
* @link https://github.com/mandreoli/api-proxy-laravel
* @link https://github.com/thinkingmik/api-proxy-laravel
*/

namespace Andreoli\ApiProxy\Exceptions;
namespace ThinKingMik\ApiProxy\Exceptions;

/**
* Exception class
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

/**
* @package andreoli/api-proxy-laravel
* @package thinkingmik/api-proxy-laravel
* @author Michele Andreoli <michi.andreoli[at]gmail.com>
* @copyright Copyright (c) Michele Andreoli
* @license http://mit-license.org/
* @link https://github.com/mandreoli/api-proxy-laravel
* @link https://github.com/thinkingmik/api-proxy-laravel
*/

namespace Andreoli\ApiProxy\Facades;
namespace ThinKingMik\ApiProxy\Facades;

use Illuminate\Support\Facades\Facade;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<?php

/**
* @package andreoli/api-proxy-laravel
* @package thinkingmik/api-proxy-laravel
* @author Michele Andreoli <michi.andreoli[at]gmail.com>
* @copyright Copyright (c) Michele Andreoli
* @license http://mit-license.org/
* @link https://github.com/mandreoli/api-proxy-laravel
* @link https://github.com/thinkingmik/api-proxy-laravel
*/

namespace Andreoli\ApiProxy\Managers;
namespace ThinKingMik\ApiProxy\Managers;

use Andreoli\ApiProxy\Exceptions\CookieExpiredException;
use Andreoli\ApiProxy\Exceptions\CookieInvalidException;
use ThinKingMik\ApiProxy\Exceptions\CookieExpiredException;
use ThinKingMik\ApiProxy\Exceptions\CookieInvalidException;
use Illuminate\Support\Facades\Cookie;
use Andreoli\ApiProxy\ProxyAux;
use ThinKingMik\ApiProxy\ProxyAux;

class CookieManager {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<?php

/**
* @package andreoli/api-proxy-laravel
* @package thinkingmik/api-proxy-laravel
* @author Michele Andreoli <michi.andreoli[at]gmail.com>
* @copyright Copyright (c) Michele Andreoli
* @license http://mit-license.org/
* @link https://github.com/mandreoli/api-proxy-laravel
* @link https://github.com/thinkingmik/api-proxy-laravel
*/

namespace Andreoli\ApiProxy\Managers;
namespace ThinKingMik\ApiProxy\Managers;

use Andreoli\ApiProxy\ProxyAux;
use Andreoli\ApiProxy\Models\ProxyResponse;
use Andreoli\ApiProxy\Models\MixResponse;
use ThinKingMik\ApiProxy\ProxyAux;
use ThinKingMik\ApiProxy\Models\ProxyResponse;
use ThinKingMik\ApiProxy\Models\MixResponse;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\ClientException;
use Andreoli\ApiProxy\Exceptions\MissingClientSecretException;
use ThinKingMik\ApiProxy\Exceptions\MissingClientSecretException;

class RequestManager {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

/**
* @package andreoli/api-proxy-laravel
* @package thinkingmik/api-proxy-laravel
* @author Michele Andreoli <michi.andreoli[at]gmail.com>
* @copyright Copyright (c) Michele Andreoli
* @license http://mit-license.org/
* @link https://github.com/mandreoli/api-proxy-laravel
* @link https://github.com/thinkingmik/api-proxy-laravel
*/

namespace Andreoli\ApiProxy\Models;
namespace ThinKingMik\ApiProxy\Models;

class MixResponse {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

/**
* @package andreoli/api-proxy-laravel
* @package thinkingmik/api-proxy-laravel
* @author Michele Andreoli <michi.andreoli[at]gmail.com>
* @copyright Copyright (c) Michele Andreoli
* @license http://mit-license.org/
* @link https://github.com/mandreoli/api-proxy-laravel
* @link https://github.com/thinkingmik/api-proxy-laravel
*/

namespace Andreoli\ApiProxy\Models;
namespace ThinKingMik\ApiProxy\Models;

class ProxyResponse {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<?php

/**
* @package andreoli/api-proxy-laravel
* @package thinkingmik/api-proxy-laravel
* @author Michele Andreoli <michi.andreoli[at]gmail.com>
* @copyright Copyright (c) Michele Andreoli
* @license http://mit-license.org/
* @link https://github.com/mandreoli/api-proxy-laravel
* @link https://github.com/thinkingmik/api-proxy-laravel
*/

namespace Andreoli\ApiProxy;
namespace ThinKingMik\ApiProxy;

use Andreoli\ApiProxy\Exceptions\CookieExpiredException;
use Andreoli\ApiProxy\Exceptions\ProxyMissingParamException;
use Andreoli\ApiProxy\Managers\CookieManager;
use Andreoli\ApiProxy\Managers\RequestManager;
use ThinKingMik\ApiProxy\Exceptions\CookieExpiredException;
use ThinKingMik\ApiProxy\Exceptions\ProxyMissingParamException;
use ThinKingMik\ApiProxy\Managers\CookieManager;
use ThinKingMik\ApiProxy\Managers\RequestManager;
use Illuminate\Http\Response;

class Proxy {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

/**
* @package andreoli/api-proxy-laravel
* @package thinkingmik/api-proxy-laravel
* @author Michele Andreoli <michi.andreoli[at]gmail.com>
* @copyright Copyright (c) Michele Andreoli
* @license http://mit-license.org/
* @link https://github.com/mandreoli/api-proxy-laravel
* @link https://github.com/thinkingmik/api-proxy-laravel
*/

namespace Andreoli\ApiProxy;
namespace ThinKingMik\ApiProxy;

class ProxyAux {

Expand Down
6 changes: 3 additions & 3 deletions src/config/proxy.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

/**
* @package andreoli/api-proxy-laravel
* @package thinkingmik/api-proxy-laravel
* @author Michele Andreoli <michi.andreoli[at]gmail.com>
* @copyright Copyright (c) Michele Andreoli
* @license http://mit-license.org/
* @link https://github.com/mandreoli/api-proxy-laravel
* @link https://github.com/thinkingmik/api-proxy-laravel
*/

return [
Expand Down Expand Up @@ -54,7 +54,7 @@
*/
'cookie_info' => [
'name' => 'proxify',
'time' => 5
'time' => 1
],

/*
Expand Down
4 changes: 2 additions & 2 deletions src/lang/en/messages.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

/**
* @package andreoli/api-proxy-laravel
* @package thinkingmik/api-proxy-laravel
* @author Michele Andreoli <michi.andreoli[at]gmail.com>
* @copyright Copyright (c) Michele Andreoli
* @license http://mit-license.org/
* @link https://github.com/mandreoli/api-proxy-laravel
* @link https://github.com/thinkingmik/api-proxy-laravel
*/

return array(
Expand Down
Loading