CompanyResource

final public class CompanyResource: ResourceUpdating

A class representing a Company on the Giant Bomb wiki. Examples include Square Enix and Sony Computer Entertainment.

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

  • The resource type.

    Declaration

    Swift

    public let resourceType = ResourceType.company
  • Abbreviation of the company.

    Declaration

    Swift

    public fileprivate(set) var abbreviation: String?
  • Array of aliases the company is known by.

    Declaration

    Swift

    public fileprivate(set) var aliases: [String]?
  • URL pointing to the company detail resource.

    Declaration

    Swift

    public fileprivate(set) var api_detail_url: URL?
  • Date the company was added to Giant Bomb.

    Declaration

    Swift

    public fileprivate(set) var date_added: Date?
  • Date the company was founded.

    Declaration

    Swift

    public fileprivate(set) var date_founded: Date?
  • Date the company was last updated on Giant Bomb.

    Declaration

    Swift

    public fileprivate(set) var date_last_updated: Date?
  • Brief summary of the company.

    Declaration

    Swift

    public fileprivate(set) var deck: String?
  • Description of the company.

    Declaration

    Swift

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

    Unique ID of the company.

    Declaration

    Swift

    public let id: Int?
  • Main image of the company.

    Declaration

    Swift

    public fileprivate(set) var image: ImageURLs?
  • Street address of the company.

    Declaration

    Swift

    public fileprivate(set) var location_address: String?
  • City the company resides in.

    Declaration

    Swift

    public fileprivate(set) var location_city: String?
  • Country the company resides in.

    Declaration

    Swift

    public fileprivate(set) var location_country: String?
  • State the company resides in.

    Declaration

    Swift

    public fileprivate(set) var location_state: String?
  • Name of the company.

    Declaration

    Swift

    public fileprivate(set) var name: String?
  • Phone number of the company.

    Declaration

    Swift

    public fileprivate(set) var phone: String?
  • URL pointing to the company on Giant Bomb.

    Declaration

    Swift

    public fileprivate(set) var site_detail_url: URL?
  • URL to the company website.

    Declaration

    Swift

    public fileprivate(set) var website: URL?
  • Extended info.

    Declaration

    Swift

    public var extendedInfo: CompanyExtendedInfo?
  • Used to create a CompanyResource from JSON.

    Declaration

    Swift

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

    Declaration

    Swift

    public var prettyDescription: String
  • Fetches extended info for this company. 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-8. Pass nil to return everything.

    completion

    A closure containing an optional RequestError if the request failed.