Quantcast
Channel: Kaltura - Latest posts
Viewing all articles
Browse latest Browse all 7410

Java Example Code doesn't match API Download

$
0
0

I was able to get it working, my endpoint was kaltura.com not www.kaltura.com so hence the redirect (my mistake). It would be great if the console worked to generate code that was close to the API but it doesn't.

Suggested code (removed variables with details and variables generated not needed)
KalturaConfiguration config = new KalturaConfiguration();
config.setPartnerId(partnerId);
config.setEndpoint("https://www.kaltura.com/");
KalturaClient client = new KalturaClient(config);
Object result = client.getUserService().loginbyloginid(loginId, password, partnerId, expiry, privileges);

Correct Code
KalturaConfiguration config = new KalturaConfiguration();
config.setEndpoint("https://www.kaltura.com");
KalturaClient client = new KalturaClient(config);
String session = client.getUserService().loginByLoginId(userid, password, partnerId);

Most of the generated lines are not declared in right order, have wrong return types (or declares a variable for an assignment, and have wrong number of parameters.

The test console generated code is a great idea, but honestly a dozen well documented code examples with the API docs would be more useful for me. Thanks for providing the working code example, that helped me get things working.


Viewing all articles
Browse latest Browse all 7410

Trending Articles