VideoResource

final public class VideoResource: ResourceUpdating

A class representing a Video on the Giant Bomb database. This includes quick looks and other Giant Bomb-created content as well as trailers for games amongst others.

To retrieve extended info for a video, call fetchExtendedInfo(_:) upon it.

  • The resource type.

    Declaration

    Swift

    public let resourceType = ResourceType.video
  • URL pointing to the video detail resource.

    Declaration

    Swift

    public fileprivate(set) var api_detail_url: URL?
  • Brief summary of the video.

    Declaration

    Swift

    public fileprivate(set) var deck: String?
  • id

    Unique ID of the video.

    Declaration

    Swift

    public let id: Int?
  • Length (in seconds) of the video.

    Declaration

    Swift

    public fileprivate(set) var length_seconds: Int?
  • Name of the video.

    Declaration

    Swift

    public fileprivate(set) var name: String?
  • Date the video was published on Giant Bomb.

    Declaration

    Swift

    public fileprivate(set) var publish_date: Date?
  • URL pointing to the video on Giant Bomb.

    Declaration

    Swift

    public fileprivate(set) var site_detail_url: URL?
  • Author of the video.

    Declaration

    Swift

    public fileprivate(set) var user: String?
  • Video category.

    Declaration

    Swift

    public fileprivate(set) var video_type: String?
  • Youtube ID for the video.

    Declaration

    Swift

    public fileprivate(set) var youtube_id: String?
  • url

    The video’s filename.

    Declaration

    Swift

    public fileprivate(set) var url: String?
  • Container for the video’s image.

    Declaration

    Swift

    public fileprivate(set) var image: ImageURLs?
  • Container for the video’s URLs.

    Declaration

    Swift

    public fileprivate(set) var urls: VideoURLs?
  • Extended info. Unused for this resource type.

    Declaration

    Swift

    public var extendedInfo: UnusedExtendedInfo?
  • Used to create a VideoResource from JSON.

    Declaration

    Swift

    public init(json: [String : AnyObject])
  • Pretty description of the video.

    Declaration

    Swift

    public var prettyDescription: String
  • Fetches extended info for this video. Also re-populates base data in the case where this object is a stub from another parent resource.

    Declaration

    Swift

    public func fetchExtendedInfo(_ fields: [String]? = nil, completion: @escaping (_ error: RequestError?) -> Void)

    Parameters

    fields

    An optional array of fields to return in the response. See the available options at http://www.giantbomb.com/api/documentation#toc-0-44. Pass nil to return everything.

    completion

    A closure containing an optional RequestError if the request failed.