Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Pozo committed Jul 19, 2024
1 parent ce34400 commit e7f3f6a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import org.springframework.stereotype.Service


@Service
class GrabberService constructor(
class GrabberService(
@Autowired val producerTemplate: ProducerTemplate
) : GrabberAPI {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import com.github.pozo.investmentfunds.domain.RedisHashKey
import org.springframework.stereotype.Service

@Service
class RatesService() : RatesAPI {
class RatesService : RatesAPI {

override fun findAllRatesByISIN(isin: String): List<Rate> {
RedisService.jedis.pipelined().use { pipeline ->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,12 @@
package com.github.pozo.investmentfunds.api.sheets

import com.github.pozo.investmentfunds.api.redis.RedisService
import com.github.pozo.investmentfunds.domain.DataFlowConstants
import com.github.pozo.investmentfunds.domain.RateHeaders
import com.github.pozo.investmentfunds.domain.RedisHashKey
import org.springframework.stereotype.Service
import java.text.SimpleDateFormat

@Service
class SheetsService() : SheetsAPI {

private val format = SimpleDateFormat(DataFlowConstants.RATES_KEY_DATE_FORMAT.field)

// - **attribute** - [ OPTIONAL - "price" by default ] - The attribute to fetch about ticker from Google Finance and is required if a date is specified.
// - **start_date** - [ OPTIONAL ] - The start date when fetching historical data.
// - **end_date|num_days** - [ OPTIONAL ] - The end date when fetching historical data, or the number of days from start_date for which to return data.
// - **interval** - [ OPTIONAL ] - The frequency of returned data; either "DAILY" or "WEEKLY".
//
// =GoogleFinance("WCLD")
// =GoogleFinance("WCLD", "price")
// =GoogleFinance("WCLD", "price", TODAY()-3)
// =GoogleFinance("WCLD", "price", TODAY()-100, 100)
// =GoogleFinance("WCLD", "price", TODAY()-100, TODAY()-50)
class SheetsService : SheetsAPI {

override fun getRatesByIsinAndFilter(
isin: String,
Expand Down Expand Up @@ -74,5 +59,4 @@ class SheetsService() : SheetsAPI {
return emptyList()
}


}

0 comments on commit e7f3f6a

Please sign in to comment.