2021-08-14 16:55:40 +02:00
|
|
|
import { ConfigurationModule } from '@ghostfolio/api/services/configuration.module';
|
2021-10-21 22:11:12 +02:00
|
|
|
import { CryptocurrencyModule } from '@ghostfolio/api/services/cryptocurrency/cryptocurrency.module';
|
2021-08-14 16:55:40 +02:00
|
|
|
import { GhostfolioScraperApiService } from '@ghostfolio/api/services/data-provider/ghostfolio-scraper-api/ghostfolio-scraper-api.service';
|
2022-01-08 18:19:25 +01:00
|
|
|
import { GoogleSheetsService } from '@ghostfolio/api/services/data-provider/google-sheets/google-sheets.service';
|
2022-02-10 09:39:10 +01:00
|
|
|
import { ManualService } from '@ghostfolio/api/services/data-provider/manual/manual.service';
|
2021-08-14 16:55:40 +02:00
|
|
|
import { RakutenRapidApiService } from '@ghostfolio/api/services/data-provider/rakuten-rapid-api/rakuten-rapid-api.service';
|
|
|
|
import { YahooFinanceService } from '@ghostfolio/api/services/data-provider/yahoo-finance/yahoo-finance.service';
|
|
|
|
import { PrismaModule } from '@ghostfolio/api/services/prisma.module';
|
2021-11-07 18:36:28 +01:00
|
|
|
import { SymbolProfileModule } from '@ghostfolio/api/services/symbol-profile.module';
|
2021-08-14 16:55:40 +02:00
|
|
|
import { Module } from '@nestjs/common';
|
|
|
|
|
|
|
|
import { AlphaVantageService } from './alpha-vantage/alpha-vantage.service';
|
|
|
|
import { DataProviderService } from './data-provider.service';
|
|
|
|
|
|
|
|
@Module({
|
2021-11-07 18:36:28 +01:00
|
|
|
imports: [
|
|
|
|
ConfigurationModule,
|
|
|
|
CryptocurrencyModule,
|
|
|
|
PrismaModule,
|
|
|
|
SymbolProfileModule
|
|
|
|
],
|
2021-08-14 16:55:40 +02:00
|
|
|
providers: [
|
|
|
|
AlphaVantageService,
|
|
|
|
DataProviderService,
|
|
|
|
GhostfolioScraperApiService,
|
2022-01-08 18:19:25 +01:00
|
|
|
GoogleSheetsService,
|
2022-02-10 09:39:10 +01:00
|
|
|
ManualService,
|
2021-08-14 16:55:40 +02:00
|
|
|
RakutenRapidApiService,
|
2021-10-11 13:32:21 -04:00
|
|
|
YahooFinanceService,
|
2021-10-20 15:41:40 -04:00
|
|
|
{
|
|
|
|
inject: [
|
|
|
|
AlphaVantageService,
|
|
|
|
GhostfolioScraperApiService,
|
2022-01-08 18:19:25 +01:00
|
|
|
GoogleSheetsService,
|
2022-02-10 09:39:10 +01:00
|
|
|
ManualService,
|
2021-10-20 15:41:40 -04:00
|
|
|
RakutenRapidApiService,
|
|
|
|
YahooFinanceService
|
|
|
|
],
|
|
|
|
provide: 'DataProviderInterfaces',
|
|
|
|
useFactory: (
|
|
|
|
alphaVantageService,
|
|
|
|
ghostfolioScraperApiService,
|
2022-01-08 18:19:25 +01:00
|
|
|
googleSheetsService,
|
2022-02-10 09:39:10 +01:00
|
|
|
manualService,
|
2021-10-20 15:41:40 -04:00
|
|
|
rakutenRapidApiService,
|
|
|
|
yahooFinanceService
|
|
|
|
) => [
|
|
|
|
alphaVantageService,
|
|
|
|
ghostfolioScraperApiService,
|
2022-01-08 18:19:25 +01:00
|
|
|
googleSheetsService,
|
2022-02-10 09:39:10 +01:00
|
|
|
manualService,
|
2021-10-20 15:41:40 -04:00
|
|
|
rakutenRapidApiService,
|
|
|
|
yahooFinanceService
|
|
|
|
]
|
2021-10-11 13:32:21 -04:00
|
|
|
}
|
2021-08-14 16:55:40 +02:00
|
|
|
],
|
|
|
|
exports: [DataProviderService, GhostfolioScraperApiService]
|
|
|
|
})
|
|
|
|
export class DataProviderModule {}
|