'GooglePicasa'에 해당되는 글 4건
- 2008/10/07 [Picasa with C#] 사진 등록하기. 写真を登録する。
- 2008/09/28 [Picasa with C#] 앨범 등록하기
- 2008/09/28 [Picasa with C#] Album List의 페이징 방법
- 2008/07/01 [Picasa with C#] Picasa기본 코드
Uri postUri = new Uri(PicasaQuery.CreatePicasaUri(username, albumname));
PicasaEntry entry = (PicasaEntry)GetPicasaService().Insert(postUri, file.InputStream, "image/jpeg", file.FileName);
entry.Summary.Text = summary;
entry.Update();
'GooglePicasa' 카테고리의 다른 글
| [Picasa with C#] 사진 등록하기. 写真を登録する。 (0) | 2008/10/07 |
|---|---|
| [Picasa with C#] 앨범 등록하기 (0) | 2008/09/28 |
| [Picasa with C#] Album List의 페이징 방법 (0) | 2008/09/28 |
| [Picasa with C#] Picasa기본 코드 (0) | 2008/07/01 |
double timestamp = ConvertToUnixTimestamp(DateTime.Parse("2008/09/10" + DateTime.Now.ToString(" HH:mm")).ToUniversalTime()); //ConvertToUnixTimestamp에 대한 설명은 아래를 참조
AlbumEntry newEntry = new AlbumEntry();
newEntry.Title.Text = "Title";
newEntry.Summary.Text = "Comment";
newEntry.setPhotoExtension(GPhotoNameTable.Access, "public"); //private은 비공개
newEntry.setPhotoExtension(GPhotoNameTable.Timestamp, timestamp.ToString()); //앨범날짜를 설정
Uri feedUri = new Uri(PicasaUtil.GetPicasaDefaultUri()); //앨범 등록을 위한 쿼리를 취득
PicasaEntry createdEntry = (PicasaEntry)service.Insert(feedUri, newEntry); //등록
static double ConvertToUnixTimestamp(DateTime date)
{
DateTime origin = new DateTime(1970, 1, 1, 0, 0, 0, 0);
TimeSpan diff = date - origin;
return Math.Floor(diff.TotalMilliseconds);
}
'GooglePicasa' 카테고리의 다른 글
| [Picasa with C#] 사진 등록하기. 写真を登録する。 (0) | 2008/10/07 |
|---|---|
| [Picasa with C#] 앨범 등록하기 (0) | 2008/09/28 |
| [Picasa with C#] Album List의 페이징 방법 (0) | 2008/09/28 |
| [Picasa with C#] Picasa기본 코드 (0) | 2008/07/01 |
AlbumQuery query = PicasaUtil.GetPicasaAlbumQuery();
query.NumberToRetrieve = albumperpage; //페이당 표시 앨범수 설정
PicasaFeed feed = service.Query(query); //리스트 취득
if (feed.NextChunk != "")
NextPageUrl = feed.NextChunk; //다음페이지의 uri를 보존
if (feed.PrevChunk != "")
PrevPageUrl = feed.PrevChunk; //이전페이지의 uri를 보존
//두번째 페이지를 가져옴
AlbumQuery query = PicasaUtil.GetPicasaAlbumQuery();
query.Uri = new Uri(NextPageUrl); //불러올 페이지의 uri를 설정
query.NumberToRetrieve = albumperpage; //페이당 표시 앨범수 설정
PicasaFeed feed = service.Query(query); //리스트 취득
'GooglePicasa' 카테고리의 다른 글
| [Picasa with C#] 사진 등록하기. 写真を登録する。 (0) | 2008/10/07 |
|---|---|
| [Picasa with C#] 앨범 등록하기 (0) | 2008/09/28 |
| [Picasa with C#] Album List의 페이징 방법 (0) | 2008/09/28 |
| [Picasa with C#] Picasa기본 코드 (0) | 2008/07/01 |
개발에 필요한 컴퍼넌트
http://code.google.com/p/google-gdata/downloads/list
API레퍼런스
http://code.google.com/intl/ja/apis/picasaweb/developers_guide_dotnet.html
기본적인 공통 메서드 모음.
/// PicasaService오브젝트를 취득.
/// </summary>
/// <returns></returns>
public static PicasaService GetPicasaService(string username, string password)
{
PicasaService rtn = new PicasaService("PhotoBrowser");
rtn.setUserCredentials(username, password); //ID,패스워드를 설정
return rtn;
}
/// <summary>
/// 앨범리스트를 취득하기위한 쿼리오브젝트 취득.アルバム一覧取得のクエリを取得
/// </summary>
/// <returns></returns>
public static AlbumQuery GetPicasaAlbumQuery()
{
return new AlbumQuery(PicasaQuery.CreatePicasaUri(username));
}
/// <summary>
/// 앨범내의 사진 리스트를 취득하기위한 쿼리오브젝트 취득. アルバム内の写真取得のクエリを取得
/// </summary>
/// <param name="albumname"></param>
/// <returns></returns>
public static PhotoQuery GetPicasaPhotoQuery(string albumname)
{
return new PhotoQuery(PicasaQuery.CreatePicasaUri(username, albumname));
}
'GooglePicasa' 카테고리의 다른 글
| [Picasa with C#] 사진 등록하기. 写真を登録する。 (0) | 2008/10/07 |
|---|---|
| [Picasa with C#] 앨범 등록하기 (0) | 2008/09/28 |
| [Picasa with C#] Album List의 페이징 방법 (0) | 2008/09/28 |
| [Picasa with C#] Picasa기본 코드 (0) | 2008/07/01 |
![]() |
![]() |
|
![]() |
![]() |
![]() |


Prev





Rss Feed