Edward Q. Bridges
Edward Q. Bridges

Reputation: 18340

choosing authentication to google api in batch application

In reviewing my options for authenticating against the Google Data API (using the Picasa Web Albums), I'm provided the options noted here: http://code.google.com/apis/accounts/docs/GettingStarted.html

However, the application I'm working with is a batch application (bulk upload of photos), and these all seem geared toward applications with user-interactions (i.e. it seems they're restricted to obtaining a user's password via a redirect to a web page).

As well, after multiple uploads the server API prompts for a captcha confirmation, and blocks further upload until that is obtained.

Am I simply running up against imposed restrictions to protect their bandwidth?

Update

Here's the code that is doing the insert; a new instance of com.google.gdata.client.photos.PicasawebService is created for each worker thread. The pool of worker threads is constrained to about 10-20 threads, and each thread is assigned to upload a single image (or create an album):

    PicasawebService service = new PicasawebService(Constants.APPLICATION_AGENT);
    try {
        service.setUserCredentials(
            credentials.username(),
            credentials.password()
        );
    } catch (com.google.gdata.util.AuthenticationException e) {
        throw new AuthenticationException(e);
    }

Upvotes: 1

Views: 220

Answers (1)

bpgergo
bpgergo

Reputation: 16037

Have you tried this? http://code.google.com/apis/gdata/docs/batch.html#Batch_API

Upvotes: 1

Related Questions