public void Test()
        {
            RequestSettings settings = new RequestSettings("yourApp");
            settings.PageSize = 50000;
            settings.AutoPaging = true;
            
            PicasaRequest pr = new PicasaRequest(settings);
            pr.Service = GetPicasaService();
            Feed<Photo> feed = pr.GetPhotos();
            
            int cnt = 0;

            Photo x = null;

            foreach (Photo p in feed.Entries)
            {
                if (p.Title.ToLower() == "2005-12-16Kovalev_Zachet.avi".ToLower())
                {
                    x = p;
                    break;
                }
                cnt++;
            }
            var longTime = (DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalMilliseconds;

            x.Timestamp = Convert.ToUInt64(longTime);


            pr.Update(x);
            

            Console.WriteLine(cnt);
        }
Exemple #2
0
        public PicasaWrapper(SessionProvider sessionProvider)
        {
            var oauth2ParametersStorage = OAuth2ParametersStorageFactory.StorageDatabase(sessionProvider);
            //var gdataAuth = new GoogleDataOAuth2Service(OAuth2ParametersStorageFactory.StorageJsonFile(ApplicationId));
            var gdataAuth = new GoogleDataOAuth2Service(oauth2ParametersStorage);
            var picasaFactory = new PicasaServiceFactory(gdataAuth.GetRequestDataFactoryInstance("https://picasaweb.google.com/data"));
            Service = picasaFactory.GetService();

            Settings = new SettingsLoader<List<GdataPhotosSettings>>(sessionProvider, "GdataPhotosSettings_List.json").Get();

            PicasaRequest = new PicasaRequest(new RequestSettings("x", gdataAuth.GetValidOAuth2Parameters()));
        }