If an importer is efficient at running regularly, it returns true.
If it's not true, the UI won't allow turning on automatic runs.
Flickr doesn't set it (yet).
The ExtendedOAuth2 code tried to be generic, but wasn't (had Picasa
comments?) and was only used by Picasa anyway. We can move it later
if there are actually 2 users and it works for both.
At the same time, make Picasa actually work by writing a correct
IsAccountReady function.
A more complete version of Aaron Boodman's
https://camlistore-review.googlesource.com/#/c/3066/
in removing Transports. As Aaron pointed out,
(https://groups.google.com/d/msg/camlistore/9OwQKH6z7rY/840oQrRgsGIJ) it
is illegal for oauth.Transport.Transport to ever be another instance of
oauth.Transport.
So this commit tries hard to use Context's HTTPClient
everywhere and make sure to have its Transport an *oauth.Transport, but
that's Transport is not an *oauth.Transport, but the underlying
Transport.
To eliminate "403: Token not found" errors, we set
oauth.Config.AccessType, oauth.Config.ApprovalPrompt to
"offline", "force".
This rewards us with a non-empty Token.RefreshToken,
and store the full Token in AcctAttrOAuthToken.
This enables us to import continuously without user intervention.
Change-Id: I4defb346abfcf3f6c17597fc2dc23a6e536eda37
Instead, require specifying it when constructing a new context.
Prevents misuse and bugs / data races.
Change-Id: I775e998bf69b9e238ec726c469494c1a65f8f9de
-album: removed Name attribute. It seems like a valid entry from the feed
(picago indeed gets value), but it is not referenced anywhere in
https://developers.google.com/picasa-web/docs/2.0/reference and it seems
to have the same value as Title anyway.
-photo: removed broken (and redundant with camliContent if not broken)
camliPath.
-s/ID/picasaId/
Change-Id: I5389d825eae83b7618f282698a43c94be6ca8df3
And revert context-related changes to importer.go so the other
importers work again.
The problem is picago calls take an *http.Client, so we need to provide
one which already has a transport set up correctly wrt to authentication.
In particular, it needs to have the access token that was obtained
during oauth.
Change-Id: I7b83cd80910111a9abf1c192cc59841f6d818fb7
Reorganizes common OAuth2 things into importer/oa2_importers.go
Rewrites CallbackURLParameters to return url.Values.
A controversial workaround for nil context has been left out,
and this may cause panic and will need a proper fix.
Change-Id: I0789f4732412aa559078ec2c6b6797925ab8cd05
Imports all images from all albums, and puts each image in its album.
Each album is linked under "Picasa (<username>)".
Tries to skip already imported files (check based on album/filename).
See Issue #391.
Change-Id: If00751671a429891c05bbe41f59c1421b2ff2de8