bangumi.go 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. package bangumi
  2. import "encoding/json"
  3. // Season struct
  4. type Season struct {
  5. AllowDownload string `json:"allow_download,omitempty"`
  6. SeasonID string `json:"season_id,omitempty"`
  7. IsJump int `json:"is_jump,omitempty"`
  8. Title string `json:"title,omitempty"`
  9. Cover string `json:"cover,omitempty"`
  10. IsFinish string `json:"is_finish,omitempty"`
  11. NewestEpID string `json:"newest_ep_id,omitempty"`
  12. NewestEpIndex string `json:"newest_ep_index,omitempty"`
  13. TotalCount string `json:"total_count,omitempty"`
  14. Weekday string `json:"weekday,omitempty"`
  15. UserSeason *struct {
  16. Attention string `json:"attention,omitempty"`
  17. } `json:"user_season,omitempty"`
  18. Player *struct {
  19. Aid int64 `json:"aid,omitempty"`
  20. Vid string `json:"vid,omitempty"`
  21. Cid int64 `json:"cid,omitempty"`
  22. From string `json:"from,omitempty"`
  23. } `json:"player,omitempty"`
  24. }
  25. // Movie struct
  26. type Movie struct {
  27. AllowDownload int8 `json:"allow_download,omitempty"`
  28. MovieStatus int `json:"movie_status"`
  29. PayUser *struct {
  30. Status int `json:"status"`
  31. } `json:"pay_user"`
  32. Payment json.RawMessage `json:"payment,omitempty"`
  33. Season *struct {
  34. Actor json.RawMessage `json:"actor,omitempty"`
  35. Area string `json:"area"`
  36. Areas json.RawMessage `json:"areas,omitempty"`
  37. Cover string `json:"cover"`
  38. Evaluate string `json:"evaluate"`
  39. PubTime string `json:"pub_time"`
  40. SeasonID int `json:"season_id"`
  41. Tags json.RawMessage `json:"tags,omitempty"`
  42. Title string `json:"title"`
  43. TotalDuration int `json:"total_duration"`
  44. } `json:"season"`
  45. TrailerAid int `json:"trailer_aid"`
  46. VideoLength int `json:"video_length"`
  47. VipQuality int `json:"vip_quality"`
  48. Activity json.RawMessage `json:"activity,omitempty"`
  49. List []struct {
  50. Cid int64 `json:"cid"`
  51. HasAlias bool `json:"has_alias"`
  52. Page int `json:"page"`
  53. Part string `json:"part"`
  54. Type string `json:"type"`
  55. Vid string `json:"vid"`
  56. } `json:"list,omitempty"`
  57. }
  58. // Card for bangumi.
  59. type Card struct {
  60. SeasonID int64 `json:"season_id"`
  61. SeasonType int `json:"season_type"`
  62. IsFollow int `json:"is_follow"`
  63. IsSelection int `json:"is_selection"`
  64. Badge string `json:"badge"`
  65. BadgeType int `json:"badge_type"`
  66. Episodes []*Episode `json:"episodes"`
  67. }
  68. // Episode for bangumi card.
  69. type Episode struct {
  70. ID int64 `json:"id"`
  71. Badge string `json:"badge"`
  72. BadgeType int `json:"badge_type"`
  73. Status int `json:"status"`
  74. Cover string `json:"cover"`
  75. Index string `json:"index"`
  76. IndexTitle string `json:"index_title"`
  77. }