cloudinary / cloudinary_java

Cloudinary Java Client Library
MIT License
161 stars 111 forks source link

Admin Api #18

Closed pawelByszewski closed 9 years ago

pawelByszewski commented 9 years ago

Hello,

in ApiStrategy, the call method still contains throw new Exception("not implemented");

Are you going to provide this feature?

tocker commented 9 years ago

Administration API is not supported for android clients, as it is not intended to be consumed by end-users. We will change the exception message to reflect this.

Were you trying to implement any specific use case?

pawelByszewski commented 9 years ago

i want to create app that will show gallery with all images but SDk does not support listing. I have already wrote custom rest service to handle that but it make my code a little bit messy

tocker commented 9 years ago

Depending on your requirements, you can either setup a backend to maintain the photo information and provide api to the android app, or utilize the JSON listing URL: http://res.cloudinary.com/<your\_cloud\_name>/image/list/<tag>.json which lists resource by a specific tag. Keep in mind however that this is a cached list that can be up to 1 hour behind the live data.

pawelByszewski commented 9 years ago

I would like to use Cloudinary as fast backend to my 'proof of concept' project so if listing is available via REST it would be nice to have everytnig in ons SDK. By the way, why there are methods in SDK that would never has implementation?

tocker commented 9 years ago

The "not implemented" exception message is imprecise. It should actually say that it is not applicable for mobile applications. The message will be updated in the next release.

All Java API implementations (Android, HTTP42, and taglib) share the same structure, but some methods are not intended to be used in a client environment for security reasons (as they require the API secret key).

For your POC you can borrow the code from the HTTP42 implementation of APIStrategy - just remember it requires your API Secret, so be carefull whom you share the app or its code with.

Alternatively you can implement a simple Rails app (see Rails Samples) and connect your android app to the Rails REST API. Of course the same can be done with other platforms such as PHP if you're more comfortable there :smile:.

tocker commented 9 years ago

Closing this issue.

Please feel free to reopen or create a new ticket if you have any additional issues.