opencoconut / coconutphp Goto Github PK
View Code? Open in Web Editor NEWPHP client Library for encoding Videos with Coconut
Home Page: https://coconut.co
PHP client Library for encoding Videos with Coconut
Home Page: https://coconut.co
I think you should make a Config class for parameter management that you could extend with an ArrayAccess to have a pseudo toArray().
Then you should put the equivalent of your http client in PSR-7 and PSR-18 so that the implementations / tests etc... are much simpler.
Do you know what I mean?
https://github.com/opencoconut/coconutphp/blob/master/src/Client.php#L14
Currently API error codes are included as string at the end of the \Coconut\Error::message
property. It would be more convenient to add an api_error_code
property on the exception class, so it can easily be inspected to the php code using this library and each error can be handled differently if needed.
Creation of dynamic property Coconut\Client::$metadata is deprecated in /www/html/vendor/opencoconut/coconut/src/Client.php on line 31
code:
Lines 29 to 31 in 1491bab
The coconut API returns a 403 HTTP status code when the usage limit is exceeded. This throws a genericCoconut\Error
, which does not provide much information to the php code using this library.
Ideally, the error message and error code would be part of the exception thrown so it can be displayed to the end user, or the exception can be handled differently (for example: retrying the API call after a delay?).
Unfortunately this does not autoload under composer
$job = Coconut_Job::create($config);
Just comes back with cant find class Coconut_Job
Suggest putting the two classes in separate files and perhaps name space them
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.