app / de.uniks.codliners.stock_simulator.network

Package de.uniks.codliners.stock_simulator.network

Types

CoinGeckoApi

The CoinGecko API interface.

interface CoinGeckoApi

CoinGeckoMarketChart

Timestamp and price data points of a CoinGecko cryptocurrency.

data class CoinGeckoMarketChart

CoinGeckoMarketData

Market data of a CoinGecko cryptocurrency.

data class CoinGeckoMarketData

CoinGeckoQuote

Quote information of a CoinGecko cryptocurrency.

data class CoinGeckoQuote

CoinGeckoSymbol

Symbol information of a CoinGecko cryptocurrency.

data class CoinGeckoSymbol

IEXApi

The IEX API interface.

interface IEXApi

IEXHistoricalPrice

Price data point for an IEX share.

data class IEXHistoricalPrice

IEXQuote

Quote information of an IEX share.

data class IEXQuote

IEXSymbol

Symbol information of an IEX share.

data class IEXSymbol

NetworkService

Provides instances for various APIs.

object NetworkService

Extensions for External Classes

kotlin.collections.List

Properties

COINGECKO_BASE_URL

The CoinGecko API's base url, to which endpoints are concatenated.

const val COINGECKO_BASE_URL: <ERROR CLASS>

IEX_API_BASE_URL

The IEX API's base url, to which endpoints are concatenated. Should be the sandbox endpoint for development and the live data endpoint for production.

const val IEX_API_BASE_URL: <ERROR CLASS>

IEX_API_TOKEN

An IEX API token. Should be the sandbox token for development and the live data token for production.

const val IEX_API_TOKEN: <ERROR CLASS>

moshi

An instance of the JSON parser moshi.

val moshi: Moshi

Functions

asDomainHistoricalPrice

Transforms an IEXHistoricalPrice to an equivalent HistoricalPrice.

fun IEXHistoricalPrice.asDomainHistoricalPrice(id: String): HistoricalPrice

asDomainQuote

Transforms a CoinGeckoQuote to an equivalent Quote.

fun CoinGeckoQuote.asDomainQuote(): Quote

Transforms an IEXQuote to an equivalent Quote.

fun IEXQuote.asDomainQuote(): Quote

asDomainSymbol

Transforms a CoinGeckoSymbol to an equivalent Symbol.

fun CoinGeckoSymbol.asDomainSymbol(): Symbol

Transforms an IEXSymbol to an equivalent Symbol.

fun IEXSymbol.asDomainSymbol(): Symbol

asHistoricalPrices

Transforms a CoinGeckoMarketChart to an equivalent List of HistoricalPrices.

fun CoinGeckoMarketChart.asHistoricalPrices(id: String): List<HistoricalPrice>