Jump to content
MakeWebGames

In-Production MCC API


Recommended Posts

Hello all,

Don't know if anyone is interested but I am making an API (basic) for MCC V2.

Currently it supports logging in (I need to do registration), viewing your own player data, and messages (reading/composing). Also I am making some extra plugins for it as I see fit and currently have banking created.

If anyone is interested I may open source it if there is a great enough response about it.

  • Like 2
Link to comment
Share on other sites

Well let me talk about it in a little bit more detail because it's going to take more than one person for me to release it to the public ;)

This application uses JWT (JSON Web Tokens) to handle authentication. By default it's set to not expire until the user decides to logout of the application. There is an environment variable to change this if you wish to set a TTL (Time To Live) on it.

As far as th App developer is concerned they just need to pass in the token with each request either in the header or as a query string.

As you can see from the sample data that is returned with the users information, it shows pretty much all relevant data that you would need for like a "header" or "index" page with some mutators to make life easy on the developer. For example, it uses some of the Carbon lib to parse timestamps to human readable form along with the actual timestamp as well.

There are other mutators for the stats to which are just like a simple number format, money formatter for currency and percentages for the stats.

Reminder for myself:

Make percentages also go from 0-1 because swift likes those for things like bars

For the messages it shows a paginated result set and it shows basic info like subject, is it read yet, time sent, who sent it.

But like I said, I may open source it but if not I may put it up for like $20-$30 bucks.

This also comes with a pretty neat module system to expand it some more made by Ping Pong Labs which with one simple artisan command you have everything generated for you that you will need.

This is made using Laravel, I could have used Lumen for it but things just work better on Laravel otherwise I would have to change a lot of libraries around and the whole app would mess up if you ran an update through composer.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...