Git Product home page Git Product logo

gengo-php's People

Contributors

alexlide avatar earlsunaz avatar hayate avatar hermanschaaf avatar marexandre avatar mervinsanandres avatar mromaine avatar narusemotoki avatar ninotoshi avatar r-miezhelis avatar ryvasquez avatar shawnps avatar shivamdixit avatar slamice avatar vbashkirtsev avatar yugui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gengo-php's Issues

Using count in getJobs not working

Description

  • Using count in getJobs method is not working the problem is the parameters is adding into the data parameter and encode it to json

Actual result

$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}

Expected Result

$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

getLanguagePairs() is bug

getLanguagePairs()
getLanguagePairs('en')
getLanguagePairs('ja')

↑All the same response.
Is this a bug of API?

Filter Source Language

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.

Replace Zend with Requests

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.

Client is not working and support doesn't even know it exists

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.

autoload statement missing from composer.json

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.

Namespaces missing

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.