(company)
| 2 | |
| 3 | export default class DataApi { |
| 4 | static async getCompanyProfile(company) { |
| 5 | return new Promise((resolve, reject) => { |
| 6 | if (!company || company.trim().length !== 3) { |
| 7 | reject('Ticker cannot be empty and must be 3 character long'); |
| 8 | } |
| 9 | try { |
| 10 | const result = CompanyDataGenerator.getCompanyProfile(company); |
| 11 | resolve(result); |
| 12 | } catch(e) { |
| 13 | console.error(e); |
| 14 | reject(e); |
| 15 | } |
| 16 | }) |
| 17 | } |
| 18 | |
| 19 | static async getCompanyFinancial(company) { |
| 20 | return new Promise((resolve, reject) => { |
no outgoing calls
no test coverage detected