{"id":13634700,"url":"https://github.com/ShellRechargeSolutionsEU/ocpi-endpoints","last_synced_at":"2025-04-18T23:32:41.184Z","repository":{"id":48374536,"uuid":"41747415","full_name":"ShellRechargeSolutionsEU/ocpi-endpoints","owner":"ShellRechargeSolutionsEU","description":"NewMotion implementation of common endpoints of the OCPI protocol, using Scala","archived":true,"fork":false,"pushed_at":"2021-07-29T09:20:24.000Z","size":1142,"stargazers_count":15,"open_issues_count":0,"forks_count":15,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-11-09T04:35:45.517Z","etag":null,"topics":["akka-http","circe","ocpi","scala","spray-json"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ShellRechargeSolutionsEU.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-01T15:37:11.000Z","updated_at":"2024-11-08T15:20:43.000Z","dependencies_parsed_at":"2022-08-24T14:49:47.733Z","dependency_job_id":null,"html_url":"https://github.com/ShellRechargeSolutionsEU/ocpi-endpoints","commit_stats":null,"previous_names":[],"tags_count":84,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShellRechargeSolutionsEU%2Focpi-endpoints","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShellRechargeSolutionsEU%2Focpi-endpoints/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShellRechargeSolutionsEU%2Focpi-endpoints/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShellRechargeSolutionsEU%2Focpi-endpoints/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShellRechargeSolutionsEU","download_url":"https://codeload.github.com/ShellRechargeSolutionsEU/ocpi-endpoints/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249565248,"owners_count":21292427,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["akka-http","circe","ocpi","scala","spray-json"],"created_at":"2024-08-02T00:00:30.991Z","updated_at":"2025-04-18T23:32:40.869Z","avatar_url":"https://github.com/ShellRechargeSolutionsEU.png","language":"Scala","funding_links":[],"categories":["Tools and Resources"],"sub_categories":["OCPI"],"readme":"# OCPI endpoints [![Build Status](https://travis-ci.org/NewMotion/ocpi-endpoints.png?branch=master)](https://travis-ci.org/NewMotion/ocpi-endpoints) ![Latest Version](https://img.shields.io/nexus/r/https/nexus.thenewmotion.com/com.thenewmotion.ocpi/ocpi-endpoints-common_2.12.svg)\n\nThe New Motion implementation of common endpoints of the OCPI protocol.\n\nSee http://github.com/ocpi/ocpi\n\n# Notions\nTo make clear when the parameters are about the application making use of the application or the party the application is\nconnecting to they are referred as: `our`/`us` or `theirs`/`them`\n\n# Usage\n\nSee the example app in the example folder.  You can run it with sbt by typing `project example` followed by `run`. \nOnce running you can make version requests with\n\n```\ncurl -X GET -H \"Authorization: Token abc\" \"http://localhost:8080/example/versions\"\n```\n\n# Serialization support\n\nYou can use either Circe (recommended) or Spray-Json for (de)serialization of JSON\n\n## Circe\n\nIn build.sbt\n\n```\nlibraryDependencies += \"com.thenewmotion.ocpi\" %% s\"ocpi-msgs-circe\" % \"\u003cversion\u003e\"\n```\n\nThen in the route or client you want to use\n\n```\nimport com.thenewmotion.ocpi.msgs.circe.v2_1.protocol._\n```\n\n## Spray Json\n\nIn build.sbt\n\n```\nlibraryDependencies += \"com.thenewmotion.ocpi\" %% s\"ocpi-msgs-spray-json\" % \"\u003cversion\u003e\"\n```\n\nThen in the route or client you want to use\n\n```\nimport com.thenewmotion.ocpi.msgs.sprayjson.v2_1.protocol._\n```\n\n## cats-effect support\nTo be able to pass IO as the effect type, import marshaller instances for it:\n\n`import com.thenewmotion.ocpi.common.HktMarshallableInstances._`\n\n\n\n# Changelog\n\n## 2.0.0-M1\nMigrate effect type to cats-effect IO.\nAt the core, we still use akka-http for routes and clients so we need the typical akka implicits. \nStream sources are also still using akka-stream.\nBut at the interface to the backend services implemented by the calling application code, IO (or ZIO) can be\nused to model effect types.\n\nIn the following phases, we should migrate further to http4s, sttp (?) and fs2. \n\n\n## 1.3.0\n- allow passing of page limit from client code\n- increase unmarshalling timeout to handle higher page sizes\n- handle omitted `.data` field (when a list is expected but its empty)\n\n## 1.2.3\n- fix parsing of time without leading zeros; 2nd try\n\n## 1.2.2\n- Don't log credentials during registration\n- fix parsing of time without leading zeros\n- handle missing `twentyfourseven` field in `hours` object \n\n## 1.2.1\nRedact auth header before logging request\n\n## 1.2.0\nUpdate to Circe 0.12.3\n\n## 1.0.0\n\nUpdate dependencies\n\n## 0.10.6\n\nBugfix so that users of the CommandClient do not need to provide a JSON deserializer that can handle Either\n\n## 0.10.5\n\n* Make commands module compatible with OCPI 2.1.1-d2\n\n## 0.7.10\n\n* Pass the requester's globalPartyId to MspTokenService methods\n* Stop passing the ExecutionContext from Routes into Services in some cases\n\n## 0.7.9\n\n* Require non empty ids\n* Improved Generic merging or patches using Shapeless \n* Validation for Latitude and Longitude\n\n## 0.7.8\n\n* Tokens Client for CPO Tokens module\n* Don't include akka-http-spray-json anymore, as spray json is optional\n\n## 0.7.7 \n\n* Many of the modules have a method such as createOrUpdate*, this method used to take both an id from the url\nand an object.Now, they only take an object, and the validation that the id of the url and and the id from\nthe object are validated by the library\n* Remove the id fields from the Patch object, as the id cannot be changed  \n\n## 0.7.6\n\n* Added Sessions module\n* When using a route or a client, you will need to import the Circe or Spray Json modules, as above\n* You no longer need to use `new` to create a route, each one has a companion object, and then the route can be\nused directly instead of having to use the `.route` method.  See the ExampleApp.\n* Many of the services previously had methods returning `Future[Either[SessionError, Boolean]]` where\na `Right(true)` meant the record has been updated and a `Right(false)` meant it was updated.  This has\nbeen replaced by `Right(Created)` and `Right(Updated)` \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FShellRechargeSolutionsEU%2Focpi-endpoints","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FShellRechargeSolutionsEU%2Focpi-endpoints","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FShellRechargeSolutionsEU%2Focpi-endpoints/lists"}