wcatron / ionic-cloud-sdk-php

Ionic Cloud SDK for PHP
MIT License
2 stars 2 forks source link

Restructure API constructor #6

Closed wcatron closed 8 years ago

wcatron commented 8 years ago

Don't do file I/O in constructors. The API should take a list of routes as an "optional" constructor argument. original comment

The routes probably need a separate parser. Someone has to know about the actual json file. Currently the only API instance is created in the Command class (every time it's evoked, which is a separate issue). Command does not make sense to offer up the api configuration file. That should probably be handled by the clients as each Client could offer their own API. Limiting the number of routes to initial each time.

wcatron commented 8 years ago

Completed a simple API interface, RouteParser Interace that will handle complexities and improvements inside and work well now.