Update docs

This commit is contained in:
omuretsu 2022-11-28 10:44:04 -05:00
parent 0fb7200b4b
commit 6a4d40ce2b
5 changed files with 121 additions and 16 deletions

56
dist/bitburner.d.ts vendored

@ -7038,6 +7038,46 @@ export declare interface TIX {
*/
getPrice(sym: string): number;
/**
* Returns the organization associated with a stock symbol.
*
* @remarks
* RAM cost: 2 GB
*
* The organization associated with the corresponding stock symbol. This function
* requires that you have the following:
*
* 1. WSE Account
*
* 1. TIX API Access
*
* @example
* ```ts
* // NS1
* stock.getOrganization("FSIG");
*
* // Choose the first stock symbol from the array of stock symbols. Get the
* // organization associated with the corresponding stock symbol
* var sym = stock.getSymbols()[0];
* tprint("Stock symbol: " + sym);
* tprint("Stock organization: " + stock.getOrganization(sym));
* ```
* @example
* ```ts
* // NS2
* ns.stock.getOrganization("FSIG");
*
* // Choose the first stock symbol from the array of stock symbols. Get the
* // organization associated with the corresponding stock symbol.
* const sym = ns.stock.getSymbols()[0];
* ns.tprint("Stock symbol: " + sym);
* ns.tprint("Stock organization: " + ns.stock.getOrganization(sym));
* ```
* @param sym - Stock symbol.
* @returns The organization assicated with the stock symbol.
*/
getOrganization(sym: string): string;
/**
* Returns the ask price of that stock.
* @remarks RAM cost: 2 GB
@ -7732,18 +7772,18 @@ export declare interface WarehouseAPI {
): void;
/**
* Limit Material Production.
* @param divisionName - Name of the division
* @param cityName - Name of the city
* @param materialName - Name of the material
* @param qty - Amount to limit to
* @param divisionName - Name of the division.
* @param cityName - Name of the city.
* @param materialName - Name of the material.
* @param qty - Amount to limit to. Pass a negative value to remove the limit instead.
*/
limitMaterialProduction(divisionName: string, cityName: string, materialName: string, qty: number): void;
/**
* Limit Product Production.
* @param divisionName - Name of the division
* @param cityName - Name of the city
* @param productName - Name of the product
* @param qty - Amount to limit to
* @param divisionName - Name of the division.
* @param cityName - Name of the city.
* @param productName - Name of the product.
* @param qty - Amount to limit to. Pass a negative value to remove the limit instead.
*/
limitProductProduction(divisionName: string, cityName: string, productName: string, qty: number): void;
/**

@ -0,0 +1,64 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [TIX](./bitburner.tix.md) &gt; [getOrganization](./bitburner.tix.getorganization.md)
## TIX.getOrganization() method
Returns the organization associated with a stock symbol.
<b>Signature:</b>
```typescript
getOrganization(sym: string): string;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| sym | string | Stock symbol. |
<b>Returns:</b>
string
The organization assicated with the stock symbol.
## Remarks
RAM cost: 2 GB
The organization associated with the corresponding stock symbol. This function requires that you have the following:
1. WSE Account
1. TIX API Access
## Example 1
```ts
// NS1
stock.getOrganization("FSIG");
// Choose the first stock symbol from the array of stock symbols. Get the
// organization associated with the corresponding stock symbol
var sym = stock.getSymbols()[0];
tprint("Stock symbol: " + sym);
tprint("Stock organization: " + stock.getOrganization(sym));
```
## Example 2
```ts
// NS2
ns.stock.getOrganization("FSIG");
// Choose the first stock symbol from the array of stock symbols. Get the
// organization associated with the corresponding stock symbol.
const sym = ns.stock.getSymbols()[0];
ns.tprint("Stock symbol: " + sym);
ns.tprint("Stock organization: " + ns.stock.getOrganization(sym));
```

@ -24,6 +24,7 @@ export interface TIX
| [getForecast(sym)](./bitburner.tix.getforecast.md) | Returns the probability that the specified stocks price will increase (as opposed to decrease) during the next tick. |
| [getMaxShares(sym)](./bitburner.tix.getmaxshares.md) | Returns the maximum number of shares of a stock. |
| [getOrders()](./bitburner.tix.getorders.md) | Returns your order book for the stock market. |
| [getOrganization(sym)](./bitburner.tix.getorganization.md) | Returns the organization associated with a stock symbol. |
| [getPosition(sym)](./bitburner.tix.getposition.md) | Returns the players position in a stock. |
| [getPrice(sym)](./bitburner.tix.getprice.md) | Returns the price of a stock. |
| [getPurchaseCost(sym, shares, posType)](./bitburner.tix.getpurchasecost.md) | Calculates cost of buying stocks. |

@ -16,10 +16,10 @@ limitMaterialProduction(divisionName: string, cityName: string, materialName: st
| Parameter | Type | Description |
| --- | --- | --- |
| divisionName | string | Name of the division |
| cityName | string | Name of the city |
| materialName | string | Name of the material |
| qty | number | Amount to limit to |
| divisionName | string | Name of the division. |
| cityName | string | Name of the city. |
| materialName | string | Name of the material. |
| qty | number | Amount to limit to. Pass a negative value to remove the limit instead. |
<b>Returns:</b>

@ -16,10 +16,10 @@ limitProductProduction(divisionName: string, cityName: string, productName: stri
| Parameter | Type | Description |
| --- | --- | --- |
| divisionName | string | Name of the division |
| cityName | string | Name of the city |
| productName | string | Name of the product |
| qty | number | Amount to limit to |
| divisionName | string | Name of the division. |
| cityName | string | Name of the city. |
| productName | string | Name of the product. |
| qty | number | Amount to limit to. Pass a negative value to remove the limit instead. |
<b>Returns:</b>