gengo / gengo-php Goto Github PK
View Code? Open in Web Editor NEWA PHP library to interface with the Gengo API for translation.
Home Page: http://gengo.com/api/
License: BSD 3-Clause "New" or "Revised" License
A PHP library to interface with the Gengo API for translation.
Home Page: http://gengo.com/api/
License: BSD 3-Clause "New" or "Revised" License
count
in getJobs
method is not working the problem is the parameters is adding into the data
parameter and encode it to json$jobClient = new Gengo\Jobs();
$jobClient->getJobs('approved', null, 11);
# actual result
# v2/translate/jobs?api_key=api_key&api_sig=api_sig&ts=ts&data={'status':'approved', count:11}
$jobClient = new Gengo\Jobs();
$jobClient->getJobs('approved', null, 11);
# expected result
# v2/translate/jobs?api_key=api_key&api_sig=api_sig&ts=ts&status=approved&count=11
I sent rating parameter when calling approve API, but it not work. I check the code and found that the parameter must be 'rating_quality'.
getLanguagePairs()
getLanguagePairs('en')
getLanguagePairs('ja')
βAll the same response.
Is this a bug of API?
Specifying source language when fetching language pair no longer needs to be embedded inside a data
parameter.
so getLanguagePairs
in Service
needs to be just the following to work:
public function getLanguagePairs($lcsrc = null)
{
$params = ($lcsrc !== null) ? array('lc_src' => $lcsrc) : array();
return $this->storeResponse(Client::get('v2/translate/service/language_pairs', $params));
} //end getLanguagePairs()
At least for the sandbox anyway.
I think its time we support PHP7
As the Zend
library is primarily used to make HTTP requests it would be beneficial for gengo-php
code base to use Requests which is a more lightweight but equally powerful library to make HTTP requests.
When using this client I end up with error {"opstat":"error","err":{"code":1800,"msg":""jobs" is a required field"}}
Since this field is supposed to be filled from within the client I assume this client is no longer operational. And/or doesn't work on newer version of PHP.
Have raised a support ticket for this as well but they don't even understand what I am talking about; they consistently refer me to the REST API documentation; even when explicitly (three times) telling them I'm using the PHP client.
Plain mention in require section of gengo/gengo does not help much to load the classes on demand. Package's composer.json missing the following statement:
"autoload": {
"classmap": ["libs/Gengo", "libs/Gengo/Api"]
}
Without it call to Gengo_Api fails with class not found error.
Of course PSR-4 would be better if this package would use namespaces.
There are no namespaces present in any of the class which is a great drawback for the frameworks which use PSR standards for autoloading.
Wouldn't it be great to have PSR compliant namespaces in the project?
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.