| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
The New Motion implementation of common endpoints of the OCPI protocol.
See http://github.com/ocpi/ocpi
To make clear when the parameters are about the application making use of the application or the party the application is connecting to they are referred as: our/us or theirs/them
See the example app in the example folder. You can run it with sbt by typing project example followed by run. Once running you can make version requests with
curl -X GET -H "Authorization: Token abc" "http://localhost:8080/example/versions"
You can use either Circe (recommended) or Spray-Json for (de)serialization of JSON
In build.sbt
libraryDependencies += "com.thenewmotion.ocpi" %% s"ocpi-msgs-circe" % "<version>"
Then in the route or client you want to use
import com.thenewmotion.ocpi.msgs.circe.v2_1.protocol._
In build.sbt
libraryDependencies += "com.thenewmotion.ocpi" %% s"ocpi-msgs-spray-json" % "<version>"
Then in the route or client you want to use
import com.thenewmotion.ocpi.msgs.sprayjson.v2_1.protocol._
To be able to pass IO as the effect type, import marshaller instances for it:
import com.thenewmotion.ocpi.common.HktMarshallableInstances._
Migrate effect type to cats-effect IO. At the core, we still use akka-http for routes and clients so we need the typical akka implicits. Stream sources are also still using akka-stream. But at the interface to the backend services implemented by the calling application code, IO (or ZIO) can be used to model effect types.
In the following phases, we should migrate further to http4s, sttp (?) and fs2.
Redact auth header before logging request
Update to Circe 0.12.3
Update dependencies
Bugfix so that users of the CommandClient do not need to provide a JSON deserializer that can handle Either
| Back | FazBrowse Home | New Git URL |