Smartling / api-sdk-php

SDK for integrating with the Smartling API. The Smartling API allows developers to upload language specific resource files and download the translations of those files for easy integration within their application. http://docs.smartling.com
Apache License 2.0
6 stars 15 forks source link

I cannot set URL in SmartlingAPI class #1

Closed dimitrystd closed 10 years ago

dimitrystd commented 10 years ago

I reviewed samples and didn't find place where i can send API URL. For example it want to use PROD or STG URL. DoD: SmartlingAPI constructor should support one more optional parameter for API URL. If parameter is not specified, then use sandbox URL.

Note: Look at ruby implementation

enegron-sl commented 10 years ago

I'm not sure if the public SDKS should mention stg at all. That is for internal / Smartling use only.

Thanks, Eric

On Oct 15, 2013, at 6:18 AM, Dmitriy Studinskiy wrote:

I reviewed samples and didn't find place where i can send API URL. For example it want to use PROD or STG URL. DoD: SmartlingAPI constructor should support one more optional parameter for API URL. If parameter is not specified, then use sandbox URL.

Note: Look at ruby implementation

— Reply to this email directly or view it on GitHub.

dimitrystd commented 10 years ago

I described following cases:

$api = new SmartlingAPI($apiKey, $projectId);
$result = $api->uploadFile($filePath, $fileType, $fileUri);
$api = new SmartlingAPI($apiKey, $projectId, 'https://api.smartling.com');
$result = $api->uploadFile($filePath, $fileType, $fileUri);

But now i think that better to use some predefined enum like we have in ruby sdk

Mentioned of STG was just for examples. We should not add any URLs to source code

jones-smartling commented 10 years ago

I think a client should be able to switch to sandbox for testing but not Stg

Sent from my iPhone

On Oct 15, 2013, at 7:23 AM, enegron-sl notifications@github.com wrote:

I'm not sure if the public SDKS should mention stg at all. That is for internal / Smartling use only.

Thanks, Eric

On Oct 15, 2013, at 6:18 AM, Dmitriy Studinskiy wrote:

I reviewed samples and didn't find place where i can send API URL. For example it want to use PROD or STG URL. DoD: SmartlingAPI constructor should support one more optional parameter for API URL. If parameter is not specified, then use sandbox URL.

Note: Look at ruby implementation

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub.

IgorCrazySnail commented 10 years ago

if production mode is not set sandbox is used

dimitrystd commented 10 years ago

Closed