Third Light Developer Exchange

Code and templating community forum for developers and software integrators

You are not logged in.

Announcement

If you wish to join the Developer Exchange, please contact your account manager - this is to avoid unnecessary spam in the forums. Many thanks for your understanding.

#1 2017-11-30 15:43:40

ajpinto
Member
Registered: 2017-11-30
Posts: 11

Setting up PHP client/API reference

Hi All,
I am setting up the PHP client on a dev server to build some viewing functionality on Wordpress site. I'm looking for a reference listing available commands and methods, but haven't been able to locate one. Could someone point me in the right direction?
Thanks!

Offline

#2 2017-11-30 15:56:24

ben
Third Light Staff
From: Third Light
Registered: 2013-06-06
Posts: 66

Re: Setting up PHP client/API reference

Hi,
The API reference is available under the Help menu of an IMS site - you would need to be an administrator to see it, or have had the API Reference enabled on your user account.

Best wishes,
Ben

Offline

#3 2017-11-30 16:04:00

ajpinto
Member
Registered: 2017-11-30
Posts: 11

Re: Setting up PHP client/API reference

Hi Ben,
I just want to make sure I'm comprehending correctly.

If I'm using the PHP client and I want to list all top level folders, I would do this:

$myIMSClient->Folders.GetTopLevelFolders();

Correct?

Offline

#4 2017-11-30 16:23:15

ben
Third Light Staff
From: Third Light
Registered: 2013-06-06
Posts: 66

Re: Setting up PHP client/API reference

Ah, well that's the right API method call but not the right syntax for PHP. We use "Module.Method" notation just as a shorthand to indicate the module and method but it doesn't indicate proper syntax for any particular client.

The calling syntax will depend on the client. As it happens the client inside the Drupal plugin uses a very similar calling syntax to what you suggested. This should work:

$myIMSClient->Folders_GetTopLevelFolders();

Ben

Offline

#5 2017-12-02 20:49:49

ajpinto
Member
Registered: 2017-11-30
Posts: 11

Re: Setting up PHP client/API reference

Thanks!  How would i go about listing all files in a folder? I can't seem to locate a method for this in the API reference.

Last edited by ajpinto (2017-12-02 21:14:54)

Offline

#6 2017-12-02 21:27:01

ajpinto
Member
Registered: 2017-11-30
Posts: 11

Re: Setting up PHP client/API reference

Also, it would be very helpful if the API ref was searchable!

Offline

#7 2017-12-05 10:54:24

ben
Third Light Staff
From: Third Light
Registered: 2013-06-06
Posts: 66

Re: Setting up PHP client/API reference

Hi,
You want Files.GetAssetsForParent(...) and possibly also Folders.GetContainersForParent(...)
Ben

Offline

Board footer