com.qvantel.jsonapi.ApiEndpoint.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jsonapi-scala-core_2.13 Show documentation
Show all versions of jsonapi-scala-core_2.13 Show documentation
jsonapi.org scala implementation
The newest version!
package com.qvantel.jsonapi
import cats.effect.IO
import io.lemonlabs.uri.Url
import com.qvantel.jsonapi.ApiEndpoint.Config
trait ApiEndpoint {
def config: IO[Config]
}
object ApiEndpoint {
final case class Config(url: Url, headers: Map[String, String])
final case class Static(static: Url, headers: Map[String, String] = Map()) extends ApiEndpoint {
override val config: IO[Config] = IO.pure(Config(static, headers))
}
final case class Dynamic(config: IO[Config]) extends ApiEndpoint
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy