"strconv" "strings" "time" "github.com/attic-labs/noms/clients/util" "github.com/attic-labs/noms/d" "github.com/attic-labs/noms/dataset" "github.com/attic-labs/noms/util/http/retry" "github.com/bradfitz/latlong" "github.com/garyburd/go-oauth/oauth" ) var ( clientIdFlag = flag.String("client-id", "", "API keys for flickr can be created at https://www.flickr.com/services/apps/create/apply") clientSecretFlag = flag.String("client-secret", "", "API keys for flickr can be created at https://www.flickr.com/services/apps/create/apply") clientFlags = util.NewFlags() ds *dataset.Dataset httpClient *http.Client oauthClient oauth.Client tokenFlag = flag.String("token", "", "OAuth1 token (if ommitted, flickr will attempt web auth)") tokenSecretFlag = flag.String("token-secret", "", "OAuth1 token secret (if ommitted, flickr will attempt web auth)") user User ) type progressTracker struct { didLogin bool didGetList bool numPhotos, photoProgress int } func (pt *progressTracker) Update() {
"os" "time" "github.com/attic-labs/noms/clients/util" "github.com/attic-labs/noms/d" "github.com/attic-labs/noms/dataset" "github.com/attic-labs/noms/util/http/retry" "golang.org/x/oauth2" ) const facebookAPI = "https://graph.facebook.com/" var ( authHTTPClient *http.Client cachingHTTPClient *http.Client clientFlags = util.NewFlags() // TODO: respect Concurrency() ds *dataset.Dataset start time.Time tokenFlag = flag.String("token", "", "Facebook auth token (required) - see usage for instructions") ) func main() { flag.Usage = usage flag.Parse() cachingHTTPClient = util.CachingHttpClient() if *tokenFlag == "" || cachingHTTPClient == nil { flag.Usage() return }