Options
All
  • Public
  • Public/Protected
  • All
Menu

boxrec

Index

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

BoxingBoutOutcomeKeys

BoxingBoutOutcomeKeys: keyof BoxingBoutOutcome

OutputValues

OutputValues: "age" | "boxingOrganizations" | "byWeightDivision" | "career" | "champions" | "commission" | "date" | "division" | "doctors" | "firstBoxerRating" | "firstBoxerWeight" | "hasBoutScheduled" | "id" | "inspector" | "judges" | "last6" | "links" | "localBoxers" | "localManagers" | "location" | "matchmakers" | "media" | "metadata" | "name" | "numberOfBouts" | "numberOfPages" | "numberOfPeople" | "numberOfRounds" | "outcome" | "people" | "points" | "promoters" | "rating" | "record" | "referee" | "residence" | "result" | "secondBoxer" | "secondBoxerLast6" | "secondBoxerRating" | "secondBoxerRecord" | "secondBoxerWeight" | "stance" | "television" | "titles"

RatingsColumns

RatingsColumns: "name" | "points" | "rating" | "age" | "career" | "w-l-d" | "stance" | "residence" | "division" | "last 6" | "ranking"

Stance

Stance: "orthodox" | "southpaw"

Variables

Const $

$: CheerioStatic = cheerio.load('<div></div>')

Const locationFlagSelector

locationFlagSelector: "*[class*="flag"]" = "*[class*="flag"]"

Const profileTableEl

profileTableEl: string = ".profileTable"

Const ratingsTableEl

ratingsTableEl: string = "#ratingsResults"

Const townRegionCountryRegex

townRegionCountryRegex: RegExp = /\?country=([A-Za-z]+)(?:(?:&|&amp;)region=([A-Za-z0-9]*))?(?:(?:&|&amp;)town=(\d+))?/

Functions

BoutsGetter

  • BoutsGetter(tableEl: string, classType: object, theadNumber?: number, reverseOrder?: boolean): function
  • Parameters

    • tableEl: string
    • classType: object
    • Default value theadNumber: number = 1
    • Default value reverseOrder: boolean = false

    Returns function

      • (target: any): void
      • Parameters

        • target: any

        Returns void

DateGetter

  • DateGetter(): function

DayGetter

  • DayGetter(): function

DivisionGetter

  • DivisionGetter(): function

EventsBoutsGetter

  • EventsBoutsGetter(classType: object): function

FirstBoxerGetter

  • FirstBoxerGetter(): function

FirstBoxerWeightGetter

  • FirstBoxerWeightGetter(returnHTML?: boolean): function

IdGetter

  • IdGetter(commonId?: name | links): function
  • Parameters

    • Default value commonId: name | links = BoxrecCommonTableHeader.name

    Returns function

      • (target: any): void
      • Parameters

        • target: any

        Returns void

ListingsGetter

  • ListingsGetter(getter: string, classType: object, tableEl: string): function
  • Parameters

    • getter: string
    • classType: object
    • tableEl: string

    Returns function

      • (target: any): void
      • Parameters

        • target: any

        Returns void

MetadataGetter

  • MetadataGetter(): function

NumberOfRoundsGetter

  • NumberOfRoundsGetter(): function

OutcomeGetter

OutputGetter

  • OutputGetter(collection: Array<string | OutputObj>): function

RatingGetter

  • RatingGetter(): function

changeToCamelCase

  • changeToCamelCase(str: string): string

convertFractionsToNumber

  • convertFractionsToNumber(fraction: string): number
  • Parameters

    • fraction: string

    Returns number

getColumnDataByColumnHeader

  • getColumnDataByColumnHeader($: CheerioStatic, tableColumnsArr: string[], columnHeaderText: BoxrecCommonTableHeader, returnHTML?: boolean): string

getHeaderColumnText

Const getLocationValue

  • getLocationValue(href: string, type: "town" | "region" | "country"): string | number | null
  • Parameters

    • href: string
    • type: "town" | "region" | "country"

    Returns string | number | null

getTableColumnData

  • getTableColumnData(tableEl: Cheerio, columnNumber?: number, returnHTML?: boolean): string[]
  • Parameters

    • tableEl: Cheerio
    • Default value columnNumber: number = 1
    • Default value returnHTML: boolean = false

    Returns string[]

getValueForHeadersArr

Const parseHeight

  • parseHeight(height: string | void): number[] | null
  • Parameters

    • height: string | void

    Returns number[] | null

Const replaceWithWeight

  • replaceWithWeight(str: string): string

Const stripArrows

  • stripArrows(str: string): string

Const stripCommas

  • stripCommas(str: string): string

trimRemoveLineBreaks

  • trimRemoveLineBreaks(str: string): string

Const whatTypeOfLink

  • whatTypeOfLink(href: string): "town" | "region" | "country"
  • Parameters

    • href: string

    Returns "town" | "region" | "country"

Object literals

Const beltOrganizations

beltOrganizations: object

BoxRec

BoxRec: null = null

IBF

IBF: null = null

IBO

IBO: null = null

WBA

WBA: null = null

WBC

WBC: null = null

WBO

WBO: null = null

Const emptyLocationObject

emptyLocationObject: object

location

location: object

country

country: object

id

id: null = null

name

name: null = null

region

region: object

id

id: null = null

name

name: null = null

town

town: object

id

id: null = null

name

name: null = null

venue

venue: object

id

id: null = null

name

name: null = null

Const weightDivisions

weightDivisions: object

bantamweight

bantamweight: BoxrecBelts = beltOrganizations

cruiserweight

cruiserweight: BoxrecBelts = beltOrganizations

featherWeight

featherWeight: BoxrecBelts = beltOrganizations

flyweight

flyweight: BoxrecBelts = beltOrganizations

heavyweight

heavyweight: BoxrecBelts = beltOrganizations

lightFlyweight

lightFlyweight: BoxrecBelts = beltOrganizations

lightHeavyweight

lightHeavyweight: BoxrecBelts = beltOrganizations

lightweight

lightweight: BoxrecBelts = beltOrganizations

middleweight

middleweight: BoxrecBelts = beltOrganizations

minimumweight

minimumweight: BoxrecBelts = beltOrganizations

superBantamweight

superBantamweight: BoxrecBelts = beltOrganizations

superFeatherweight

superFeatherweight: BoxrecBelts = beltOrganizations

superFlyweight

superFlyweight: BoxrecBelts = beltOrganizations

superLightweight

superLightweight: BoxrecBelts = beltOrganizations

superMiddleweight

superMiddleweight: BoxrecBelts = beltOrganizations

superWelterweight

superWelterweight: BoxrecBelts = beltOrganizations

welterweight

welterweight: BoxrecBelts = beltOrganizations

Generated using TypeDoc