mirror of https://github.com/ghostfolio/ghostfolio
12 changed files with 108 additions and 23 deletions
@ -0,0 +1,43 @@ |
|||||
|
import { LookupItem } from '@ghostfolio/api/app/symbol/interfaces/lookup-item.interface'; |
||||
|
import { DataProviderInterface } from '@ghostfolio/api/services/data-provider/interfaces/data-provider.interface'; |
||||
|
import { |
||||
|
IDataProviderHistoricalResponse, |
||||
|
IDataProviderResponse |
||||
|
} from '@ghostfolio/api/services/interfaces/interfaces'; |
||||
|
import { Granularity } from '@ghostfolio/common/types'; |
||||
|
import { Injectable } from '@nestjs/common'; |
||||
|
import { DataSource } from '@prisma/client'; |
||||
|
|
||||
|
@Injectable() |
||||
|
export class ManualService implements DataProviderInterface { |
||||
|
public constructor() {} |
||||
|
|
||||
|
public canHandle(symbol: string) { |
||||
|
return false; |
||||
|
} |
||||
|
|
||||
|
public async get( |
||||
|
aSymbols: string[] |
||||
|
): Promise<{ [symbol: string]: IDataProviderResponse }> { |
||||
|
return {}; |
||||
|
} |
||||
|
|
||||
|
public async getHistorical( |
||||
|
aSymbols: string[], |
||||
|
aGranularity: Granularity = 'day', |
||||
|
from: Date, |
||||
|
to: Date |
||||
|
): Promise<{ |
||||
|
[symbol: string]: { [date: string]: IDataProviderHistoricalResponse }; |
||||
|
}> { |
||||
|
return {}; |
||||
|
} |
||||
|
|
||||
|
public getName(): DataSource { |
||||
|
return DataSource.MANUAL; |
||||
|
} |
||||
|
|
||||
|
public async search(aQuery: string): Promise<{ items: LookupItem[] }> { |
||||
|
return { items: [] }; |
||||
|
} |
||||
|
} |
|
Loading…
Reference in new issue