2017 © Pedro PelĂĄez
 

library auto-client

A command-line tool to generate Javascript client-side APIs from REST PHP APIs

image

php-gear/auto-client

A command-line tool to generate Javascript client-side APIs from REST PHP APIs

  • Monday, June 18, 2018
  • by claudio-silva
  • Repository
  • 1 Watchers
  • 0 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 175 % Grown

The README.md

Auto Client

A command-line tool to generate Javascript client-side APIs from REST PHP APIs

Introduction

This package provides a command-line tool for use either with the Laravel framework (as an Artisan command) or with the Electro framework (as a Workman command)., (*1)

TO DO: provide an explanation of the rationale behind this library and some usage examples., (*2)

Note: currently, this tool generates code for use with AngularJS 1.x, and it expects an Angular service called remote of type RemoteService., (*3)

<, (*4)

p>This requirement is temporary and it will be removed on a later version of this tool., (*5)

Documentation

Additional documentation will be written, as soon as I find the time for it., (*6)

Installation

Runtime requirements

  • PHP >= 7.0
  • AngularJS 1.x
Optionally, one of
  • Laravel >= 4.2
  • Electro >= 1.0

Installing on Laravel

On the command-line, type:, (*7)

composer require php-gear/auto-client

Register the Artisan command on artisan.php:, (*8)

Artisan::resolve (PhpGear\AutoClient\Laravel\AutoClientCommand::class);

Installing on Electro

workman install php-gear/auto-client

Usage

On Laravel

Configuring

On config/app.php, define the APIs to be exported to Javascript., (*9)

Example:, (*10)

return [
  'autoclient' => [
    'APIs' => [
      // Endpoint URL => [controller class, target directory, Angular module name] 
      'API/something' => [SomethingController::class, 'App/remote', 'App'],
    ],
  ],
  ///... the rest of the existing file
];

Running the generator

artisan autoclient:generate

On Electro

Running the generator

workman autoclient:generate

License

This library is open-source software licensed under the MIT license., (*11)

See the accompanying LICENSE file., (*12)

Copyright © 2018 Clåudio Silva, (*13)

The Versions

18/06 2018

dev-master

9999999-dev https://github.com/php-gear/auto-client

A command-line tool to generate Javascript client-side APIs from REST PHP APIs

  Sources   Download

MIT

The Requires

  • php >=7

 

by ClĂĄudio Silva

plugin electro

18/06 2018

1.0.5

1.0.5.0 https://github.com/php-gear/auto-client

A command-line tool to generate Javascript client-side APIs from REST PHP APIs

  Sources   Download

MIT

The Requires

  • php >=7

 

by ClĂĄudio Silva

plugin electro

29/05 2018

1.0.1

1.0.1.0 https://github.com/php-gear/auto-client

A command-line tool to generate Javascript client-side APIs from REST PHP APIs

  Sources   Download

MIT

The Requires

  • php >=7

 

by ClĂĄudio Silva

plugin electro

24/05 2018

1.0.0

1.0.0.0 https://github.com/php-gear/auto-client

A command-line tool to generate Javascript client-side APIs from REST PHP APIs

  Sources   Download

MIT

The Requires

  • php >=7

 

by ClĂĄudio Silva

plugin electro