Interface OfficeAPI

Corporation Office API

Remarks

requires the Office API upgrade from your corporation.

interface OfficeAPI {
    buyTea(divisionName, city): boolean;
    getHireAdVertCost(divisionName): number;
    getHireAdVertCount(divisionName): number;
    getOffice(divisionName, city): Office;
    getOfficeSizeUpgradeCost(divisionName, city, size): number;
    getResearchCost(divisionName, researchName): number;
    hasResearched(divisionName, researchName): boolean;
    hireAdVert(divisionName): void;
    hireEmployee(divisionName, city, employeePosition?): boolean;
    research(divisionName, researchName): void;
    setAutoJobAssignment(divisionName, city, job, amount): boolean;
    throwParty(divisionName, city, costPerEmployee): number;
    upgradeOfficeSize(divisionName, city, size): void;
}

Hierarchy (view full)

Methods

  • Buy tea for your employees

    Parameters

    • divisionName: string

      Name of the division

    • city: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Name of the city

    Returns boolean

    true if buying tea was successful, false otherwise

  • Get the cost to hire AdVert.

    Parameters

    • divisionName: string

      Name of the division.

    Returns number

    The cost to hire AdVert.

  • Get the number of times you have hired AdVert.

    Parameters

    • divisionName: string

      Name of the division.

    Returns number

    Number of times you have hired AdVert.

  • Get data about an office

    Parameters

    • divisionName: string

      Name of the division

    • city: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Name of the city

    Returns Office

    Office data

  • Cost to Upgrade office size.

    Parameters

    • divisionName: string

      Name of the division

    • city: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Name of the city

    • size: number

      Amount of positions to open

    Returns number

    Cost of upgrading the office

  • Get the cost to unlock research

    Parameters

    • divisionName: string

      Name of the division

    • researchName: string

      Name of the research

    Returns number

    cost

  • Gets if you have unlocked a research

    Parameters

    • divisionName: string

      Name of the division

    • researchName: string

      Name of the research

    Returns boolean

    true is unlocked, false if not

  • Hire an employee.

    Parameters

    • divisionName: string

      Name of the division

    • city: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Name of the city

    • Optional employeePosition: CorpEmployeePosition

      Position to place into. Defaults to "Unassigned".

    Returns boolean

    True if an employee was hired, false otherwise

  • Purchase a research

    Parameters

    • divisionName: string

      Name of the division

    • researchName: string

      Name of the research

    Returns void

  • Set the auto job assignment for a job

    Parameters

    • divisionName: string

      Name of the division

    • city: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Name of the city

    • job: string

      Name of the job

    • amount: number

      Number of employees to assign to that job

    Returns boolean

    true if the employee count reached the target amount, false if not

  • Throw a party for your employees

    Parameters

    • divisionName: string

      Name of the division

    • city: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Name of the city

    • costPerEmployee: number

      Amount to spend per employee.

    Returns number

    Multiplier for morale, or zero on failure

  • Upgrade office size.

    Parameters

    • divisionName: string

      Name of the division

    • city: CityName | "Aevum" | "Chongqing" | "Sector-12" | "New Tokyo" | "Ishima" | "Volhaven"

      Name of the city

    • size: number

      Amount of positions to open

    Returns void