import {Module} from "@nestjs/common";
import {ConfigModule} from "@nestjs/config";
import {HttpModule} from "@nestjs/axios";
import {GoogleTrendsService} from "./google-trends.service";
import {RedditService} from "./reddit.service";
import {HackerNewsService} from "./hackernews.service";
import {RssService} from "./rss.service";
import {NewsApiService} from "./newsapi.service";
import {CollectorOrchestratorService} from "./collector-orchestrator.service";

@Module({
    imports: [
        ConfigModule,
        HttpModule.register({
            timeout: 15000,
            maxRedirects: 3,
        }),
    ],
    providers: [
        GoogleTrendsService,
        RedditService,
        HackerNewsService,
        RssService,
        NewsApiService,
        CollectorOrchestratorService,
    ],
    exports: [CollectorOrchestratorService, GoogleTrendsService],
})
export class CollectorModule {}
