示例#1
0
文件: api_test.go 项目: olragon/dna
func ExampleGetAPIArtist() {
	_, err0 := GetAPIArtist(496741)
	if err0 == nil {
		panic("SongArtist id 496741 has to have an error")
	} else {
		if err0.Error() != "NCT - Artist ID:496741 not found" {
			panic("Wrong error message")
		}
	}
	artist, err := GetAPIArtist(49674)
	if err == nil {
		dna.LogStruct(artist)
	} else {
		dna.Log(err.Error())
	}
	if artist.Avatar != "" {
		artist.Avatar = "http://avatar.nct.nixcdn.com/singer/avatar/2013/12/16/7/f/f/7/1387176808800.jpg"
	}
	// Output:
	// Id : 49674
	// Name : "Đàm Vĩnh Hưng"
	// Avatar : "http://avatar.nct.nixcdn.com/singer/avatar/2014/13/7E4149A9_2.jpg"
	// NSongs : 0
	// NAlbums : 0
	// NVideos : 0
	// ObjType : "ARTIST"
}
示例#2
0
文件: album_test.go 项目: olragon/dna
func ExampleGetAlbum() {
	_, err := GetAlbum(84935)
	if err == nil {
		panic("Album has to have an error")
	} else {
		if err.Error() != "Keeng - Album ID: 84935 not found" {
			panic("Wrong error message! GOT: " + err.Error())
		}
	}
	album, err := GetAlbum(86694)
	dna.PanicError(err)
	album.Checktime = time.Date(2013, time.November, 21, 0, 0, 0, 0, time.UTC)
	if album.Plays < 36049 {
		panic("Wrong play")
	}
	if album.Coverart == "" {
		panic("WRong covert")
	}
	album.Coverart = "http://media3.keeng.vn:8082/medias/images/images_thumb/f_medias_6/album/image/2013/12/23/b6abfc53bcb1f5ecd1c7a2ee7f6f5292a79e12e2_103_103.jpg"
	album.Plays = 36049
	dna.LogStruct(album)
	// Output:
	// Id : 86694
	// Key : "09BYXAMW"
	// Title : "100 Hit Nhạc Việt 2013 (Part 1)"
	// Artists : dna.StringArray{"Mỹ Tâm", "Thu Minh", "The Men", "Hồ Quang Hiếu", "Khởi My", "Miu Lê", "Hồng Dương M4U", "Bảo Thy", "Noo Phước Thịnh", "Đông Nhi"}
	// Nsongs : 49
	// Plays : 36049
	// Coverart : "http://media3.keeng.vn:8082/medias/images/images_thumb/f_medias_6/album/image/2013/12/23/b6abfc53bcb1f5ecd1c7a2ee7f6f5292a79e12e2_103_103.jpg"
	// Description : ""
	// Songids : dna.IntArray{1771701, 1907293, 1922861, 1786476, 1764324, 1794339, 1944931, 1944729, 1759706, 1787817, 1944090, 1802630, 1907296, 1790298, 1771702, 1776165, 1779905, 1963988, 1962277, 1788903, 1965592, 1954418, 1790245, 1788955, 1963617, 1771761, 1965428, 1968399, 1966605, 1821302, 1787318, 1959758, 1747128, 1968036, 1760361, 1967779, 1794784, 1967780, 1919261, 1922843, 1965180, 1785077, 1958497, 1794641, 1966916, 1780127, 1773989, 1967851, 1958909}
	// DateCreated : "2013-12-23 00:00:00"
	// Checktime : "2013-11-21 00:00:00"
}
示例#3
0
文件: post_test.go 项目: olragon/dna
func ExampleGetAPIAlbum() {
	album, err := GetAPIAlbum(86682)

	if err == nil {
		if album.Plays < 44450 {
			panic("Plays has to be greater than 44450")
		}
		album.Plays = 44450
		for _, song := range album.SongList {
			song.Plays = 10129
		}
		var length = len(album.SongList)
		album.SongList = nil
		if album.Coverart == "" {
			panic("WRong covert")
		}
		album.Coverart = "http://media3.keeng.vn:8082/medias/images/images_thumb/f_medias_6/album/image/2014/01/10/27a4cdcbb7f60aa123529a49d76888708ec8872d_103_103.jpg"
		dna.LogStruct(album)
		dna.Log("Lenght :", length)
	} else {
		panic("Error has to be nil")
	}
	// Output:
	// Id : 86682
	// Title : "Chờ Hoài Giấc Mơ"
	// Artists : "Akio Lee ft Akira Phan"
	// Coverart : "http://media3.keeng.vn:8082/medias/images/images_thumb/f_medias_6/album/image/2014/01/10/27a4cdcbb7f60aa123529a49d76888708ec8872d_103_103.jpg"
	// Url : "http://keeng.vn/album/Cho-Hoai-Giac-Mo-Akio-Lee/2K2O4QG8.html"
	// Plays : 44450
	// SongList : []ke.APISong(nil)
	// Lenght : 5

}
示例#4
0
文件: post_test.go 项目: olragon/dna
func ExampleGetAPIArtistEntry() {
	apiArtistEntry, err := GetAPIArtistEntry(1394)
	if err == nil {
		if apiArtistEntry.Nsongs < 43 {
			panic("Nsongs has to be greater than 46 - GOT" + string(apiArtistEntry.Nsongs.ToString()))
		}
		if apiArtistEntry.Nalbums < 7 {
			panic("Nalbums has to be greater than 7")
		}
		if apiArtistEntry.Nvideos < 24 {
			panic("Nvideos has to be greater than 24")
		}
		if apiArtistEntry.Artist.Coverart == "" {
			panic("Artist.Coverart has not to be equal to empty")
		}
		apiArtistEntry.Nsongs = 46
		apiArtistEntry.Nalbums = 7
		apiArtistEntry.Nvideos = 24
		apiArtistEntry.Artist.Coverart = "http://media3.keeng.vn:8082/medias/images/images_thumb/f_medias_6/singer/2013/11/19/1226beceb5d049998976a08f822c0cc9037c0a32_103_103.jpg"
		dna.LogStruct(apiArtistEntry)
	} else {
		panic("Error has to be nil")
	}
	// Output:
	// Artist : ke.APIArtistProfile{Id:1394, Title:"Minh Hằng", Coverart:"http://media3.keeng.vn:8082/medias/images/images_thumb/f_medias_6/singer/2013/11/19/1226beceb5d049998976a08f822c0cc9037c0a32_103_103.jpg"}
	// Nsongs : 46
	// Nalbums : 7
	// Nvideos : 24
}
示例#5
0
文件: movie_test.go 项目: olragon/dna
func ExampleGetMovie() {
	movie, err := GetMovie(5561)
	dna.PanicError(err)
	movie.Checktime = time.Date(2013, time.November, 21, 0, 0, 0, 0, time.UTC)
	dna.LogStruct(movie)
	// Output:
	// Id : 5561
	// Title : "The Scandal - Sự Thật Nghiệt Ngã - Tập 36/36"
	// AnotherTitle : "The Scandal"
	// ForeignTitle : "The Scandal"
	// VnTitle : "Sự Thật Nghiệt Ngã"
	// Topics : dna.StringArray{"Hàn quốc", "Gia Đình", "Lãng Mạn"}
	// Actors : dna.StringArray{"Kim Jae Won", "Jung Yoon Suk", "Kim Hwi Soo"}
	// Directors : dna.StringArray{"Kim Jin Man", "Park Jae Bum"}
	// Countries : dna.StringArray{"Hàn Quốc"}
	// Description : "Bộ phim kể về câu chuyện của một cảnh sát hình sự (Kim Jae Won - Ha Eun Joong) tình cờ biết được sự thật, người cha của anh hiện tại thật ra là kẻ bắt cóc và chính ông đã bắt cóc anh lúc anh còn nhỏ. Cuộc sống của anh đã có nhiều thay đổi khi gặp gỡ người phụ nữ Woo Ah Mi (Jo Yoon Hee), một người mẹ đơn thân 26 tuổi. Kể từ giây phút ấy, anh bắt đầu hành trình hàn gắn nỗi đau trong trái tim mình cùng Woo Ah Mi."
	// YearReleased : 2013
	// IMDBRating : dna.IntArray{0, 0}
	// Similars : dna.IntArray{}
	// Thumbnail : "http://t.hdviet.com/thumbs/214x321/ca8507356775119a9f183e2abe95fe02.jpg"
	// MaxResolution : 720
	// IsSeries : true
	// SeasonId : 0
	// Seasons : dna.IntArray{}
	// Epid : 0
	// CurrentEps : 36
	// MaxEp : 36
	// Checktime : "2013-11-21 00:00:00"
}
示例#6
0
文件: post_test.go 项目: olragon/dna
func ExampleGetAPILyric() {
	lyric, err := GetAPILyric(1944090)
	if err == nil {
		dna.LogStruct(lyric)
	} else {
		// dna.Log(lyric)
		panic("Error has to be nil")
	}
	// Output:
	// Data : "<p>\r\n\t<strong>Em Sẽ Hạnh Phúc<br />\r\n\t</strong></p>\r\n<p>\r\n\t---</p>\r\n<p>\r\n\tNgười yêu ơi anh biết mình sai nên để cho em rời xa yêu dấu hôm qua hãy mang em đi thật xa</p>\r\n<p>\r\n\tDù anh biết năm tháng dần qua sẽ xóa đi bóng hình em trong trái tim anh</p>\r\n<p>\r\n\tRồi em sẽ hạnh phúc thôi!</p>\r\n<p>\r\n\tNhững khó khăn em mong anh biết dù rằng mình đã cách xa nhưng anh vẫn nhiều lo lắng</p>\r\n<p>\r\n\tNắm tay nhau qua bao tháng ngày để đến hôm nay lạc bước yêu dấu phai tàn</p>\r\n<p>\r\n\tNgày không em anh như mất lối, không em anh như chơi vơi</p>\r\n<p>\r\n\tKhông em bên anh không có ai kề môi</p>\r\n<p>\r\n\tSẽ bên nhau khi duyên đã lỡ trao nhau yêu thương đã vỡ</p>\r\n<p>\r\n\tChỉ vì yêu em anh sẽ chỉ yêu mình em</p>\r\n<p>\r\n\tNgười yêu ơi anh biết mình sai nên để cho em rời xa yêu dấu hôm qua hãy mang em đi thật xa</p>\r\n<p>\r\n\tDù anh biết năm tháng dần qua sẽ xóa đi bóng hình em trong trái tim anh</p>\r\n<p>\r\n\tRồi em sẽ hạnh phúc thôi!</p>\r\n<p>\r\n\t<em>Và sẽ có người thay thế anh trong giấc mơ</em></p>"
	// Status : 1
}
示例#7
0
文件: lyric_test.go 项目: olragon/dna
func ExampleGetLyric() {
	_, err := GetLyric(1972114)
	if err == nil {
		panic("Lyric has to have an error")
	} else {
		if err.Error() != "Keeng - Lyric ID: 1972114 not found" {
			panic("Wrong error message!")
		}
	}
	album, err := GetLyric(1966613)
	dna.PanicError(err)
	dna.LogStruct(album)
	// Output:
	// Id : 1966613
	// Content : "<p>\r\n\tNgày ấy ta yêu nhau,em đã biết mang thương đau<br />\r\n\tNhưng trái tim em lỡ yêu anh rồi<br />\r\n\tAnh chỉ muốn lấp khoảng trống trong lòng<br />\r\n\tNào có yêu thương em gì đâu.<br />\r\n\t<br />\r\n\tGiờ đây anh ra đi, không một câu chia ly<br />\r\n\tAnh chỉ xem em giống như nhân tình<br />\r\n\tKhông thể ở bên nhau suốt đời<br />\r\n\tChỉ tìm vui nhau trong phút giây.<br />\r\n\t<br />\r\n\tNgười yêu ơi, hãy nói em nghe<br />\r\n\tSao anh vô tình lặng thinh quay bước<br />\r\n\tNgười yêu ơi, phút chốc cô đơn bơ vơ<br />\r\n\tĐôi chân lạc loài về đâu?<br />\r\n\t<br />\r\n\t[ĐK:]<br />\r\n\tLòng em tự hỏi quá yếu mềm hay em đã yêu cuồng si<br />\r\n\tĐã trao cho anh tất cả tình yêu<br />\r\n\t<span style=\"font-size: 10%; line-height: 1px; color: #EEFFFF;\">Xin Một Lần Được Yêu (Ballad Version) lyrics on ChiaSeNhac.com</span><br />\r\n\tGiấc mơ đôi ta xây nơi thiên đường<br />\r\n\tGiờ mình em nghe mưa mang anh rời xa.<br />\r\n\t<br />\r\n\tNhiều khi muốn níu lấy tình, nhưng đã quá xa tầm tay<br />\r\n\tGió ơi hãy mang hết đi buồn đau<br />\r\n\tNếu em được quay về phút ban đầu<br />\r\n\tEm xin chấp nhận lấy thêm một niềm đau.</p>"
}
示例#8
0
文件: api_test.go 项目: olragon/dna
func ExampleGetAPISong() {
	_, err0 := GetAPISong(28760555)
	if err0 == nil {
		panic("Song id 28760555 has to have an error")
	} else {
		if err0.Error() != "NCT - Song ID:28760555 not found" {
			panic("Wrong error message")
		}
	}
	song, err := GetAPISong(2854574)
	if err == nil {
		if song.Likes < 277 || song.Plays < 416163 {
			panic("Cannot get song likes or plays")
		} else {
			song.Likes = 277
			song.Plays = 416163
		}
		if song.StreamUrl.Match(`\.mp3`) == false || song.Linkdown.Match(`\.mp3`) == false || song.LinkdownHQ.Match(`\.mp3`) == false {
			panic("Song link has to be mp3 format")
		} else {
			song.StreamUrl = "http://a.nixcdn.com/96e84c4eb0e143c6259c6ab2cb533c7a/52f83930/NhacCuaTui844/AnhBiet-HoQuangHieu-2854574.mp3"
			song.Linkdown = "http://download.a.nixcdn.com/96e84c4eb0e143c6259c6ab2cb533c7a/52f83930/NhacCuaTui844/AnhBiet-HoQuangHieu-2854574.mp3"
			song.LinkdownHQ = "http://download.a.nixcdn.com/5ee0ab8b469dc2c9cf9e93a98f46fa0b/52f83930/NhacCuaTui844/AnhBiet-HoQuangHieu-2854574_hq.mp3"
		}
		if song.Image != "" {
			song.Image = "http://avatar.nct.nixcdn.com/singer/avatar/2013/11/28/b/f/8/d/1385631181033.jpg"
		}
		dna.LogStruct(song)
	} else {
		dna.Log(err.Error())
	}
	// Output:
	// Id : 2854574
	// Key : "uUPvpEvU4CmH"
	// Title : "Anh Biết"
	// Artist : "Hồ Quang Hiếu"
	// Likes : 277
	// Plays : 416163
	// LinkShare : "http://www.nhaccuatui.com/bai-hat/anh-biet-ho-quang-hieu.uUPvpEvU4CmH.html"
	// StreamUrl : "http://a.nixcdn.com/96e84c4eb0e143c6259c6ab2cb533c7a/52f83930/NhacCuaTui844/AnhBiet-HoQuangHieu-2854574.mp3"
	// Image : "http://avatar.nct.nixcdn.com/singer/avatar/2013/11/28/b/f/8/d/1385631181033.jpg"
	// Coverart : ""
	// ObjType : "SONG"
	// Duration : 280
	// Linkdown : "http://download.a.nixcdn.com/96e84c4eb0e143c6259c6ab2cb533c7a/52f83930/NhacCuaTui844/AnhBiet-HoQuangHieu-2854574.mp3"
	// LinkdownHQ : "http://download.a.nixcdn.com/5ee0ab8b469dc2c9cf9e93a98f46fa0b/52f83930/NhacCuaTui844/AnhBiet-HoQuangHieu-2854574_hq.mp3"
}
示例#9
0
文件: api_test.go 项目: olragon/dna
func ExampleGetAPIAlbum() {
	_, err0 := GetAPIAlbum(28760555)
	if err0 == nil {
		panic("Album id 28760555 has to have an error")
	} else {
		if err0.Error() != "NCT - Album ID:28760555 not found" {
			panic("Wrong error message")
		}
	}
	album, err := GetAPIAlbum(12255234)
	if err == nil {
		if album.Likes < 128 || album.Plays < 320384 {
			panic("Cannot get album likes or plays")
		} else {
			album.Likes = 128
			album.Plays = 320384
		}
		if len(album.Listsong) != 3 {
			panic("Songs of the album has to have length equal to 3")
		} else {
			album.Listsong = []APISong{}
		}
		dna.LogStruct(album)
	} else {
		dna.Log(err.Error())
	}
	// Output:
	// Id : 12255234
	// Key : "nsnkteavOHbX"
	// Title : "Biết Trước Sẽ Không Mất Nhau (Single)"
	// Thumbnail : "http://avatar.nct.nixcdn.com/playlist/2013/11/28/4/e/9/b/1385644142690_300.jpg"
	// Coverart : "http://avatar.nct.nixcdn.com/playlist/2013/11/28/4/e/9/b/1385644142690_500.jpg"
	// Image : "http://avatar.nct.nixcdn.com/playlist/2013/11/28/4/e/9/b/1385644142690_300.jpg"
	// Artist : "Vĩnh Thuyên Kim, Hồ Quang Hiếu"
	// Likes : 128
	// Plays : 320384
	// Linkshare : "http://www.nhaccuatui.com/playlist/biet-truoc-se-khong-mat-nhau-single-vinh-thuyen-kim-ho-quang-hieu.nsnkteavOHbX.html"
	// Listsong : []nct.APISong{}
	// Description : "Sau sự kết hợp thành công cùng các nữ ca sĩ xinh đẹp trong thời gian gần đây như: Bảo Thy, Nhật Kim Anh, Lương Khánh Vy... Chàng hotboy Hồ Quang Hiếu có sự kết hợp mới cùng Vĩnh Thuyên Kim trong một sáng tác của Lê Chí Trung \"Biết Trước Sẽ Không Mất Nhau\"."
	// Genre : "Nhạc Trẻ"
	// ObjType : "PLAYLIST"
}
示例#10
0
文件: video_test.go 项目: olragon/dna
func ExampleGetVideo() {
	_, err := GetVideo(203952)
	if err == nil {
		panic("Video has to have an error")
	} else {
		if err.Error() != "Keeng - Video ID: 203952 not found" {
			panic("Wrong error message!")
		}
	}

	video, err := GetVideo(215236)
	dna.PanicError(err)
	video.Checktime = time.Date(2013, time.November, 21, 0, 0, 0, 0, time.UTC)
	if video.Plays < 6688 {
		panic("Wrong play")
	}
	if video.Thumbnail == "" {
		panic("WRong covert")
	}
	video.Plays = 6688

	video.Thumbnail = "http://media3.keeng.vn:8082/medias/images/images_thumb/f_medias_6/video/images/2013/12/24/e2d4ef038c1922a23d4f82b7d4c06972638e8753_147_83.jpg"
	dna.LogStruct(video)
	// Output:
	// Id : 215236
	// Key : "Y45E8EPS"
	// Title : "Ông Bà Già Noel"
	// Artists : dna.StringArray{"Kevin Sôcôla", "Thân Nhật Huy"}
	// Plays : 6688
	// ListenType : 0
	// Link : "http://media2.keeng.vn/medias/video/2013/12/24/bc2137b2029cccf185b657aa88fc1164f5d1d605_mp4_640_360.mp4"
	// IsDownload : 0
	// DownloadUrl : "http://media2.keeng.vn/medias/video/2013/12/24/bc2137b2029cccf185b657aa88fc1164f5d1d605.mp4"
	// RingbacktoneCode : ""
	// RingbacktonePrice : 0
	// Price : 0
	// Copyright : 0
	// CrbtId : 0
	// Thumbnail : "http://media3.keeng.vn:8082/medias/images/images_thumb/f_medias_6/video/images/2013/12/24/e2d4ef038c1922a23d4f82b7d4c06972638e8753_147_83.jpg"
	// DateCreated : "2013-12-24 00:00:00"
	// Checktime : "2013-11-21 00:00:00"
}
示例#11
0
文件: post_test.go 项目: olragon/dna
func ExampleGetAPIArtistVideos() {
	apiArtistVideos, err := GetAPIArtistVideos(1394, 1, 1)
	if err == nil {
		if len(apiArtistVideos.Data) != 1 {
			panic("Lenght of artist songs has to be one")
		}
		video := &apiArtistVideos.Data[0]
		if video.Plays == 0 {
			dna.Log("Plays has to be greater different from 0")
		}
		video.Plays = 1010
		switch {
		case video.Link == "", video.DownloadUrl == "", video.Url == "":
			panic("Wrong urls")
		}
		dna.LogStruct(video)
	} else {
		panic("Error has to be nil")
	}
}
示例#12
0
文件: api_test.go 项目: olragon/dna
func ExampleGetAPIVideo() {
	_, err0 := GetAPIVideo(28760555)
	if err0 == nil {
		panic("Video id 28760555 has to have an error")
	} else {
		if err0.Error() != "NCT - Video ID:28760555 not found" {
			panic("Wrong error message")
		}
	}
	video, err := GetAPIVideo(2876055)
	if err == nil {
		if video.Likes < 1474 || video.Plays < 556700 {
			panic("Cannot get video likes or plays")
		} else {
			video.Likes = 1474
			video.Plays = 556700
		}
		if video.StreamUrl.Match(`\.mp4`) == false {
			panic("Video link has to be mp4 format")
		} else {
			video.StreamUrl = "http://nplus.nixcdn.com/bd4aa514acf9173ca298424dce992639/52f83228/PreNCT7/GuiChoAnhPhan2-KhoiMy-2876055.mp4"
		}
		dna.LogStruct(video)
	} else {
		dna.Log(err.Error())
	}
	// Output:
	// Id : 2876055
	// Key : "N5QeESGm7ICBt"
	// Title : "Gửi Cho Anh (Phần 2)"
	// Thumbnail : "http://avatar.nct.nixcdn.com/mv/2013/12/10/e/0/5/3/1386640122904.jpg"
	// Image : "http://avatar.nct.nixcdn.com/mv/2013/12/10/e/0/5/3/1386640122904_536.jpg"
	// Artist : "Khởi My"
	// Time : "46:08"
	// Artistid : 12987
	// Likes : 1474
	// Plays : 556700
	// Linkshare : "http://www.nhaccuatui.com/video/gui-cho-anh-phan-2-khoi-my.N5QeESGm7ICBt.html"
	// StreamUrl : "http://nplus.nixcdn.com/bd4aa514acf9173ca298424dce992639/52f83228/PreNCT7/GuiChoAnhPhan2-KhoiMy-2876055.mp4"
	// ObjType : "VIDEO"
}
示例#13
0
func ExampleAPISongFreaksAlbum() {
	album, err := GetSongFreaksAlbum(48255)
	if err != nil {
		panic("error has to be nil")
	} else {
		dna.LogStruct(&album.Album)
	}
	// Output:
	// Id : 48255
	// AMG : 188401
	// UrlSlug : "vs-album-pearl-jam"
	// Year : 1993
	// Coverart : "http://www.lyricfind.com/images/amg/cov75/drd100/d126/d12660hp9k9.jpg"
	// CoverartLarge : "http://www.lyricfind.com/images/amg/cov200/drd100/d126/d12660hp9k9.jpg"
	// Title : "Vs."
	// Rating : sf.APIRating{AverageRating:0, UserRating:0, TotalRatings:0}
	// Artist : sf.APIArtist{Id:2472, AMG:5118, UrlSlug:"pearl-jam", Image:"http://www.lyricfind.com/images/amg/pic200/drq100/q105/q10500oytxe.jpg", Genres:"Rock", Name:"Pearl Jam", Link:"http://www.songfreaks.com/pearl-jam", Rating:sf.APIRating{AverageRating:0, UserRating:0, TotalRatings:0}, Bio:sf.APIArtistBio{Author:"", Value:""}}
	// Link : "http://www.songfreaks.com/vs-album-pearl-jam"
	// Tracks : []sf.APIAlbumTrack{sf.APIAlbumTrack{Id:4067756, TrackGroupId:299276, UrlSlug:"go-lyrics-pearl-jam-1", AMG:1994780, IsInstrumental:false, Viewable:true, Duration:"3:12", LyricId:22942, HasLrc:false, TrackNumber:1, DiscNumber:1, Title:"Go", Link:"http://www.songfreaks.com/go-lyrics-pearl-jam-1"}, sf.APIAlbumTrack{Id:4067757, TrackGroupId:299277, UrlSlug:"animal-lyrics-pearl-jam-1", AMG:1994781, IsInstrumental:false, Viewable:true, Duration:"2:49", LyricId:21440, HasLrc:false, TrackNumber:2, DiscNumber:1, Title:"Animal", Link:"http://www.songfreaks.com/animal-lyrics-pearl-jam-1"}, sf.APIAlbumTrack{Id:3950961, TrackGroupId:299278, UrlSlug:"daughter-lyrics-pearl-jam", AMG:1994782, IsInstrumental:false, Viewable:true, Duration:"3:55", LyricId:21263, HasLrc:false, TrackNumber:3, DiscNumber:1, Title:"Daughter", Link:"http://www.songfreaks.com/daughter-lyrics-pearl-jam"}, sf.APIAlbumTrack{Id:4067758, TrackGroupId:299279, UrlSlug:"glorified-g-lyrics-pearl-jam-1", AMG:1994783, IsInstrumental:false, Viewable:true, Duration:"3:26", LyricId:21276, HasLrc:false, TrackNumber:4, DiscNumber:1, Title:"Glorified G", Link:"http://www.songfreaks.com/glorified-g-lyrics-pearl-jam-1"}, sf.APIAlbumTrack{Id:4067759, TrackGroupId:299280, UrlSlug:"dissident-lyrics-pearl-jam", AMG:1994784, IsInstrumental:false, Viewable:true, Duration:"3:35", LyricId:21583, HasLrc:false, TrackNumber:5, DiscNumber:1, Title:"Dissident", Link:"http://www.songfreaks.com/dissident-lyrics-pearl-jam"}, sf.APIAlbumTrack{Id:4067760, TrackGroupId:299281, UrlSlug:"w-m-a-lyrics-pearl-jam-1", AMG:1994785, IsInstrumental:false, Viewable:true, Duration:"5:59", LyricId:21251, HasLrc:false, TrackNumber:6, DiscNumber:1, Title:"W.M.A.", Link:"http://www.songfreaks.com/w-m-a-lyrics-pearl-jam-1"}, sf.APIAlbumTrack{Id:3940668, TrackGroupId:299282, UrlSlug:"blood-lyrics-pearl-jam", AMG:1994786, IsInstrumental:false, Viewable:true, Duration:"2:50", LyricId:21272, HasLrc:false, TrackNumber:7, DiscNumber:1, Title:"Blood", Link:"http://www.songfreaks.com/blood-lyrics-pearl-jam"}, sf.APIAlbumTrack{Id:4067761, TrackGroupId:299283, UrlSlug:"rearviewmirror-lyrics-pearl-jam", AMG:1994787, IsInstrumental:false, Viewable:true, Duration:"4:44", LyricId:35303, HasLrc:false, TrackNumber:8, DiscNumber:1, Title:"Rearviewmirror", Link:"http://www.songfreaks.com/rearviewmirror-lyrics-pearl-jam"}, sf.APIAlbumTrack{Id:4021951, TrackGroupId:299284, UrlSlug:"rats-lyrics-pearl-jam-1", AMG:1994788, IsInstrumental:false, Viewable:true, Duration:"4:15", LyricId:21262, HasLrc:false, TrackNumber:9, DiscNumber:1, Title:"Rats", Link:"http://www.songfreaks.com/rats-lyrics-pearl-jam-1"}, sf.APIAlbumTrack{Id:4021950, TrackGroupId:299285, UrlSlug:"elderly-woman-behind-the-counter-in-a-small-town-lyrics-pearl-jam-1", AMG:1994789, IsInstrumental:false, Viewable:true, Duration:"3:15", LyricId:21560, HasLrc:false, TrackNumber:10, DiscNumber:1, Title:"Elderly Woman Behind the Counter in a Small Town", Link:"http://www.songfreaks.com/elderly-woman-behind-the-counter-in-a-small-town-lyrics-pearl-jam-1"}, sf.APIAlbumTrack{Id:4067762, TrackGroupId:299286, UrlSlug:"leash-lyrics-pearl-jam", AMG:1994790, IsInstrumental:false, Viewable:true, Duration:"3:09", LyricId:21250, HasLrc:false, TrackNumber:11, DiscNumber:1, Title:"Leash", Link:"http://www.songfreaks.com/leash-lyrics-pearl-jam"}, sf.APIAlbumTrack{Id:3940671, TrackGroupId:299287, UrlSlug:"indifference-lyrics-pearl-jam", AMG:1994791, IsInstrumental:false, Viewable:true, Duration:"5:02", LyricId:21266, HasLrc:false, TrackNumber:12, DiscNumber:1, Title:"Indifference", Link:"http://www.songfreaks.com/indifference-lyrics-pearl-jam"}}
	// Review : sf.APIAlbumReview{Author:"Steve Huey", Value:"&lt;b&gt;Pearl Jam&lt;/b&gt; took to superstardom like deer in headlights. Unsure of how to maintain their rigorous standards of integrity in the face of massive commercial success, the band took refuge in willful obscurity -- the title of their second album, Vs., did not appear &lt;I&gt;anywhere&lt;/I&gt; in the packaging, and they refused to release any singles or videos. (Ironically, many fans then paid steep prices for import CD singles, a situation the band eventually rectified.) The eccentricities underline &lt;b&gt;Pearl Jam&lt;/b&gt;'s almost paranoid aversion to charges of hypocrisy or egotism -- but it also made sense to use the spotlight for progress. You could see that reasoning in their ensuing battle with Ticketmaster, and you could hear it in the record itself. Vs. is often &lt;b&gt;Eddie Vedder&lt;/b&gt; at his most strident, both lyrically and vocally. It's less oblique than Ten in its topicality, and sometimes downright dogmatic; having the world's ear renders &lt;b&gt;Vedder&lt;/b&gt; unable to resist a few simplistic potshots at favorite white-liberal targets. Yet a little self-righteousness is an acceptable price to pay for the passionate immediacy that permeates Vs. It's a much rawer, looser record than Ten, feeling like a live performance; &lt;b&gt;Vedder&lt;/b&gt; practically screams himself hoarse on a few songs. The band consciously strives for spontaneity, admirably pushing itself into new territory -- some numbers are decidedly punky, and there are also a couple of acoustic-driven ballads, which are well suited to &lt;b&gt;Vedder&lt;/b&gt;'s sonorous low register. Sometimes, that spontaneity comes at the expense of Ten's marvelous craft -- a few songs here are just plain underdeveloped, with supporting frameworks that don't feel very sturdy. But, of everything that does work, the rockers are often frightening in their intensity, and the more reflective songs are mesmerizing. Vs. may not reach the majestic heights of Ten, but at least half the record stands with &lt;b&gt;Pearl Jam&lt;/b&gt;'s best work."}
}
示例#14
0
文件: api_test.go 项目: olragon/dna
func ExampleGetAPILyric() {
	_, err0 := GetAPILyric(29097271)
	if err0 == nil {
		panic("SongLyric id 29097271 has to have an error")
	} else {
		if err0.Error() != "NCT - Song ID:29097271 Lyric not found" {
			panic("Wrong error message")
		}
	}
	lyric, err := GetAPILyric(2909727)
	if err == nil {
		dna.LogStruct(lyric)
	} else {
		dna.Log(err.Error())
	}
	// Output:
	// Lyricid : 950870
	// Lyric : "Bài hát: Mảnh Ghép Đã Vỡ - Minh Vương M4U \nSáng tác: Hoàng Bảo Nam \n\nNgày tháng anh lệ rơi \nVì khóc bao đêm nhớ mong một người \nNiềm đau chôn sâu cay đắng khi em vô tình lãng quên \nGiờ anh biết phải làm sao \nĐể xoá đi bao kỷ niệm \n\nThật quá khó khi anh vẫn còn yêu em \nỞ nơi phương trời xa kia \nĐã khiến trong em đổi thay thật rồi\nTình yêu bao năm đậm sâu sẽ mãi chỉ là giấc mơ \nGiờ em đã có người yêu thay thế trong anh rất nhiều \nCòn đâu nữa thời gian như trước em dành cho anh \n\n[ĐK:] \nLời nói chia tay hôm qua sao quá nghiệt ngã \nBật khóc trong đêm anh nghe tiếng em lần cuối \nChẳng lẽ anh chỉ là người lấp chổ khoảng trống trong em \nMỗi khi em buồn \n\nHạnh phúc nay đã vỡ tan như hoa thuỷ tinh \nMảnh ghép yêu thương trong anh sẽ không bao giờ lành \nHọc cách quên đi một người quá khó \nVì nỗi đau ngày qua cứ mãi để lại \nSẽ không bao giờ phôi phai"
	// Songid : 2909727
	// Status : 3
	// TimedLyric : "\ufeff[00:15.92]Bài hát: Mảnh Ghép Đã Vỡ\n[00:16.93]Ca sĩ: Minh Vương M4U \n[00:18.36]Sáng tác: Hoàng Bảo Nam \n[00:19.53]\n[00:27.71]Ngày tháng anh lệ rơi \n[00:29.91]Vì khóc bao đêm\n[00:31.23] nhớ mong một người \n[00:33.98]Niềm đau chôn sâu\n[00:35.06] cay đắng khi em\n[00:36.22] vô tình lãng quên \n[00:38.38]Giờ anh biết\n[00:39.28] phải làm sao \n[00:40.97]Để xoá đi bao kỷ niệm \n[00:43.53]Thật quá khó\n[00:44.58] khi anh vẫn\n[00:45.26] còn yêu em \n[00:46.26]\n[02:25.65][00:47.54]Ở nơi phương trời xa kia \n[02:27.98][00:49.94]Đã khiến trong em\n[02:29.20][00:51.22] đổi thay thật rồi \n[02:31.63][00:53.73]Tình yêu bao năm\n[02:32.83][00:55.14] đậm sâu sẽ mãi \n[02:34.11][00:56.24]chỉ là giấc mơ \n[02:36.40][00:58.51]Giờ em đã có \n[02:37.65][00:59.79]người yêu thay thế \n[02:39.11][01:01.27]hơn anh rất nhiều \n[02:41.55][01:03.58]Còn đâu nữa \n[02:42.43][01:04.46]thời gian như trước\n[02:43.56][01:05.74] em dành cho anh \n[02:45.84][01:07.92]\n[03:34.55][02:48.26][01:10.18]Lời nói chia tay hôm qua\n[03:36.59][02:50.17][01:12.30] sao quá nghiệt ngã \n[03:39.51][02:52.97][01:15.07]Bật khóc trong đêm \n[03:40.76][02:54.21][01:16.33]anh nghe tiếng\n[03:41.98][02:55.48][01:17.63] em lần cuối \n[03:44.58][02:58.13][01:20.07]Chẳng lẽ anh\n[03:45.38][02:58.93][01:20.94] chỉ là người lấp chổ\n[03:48.28][03:01.84][01:23.92] khoảng trống trong em \n[03:50.55][03:04.18][01:26.28]Mỗi khi em buồn \n[03:53.61][03:06.37][01:29.14]\n[03:54.75][03:08.21][01:30.23]Hạnh phúc nay \n[03:55.53][03:08.99][01:30.98]đã vỡ tan \n[03:56.67][03:10.17][01:32.17]như hoa thuỷ tinh \n[03:59.57][03:13.32][01:35.20]Mảnh ghép yêu thương \n[04:00.73][03:14.48][01:36.36]trong anh sẽ không \n[04:02.69][03:16.20][01:38.33]bao giờ lành \n[04:04.62][03:17.99][01:40.23]Học cách quên đi \n[04:05.97][03:19.32][01:41.41]một người quá khó \n[04:08.47][03:21.88][01:44.12]Vì nỗi đau\n[04:09.53][03:23.03][01:45.27] ngày qua cứ mãi để lại \n[04:13.81][03:27.38][01:49.50]Sẽ không\n[04:14.82][03:28.28][01:50.62] bao giờ phôi phai\n[03:29.51][01:52.70]\n"
	// TimedLyricFile : "2014/01/13/d/0/5/b/1389584944210.lrc"
	// UsernameCreated : "nct_official"
}
示例#15
0
文件: post_test.go 项目: olragon/dna
func ExampleGetAPISongEntry() {
	apiSongEntry, err := GetAPISongEntry(1968535)
	if err == nil {
		if apiSongEntry.MainSong.Plays < 14727 {
			panic("Plays has to be greater than 14727")
		}
		apiSongEntry.MainSong.Plays = 14727
		for _, song := range apiSongEntry.RelevantSongs {
			song.Plays = 14727
		}
		var length = len(apiSongEntry.RelevantSongs)
		dna.Log("MAIN SONG:")
		if apiSongEntry.MainSong.Link == "" {
			panic("apiSongEntry.MainSong link is empty")
		}
		if apiSongEntry.MainSong.MediaUrlMono == "" {
			panic("apiSongEntry.MainSong media url is empty")
		}
		if apiSongEntry.MainSong.MediaUrlPre == "" {
			panic("apiSongEntry.MainSong medial url pre is empty")
		}
		if apiSongEntry.MainSong.DownloadUrl == "" {
			panic("apiSongEntry.MainSong download url is empty")
		}
		apiSongEntry.MainSong.Link = "http://streaming1.keeng.vn/1968535_1_wap.mp3"
		apiSongEntry.MainSong.MediaUrlMono = "http://media2.keeng.vn/medias/audio/2013/12/19/a5cc9183b876c288f099e97aecc189f004b2137a_24.mp3"
		apiSongEntry.MainSong.MediaUrlPre = "http://streaming1.keeng.vn/1968535_1_wap.mp3"
		apiSongEntry.MainSong.DownloadUrl = "http://streaming1.keeng.vn/1968535_1.mp3"
		if apiSongEntry.MainSong.Coverart == "" {
			panic("WRong covert")
		}
		if apiSongEntry.MainSong.Coverart310 == "" {
			panic("WRong coverart 310")
		}
		apiSongEntry.MainSong.Coverart = "http://media3.keeng.vn:8082/medias/images/images_thumb/f_medias2/singer/2013/06/13/a05019cceb7742d108159d661d894f19bc886eb1_103_103.jpg"
		apiSongEntry.MainSong.Coverart310 = "http://media3.keeng.vn:8082/medias/images/images_thumb/f_medias2/singer/2013/06/13/a05019cceb7742d108159d661d894f19bc886eb1_310_310.jpg"
		dna.LogStruct(&apiSongEntry.MainSong)
		dna.Log("SIMILAR SONGS LENGTH:", length)
	} else {
		panic("Error has to be nil")
	}
	// Output:
	// MAIN SONG:
	// Id : 1968535
	// Title : "Giáng Sinh Không Nhà"
	// Artists : "Hồ Quang Hiếu"
	// Plays : 14727
	// ListenType : 0
	// Lyric : "<p>\r\n\t<strong>Giáng Sinh Không Nhà </strong></p>\r\n<p>\r\n\t1. Chân bước đi dưới muôn ánh đèn đêm<br />\r\n\tNhưng cớ sao vẫn luôn thấy quạnh hiu<br />\r\n\tThêm Giáng Sinh nữa con đã không ở nhà.</p>\r\n<p>\r\n\tTrên phố đông tấp nập người lại qua<br />\r\n\tNhưng trái tim vẫn luôn nhớ nơi xa<br />\r\n\tCon muốn quay bước chân muốn trở về nhà.</p>\r\n<p>\r\n\t[ĐK:]<br />\r\n\tVề nghe gió đông đất trời giá lạnh<br />\r\n\tĐể ngồi nép bên nhau lòng con ấm hơn<br />\r\n\tNhìn theo ánh sao đêm gửi lời chúc lành<br />\r\n\tGiờ tâm trí con mong...về nhà.</p>\r\n<p>\r\n\t2. Khi tiếng chuông ngân lên lúc nửa đêm<br />\r\n\tThấy xuyến xao giống như những ngày xưa<br />\r\n\tTheo lũ bạn tung tăng đi xem nhà thờ.</p>\r\n<p>\r\n\tNhư cánh chim đến lúc cũng bay xa<br />\r\n\tCon đã mang theo mình những ước vọng<br />\r\n\tNhưng lúc này bâng khuâng con nhớ mọi người.</p>\r\n<p>\r\n\t[ĐK]<br />\r\n\tNhững ký ức ấm áp mãi như đang còn<br />\r\n\tVà sẽ giúp con đứng vững trước những phong ba<br />\r\n\tTrong tim con luôn yêu và nhớ thiết tha<br />\r\n\tMarry christmas, giáng sinh bình an.</p>"
	// Link : "http://streaming1.keeng.vn/1968535_1_wap.mp3"
	// MediaUrlMono : "http://media2.keeng.vn/medias/audio/2013/12/19/a5cc9183b876c288f099e97aecc189f004b2137a_24.mp3"
	// MediaUrlPre : "http://streaming1.keeng.vn/1968535_1_wap.mp3"
	// DownloadUrl : "http://streaming1.keeng.vn/1968535_1.mp3"
	// IsDownload : 1
	// RingbacktoneCode : ""
	// RingbacktonePrice : 0
	// Url : "http://keeng.vn/audio/Giang-Sinh-Khong-Nha-Ho-Quang-Hieu-320Kbps/N9TUO6DI.html"
	// Price : 1000
	// Copyright : 1
	// CrbtId : 0
	// Coverart : "http://media3.keeng.vn:8082/medias/images/images_thumb/f_medias2/singer/2013/06/13/a05019cceb7742d108159d661d894f19bc886eb1_103_103.jpg"
	// Coverart310 : "http://media3.keeng.vn:8082/medias/images/images_thumb/f_medias2/singer/2013/06/13/a05019cceb7742d108159d661d894f19bc886eb1_310_310.jpg"
	// SIMILAR SONGS LENGTH: 10

}
示例#16
0
func ExampleGetEpisode() {
	// Only to renew ACCESS_TOKEN_KEY
	_, err := GetMovie(5571)
	dna.PanicError(err)
	episode, err := GetEpisode(5571, 1)
	dna.PanicError(err)
	episode.Checktime = time.Date(2013, time.November, 21, 0, 0, 0, 0, time.UTC)
	if episode.PlaylistM3u8.Match(`(?mis)^#EXTM3U\r\n#EXT-X-VERSION:3.+480_hdv_app.m3u8\r\n$`) == false {
		panic("PlaylistM3u8 is wrong")
	} else {
		episode.PlaylistM3u8 = ""
	}

	if episode.ViSrt.Match(`^77u/MQ0KMDA6MDA.+OgIHLhu5NpLg0KDQo=$`) == false {
		panic("Vietnamese subtitle is wrong")
	} else {
		episode.ViSrt = ""
	}

	if episode.EnSrt.Match(`^77u/MQ0KMDA6MDA6MDAsNTg.+MA0KKioqDQoNCg==$`) == false {
		panic("English subtitle is wrong")
	} else {
		episode.EnSrt = ""
	}

	if episode.EpisodeM3u8.Match(`(?mis)^#EXTM3U\r\n#EXT-X-VERSION:3.+#EXT-X-ENDLIST\r\n$`) == false {
		panic("M3u8 file is wrong")
	} else {
		episode.EpisodeM3u8 = ""
	}

	if episode.LinkPlayBackup.Match(`playlist_480_hdv_app.m3u8$`) == false {
		panic("Wrong link backup")
	} else {
		episode.LinkPlayBackup = "http://f-11.vn-hd.com/c52447879ebfd67168d82f16f1cb374a/onair_2014/Grimm_S03_HDTV_AC3/E001/playlist_480_hdv_app.m3u8"
	}

	if episode.Link.Match(`playlist_480_hdv_app.m3u8$`) == false {
		panic("Wrong link backup")
	} else {
		episode.Link = "http://f-11.vn-hd.com/c52447879ebfd67168d82f16f1cb374a/onair_2014/Grimm_S03_HDTV_AC3/E001/playlist_480_hdv_app.m3u8"
	}

	dna.LogStruct(episode)
	// Output:
	// MovieId : 5571
	// EpId : 1
	// Title : "Grimm (Season 3) - Tập 1"
	// LinkPlayBackup : "http://f-11.vn-hd.com/c52447879ebfd67168d82f16f1cb374a/onair_2014/Grimm_S03_HDTV_AC3/E001/playlist_480_hdv_app.m3u8"
	// Link : "http://f-11.vn-hd.com/c52447879ebfd67168d82f16f1cb374a/onair_2014/Grimm_S03_HDTV_AC3/E001/playlist_480_hdv_app.m3u8"
	// LinkPlayOther : "http://125.212.216.74/vod/_definst_/smil:mp4_02/store_01_2014/onair_2014/Grimm_S03_HDTV_AC3/E001/Grimm_S03_HDTV_AC3_E001.smil/Manifest"
	// SubtitleExt : dna.StringArray{"http://s.vn-hd.com/mp4_02/store_01_2014/onair_2014/Grimm_S03_HDTV_AC3/E001/Grimm_S03_HDTV_AC3_E001_VIE.srt", "http://s.vn-hd.com/mp4_02/store_01_2014/onair_2014/Grimm_S03_HDTV_AC3/E001/Grimm_S03_HDTV_AC3_E001_ENG.srt"}
	// SubtitleExtSe : dna.StringArray{"http://s.vn-hd.com/mp4_02/store_01_2014/onair_2014/Grimm_S03_HDTV_AC3/E001/Grimm_S03_HDTV_AC3_E001_VIE.srt", "http://s.vn-hd.com/mp4_02/store_01_2014/onair_2014/Grimm_S03_HDTV_AC3/E001/Grimm_S03_HDTV_AC3_E001_ENG.srt"}
	// Subtitle : dna.StringArray{"", "http://s.vn-hd.com/mp4_02/store_01_2014/onair_2014/Grimm_S03_HDTV_AC3/E001/Grimm_S03_HDTV_AC3_E001_ENG.srt"}
	// EpisodeId : 17
	// Audiodub : 0
	// Audio : 0
	// Season : "[{\"MovieID\":\"473\",\"Name\":\"Grimm (Season 1)\"},{\"MovieID\":\"2364\",\"Name\":\"Grimm (Season 2)\"}]"
	// PlaylistM3u8 : ""
	// ViSrt : ""
	// EnSrt : ""
	// EpisodeM3u8 : ""
	// Checktime : "2013-11-21 00:00:00"
}
示例#17
0
文件: song_test.go 项目: olragon/dna
func ExampleGetSong() {
	_, err := GetSong(1966782)
	if err == nil {
		panic("Song has to have an error")
	} else {
		if err.Error() != "Keeng - Song ID: 1966782 not found" {
			panic("Wrong error message!")
		}
	}
	song, err := GetSong(1967829)
	dna.PanicError(err)
	song.Checktime = time.Date(2013, time.November, 21, 0, 0, 0, 0, time.UTC)
	if song.Plays < 126222 {
		panic("Wrong play")
	}
	if song.Link == "" {
		panic("song link is empty")
	}
	if song.MediaUrlMono == "" {
		panic("song media url is empty")
	}
	if song.MediaUrlPre == "" {
		panic("song medial url pre is empty")
	}
	if song.DownloadUrl == "" {
		panic("song download url is empty")
	}
	if song.Coverart == "" {
		panic("WRong covert")
	}
	if song.Coverart310 == "" {
		panic("WRong coverart 310")
	}
	song.Link = "http://media2.keeng.vn/medias/audio/2013/12/19/a5cc9183b876c288f099e97aecc189f004b2137a_128.mp3"
	song.MediaUrlMono = "http://media2.keeng.vn/medias/audio/2013/12/09/54ec35cd058b422c1b4b9f812cdb5726dee66f9c_24.mp3"
	song.MediaUrlPre = "http://media2.keeng.vn/medias/audio/2013/12/19/a5cc9183b876c288f099e97aecc189f004b2137a_128.mp3"
	song.DownloadUrl = "http://media2.keeng.vn/medias/audio/2013/12/19/a5cc9183b876c288f099e97aecc189f004b2137a.mp3"
	song.Plays = 126222

	song.Coverart = "http://media3.keeng.vn:8082/medias/images/images_thumb/f_medias2/singer/2013/01/21/673a437247a1f039bbde97119385c16524131f8f_103_103.jpg"
	song.Coverart310 = "http://media3.keeng.vn:8082/medias/images/images_thumb/f_medias2/singer/2013/01/21/673a437247a1f039bbde97119385c16524131f8f_310_310.jpg"
	song.DateCreated = time.Date(2013, time.December, 9, 0, 0, 0, 0, time.UTC)
	dna.LogStruct(song)
	// Output:
	// Id : 1967829
	// Key : "LKD633FY"
	// Title : "Em Phải Làm Sao"
	// Artists : dna.StringArray{"Mỹ Tâm"}
	// Plays : 126222
	// ListenType : 0
	// HasLyric : true
	// Lyric : "<p>\r\n\t<span class=\"lyric\">Làm sao để cho tình ta giờ đây vui như lúc đầu<br />\r\n\tLàm sao để cho nụ hôn nồng say thôi mang nỗi sầu<br />\r\n\tLàm sao để cho từng đêm mình em thôi không đớn đau vì nhau<br />\r\n\tLàm sao để anh sẽ tin rằng em chỉ yêu mỗi anh.<br />\r\n\t<br />\r\n\tLàm sao để cho tình anh giờ đây thôi không hững hờ<br />\r\n\tLàm sao để cho tình không là mơ em thôi thẫn thờ<br />\r\n\tVì em ngày xưa từng mang lầm lỡ nên đâu dám mơ mộng gì<br />\r\n\tLàm sao để cho thời gian đừng bôi xóa đi ngày thơ.<br />\r\n\t<br />\r\n\t[ĐK:]<br />\r\n\tNgười hỡi, người có biết em vẫn luôn cần anh<br />\r\n\tĐể sưởi ấm cho trái tim mỏng manh<br />\r\n\tMùa đông có anh sẽ qua thật nhanh<br />\r\n\tLời yêu thương đó, cố giữ trên môi<br />\r\n\tMà sao tiếng yêu trong anh như mây chiều trôi<br />\r\n\tTình mình sao cứ mãi xa xôi...<br />\r\n\t<br />\r\n\tNgười hỡi, người có biết em vẫn luôn còn đây<br />\r\n\tDù bao giấc mơ cuốn theo làn mây<br />\r\n\tDù anh có quên hết bao nồng say<br />\r\n\tTình em vẫn thế, dẫu chẳng ai hay<br />\r\n\tVà bao ước mơ bên anh nay xa tầm tay<br />\r\n\tNguyện rằng em sẽ mãi yêu không đổi thay.</span></p>"
	// Link : "http://media2.keeng.vn/medias/audio/2013/12/19/a5cc9183b876c288f099e97aecc189f004b2137a_128.mp3"
	// MediaUrlMono : "http://media2.keeng.vn/medias/audio/2013/12/09/54ec35cd058b422c1b4b9f812cdb5726dee66f9c_24.mp3"
	// MediaUrlPre : "http://media2.keeng.vn/medias/audio/2013/12/19/a5cc9183b876c288f099e97aecc189f004b2137a_128.mp3"
	// DownloadUrl : "http://media2.keeng.vn/medias/audio/2013/12/19/a5cc9183b876c288f099e97aecc189f004b2137a.mp3"
	// IsDownload : 1
	// RingbacktoneCode : "7333357"
	// RingbacktonePrice : 5000
	// Price : 1000
	// Copyright : 1
	// CrbtId : 0
	// Coverart : "http://media3.keeng.vn:8082/medias/images/images_thumb/f_medias2/singer/2013/01/21/673a437247a1f039bbde97119385c16524131f8f_103_103.jpg"
	// Coverart310 : "http://media3.keeng.vn:8082/medias/images/images_thumb/f_medias2/singer/2013/01/21/673a437247a1f039bbde97119385c16524131f8f_310_310.jpg"
	// DateCreated : "2013-12-09 00:00:00"
	// Checktime : "2013-11-21 00:00:00"
}
示例#18
0
文件: user_test.go 项目: olragon/dna
func ExampleGetUsers() {
	users, err := GetUsers(dna.IntArray{438})
	if err != nil {
		dna.PanicError(err)
	} else {
		user := users.List[0]
		user.Checktime = time.Date(2013, time.November, 21, 0, 0, 0, 0, time.UTC)
		if user.FriendTotal < 694 {
			panic("Wrong user's FriendTotal")
		}
		if user.Point < 22932 {
			panic("Wrong user's Point")
		}
		if user.VipTotal < 310 {
			panic("Wrong user's VipTotal")
		}

		if user.FriendAvatar == "" {
			panic("Wrong user's FriendAvatar")
		}

		if user.Avatar == "" {
			panic("Wrong user's Avatar")
		}

		if user.VipAvatar == "" {
			panic("Wrong user's VipAvatar")
		}

		if user.CoverUrl == "" {
			panic("Wrong user's CoverUrl")
		}

		user.FriendTotal = 694
		user.Point = 22932
		user.VipTotal = 310
		user.FriendAvatar = "http://s120.avatar.zdn.vn/6/7/8/a/dzobanbe_100_131.jpg"
		user.Avatar = "http://s120.avatar.zdn.vn/6/7/8/a/dzobanbe_100_131.jpg"
		user.VipAvatar = "http://s120.avatar.zdn.vn/9/4/3/c/macma2005_100_262.jpg"
		user.CoverUrl = "http://stc.thongdiephay.zdn.vn/bd54328839-9927.jpg"

		dna.LogStruct(user)
	}
	// Output:
	// Id : 438
	// Email : "*****@*****.**"
	// Username : "******"
	// DisplayName : "Nguyễn Văn Đức Trọng"
	// Birthday : "1981-07-28"
	// BirthdayType : 1
	// Gender : 0
	// Mobile : dna.StringArray{"84937388269"}
	// FriendTotal : 694
	// FriendBlock : "false"
	// FriendAvatar : "http://s120.avatar.zdn.vn/6/7/8/a/dzobanbe_100_131.jpg"
	// ProfilePoint : 0
	// StatusWall : "Tình yêu của anh đối với em giống như giá xăng vậy càng lúc càng tăng."
	// GoogleId : "dzobanbe"
	// YahooId : "dzobanbe"
	// Point : 22932
	// Avatar : "http://s120.avatar.zdn.vn/6/7/8/a/dzobanbe_100_131.jpg"
	// VipTotal : 310
	// VipBlock : "false"
	// VipAvatar : "http://s120.avatar.zdn.vn/9/4/3/c/macma2005_100_262.jpg"
	// IsNull : false
	// Status : 0
	// FeedWriteWallAll : false
	// FeedViewWallAll : true
	// CoverUrl : "http://stc.thongdiephay.zdn.vn/bd54328839-9927.jpg"
	// Checktime : "2013-11-21 00:00:00"
}