Google Data API 入門 —— Picasa 二次開發類 完全開源

來源:互聯網
上載者:User

上一篇文章,我簡單說了下google的驗證過程,於是自己小練了一下,把picasa提供的API二次打包,變得更加容易使用了。

廢話不說了,下載網頁如下:

 

我使用了Google Code提供的開源共用平台。希望大家給出建議,我測試了一下,挺爽的,希望能夠有協助。

測試代碼如下:

 

using System;
using System.Collections.Generic;
using System.Text;

namespace Pixysoft.Google
{
    class TestDriven
    {
        public void TestPicasa()
        {
            string username = "youremail@gmail.com";
            string password = "yourpassword";

            Picasa picasa = new Picasa(username, password);
            PicasaAlbum album = picasa.CreateAlbum("demo album");
            PicasaPhoto photo = album.CreatePhoto("yourjpg.jpg", System.IO.File.ReadAllBytes(@"c:\yourjpg.jpg"));
            PicasaTag tag = photo.AddTag("yourtag");

            Console.WriteLine(album.Title);
            Console.WriteLine(photo.PhotoTitle);
            Console.WriteLine(photo.ContentUrl);
            Console.WriteLine(tag.Title);
        }
    }
}

 

如果有問題,歡迎大家指出。也希望大家來參觀一下我的網站:http://www.citi-box.com/,小弟正在創業中。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.