Giter Club home page Giter Club logo

Comments (2)

lilgallon avatar lilgallon commented on September 22, 2024 1

I agree with you. In this PR: #23, I updated and fixed a few things in credentials module. To keep all the information exchanged by a partner, we will store its list of CredentialsRole (it includes countryCode / partyId).

Then in your implementation, you can extend PlatformRepository to add your custom methods to retrieve a Platform object from its countryCode / partyId or anything else.

As long as the ocpi-toolkit does not directly need countryCode / partyId to work, we do not need to add methods to retrieve this information in PlatformRepository. It's up to the user of the lib to implement its own method to return the right information in each OCPI endpoint.

I may miss something as I am currently only testing credentials and version module with real partners. I started working on Location module recently, that is why I found out that the lib needed to store countryCode / partyId.

I am not totally convinced about having a Platform domain object yet. Real world feedback may convice me, but for now I prefer that the user of the lib keeps freedom on their Platform definition

PS: I will rename Platform to Partner as platform is not really clear in PR #23

from ocpi-toolkit.

atschabu avatar atschabu commented on September 22, 2024

oh .. and maybe also a retrieval method for the identifiers, similar to the getEndpoints method

    suspend fun getPlatformIdentifiers(platformUrl: String): List<IdentifierPair>

... though at this point I wonder if it would be easier to have a Platform domain object, containing all this info (url, versions, endpoints, identifiers) so it is expandable, and simplifies the interface by removing a few getters

from ocpi-toolkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.