mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-18 21:53:50 +01:00
65 lines
1.4 KiB
Markdown
65 lines
1.4 KiB
Markdown
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||
|
|
||
|
[Home](./index.md) > [bitburner](./bitburner.md) > [TIX](./bitburner.tix.md) > [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));
|
||
|
```
|
||
|
|