GithubHelp home page GithubHelp logo

entiretwix / ccash Goto Github PK

View Code? Open in Web Editor NEW
26.0 1.0 4.0 1.45 MB

an external ledger for in-game economies, running on a webserver with a RESTful API, exceptionally fast and lightweight written in C++

License: GNU General Public License v2.0

CMake 0.14% C++ 89.46% C 10.33% Dockerfile 0.04% Shell 0.02%
cpp economy api minecraft

ccash's Introduction

ccash's People

Contributors

entiretwix avatar expand-sys avatar lbennett-stacki avatar stboyden avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ccash's Issues

Return Values are Ambiguous

Return values from multiple endpoints, especially from sending funds, are very ambiguous. It is difficult to tell what went wrong when errors are in binary format. Thus, I suggest a new error system in which number codes are utilized. This will not only be easy to implement at minimal performance cost but will also increase code clarity and decrease the aforementioned ambiguity.

Compliance with RFC Documents and Endpoint Suggestions

Normally, POST requests are meant to "provide partial modifications to a resource" and thus their bodies should be sparse and the known resource should be declared within the URI. Thus, the request body of a PATCH request should not be required to again hold the name.

Another endpoint I would suggest a change for is the POST request to get logs. Obviously this should be a GET request as we are acquiring information rather than giving it.

Furthermore, DELETE requests are suggested to have the target within their URI rather than within the body of the request.

Finally, I have a couple more suggestions that do not need to be considered at all. For the above changes and those stated in my other issue from today, a new API version should be introduced so as to not ruin compatibility and allow a movement whenever connected services are ready to do so. I request that this new version begin to follow a common scheme with the endpoint beginning as such: /api/V2. This can be accomplished by placing the class V2 within the namespace api which can also be used for subsequent versions and changes.

FInally, I would like to suggest a different way to authorize requests. After all my talk about following convention, I would like to suggest the use of a new header: "Password" (creative, eh.) This would hold the non-encrypted password without any other information. Using a header would most likely be much faster than using JSON if we take into account parsing it then accessing by string keys, and thus we will reduce the need for JSON in many endpoints. Admin passwords should have their own header called "Admin-Password" in case of an endpoint that needs both a user and administrator password in the future.

Thanks for being so supportive of suggestions thus far.

[BUG] ImpactBal int64_t

while very unlikely, it is possible to overflow a users balance (stored as uint32_t) with a sufficiently large ImpactBal amount argument

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.