Jump to content

API Enhancement


hadesflames
 Share

Recommended Posts

You should add an authenticated API feature to allow alliance leaders to collect certain data that they should be able to see from their members. For example, when you're logged in and you're an alliance leader, you can see your members spies. So if authenticated you would be able to see how many spies a member has in the API pull for /api/nation/id=xxxxx

 

You should also add cash and resources to a properly authenticated API pull on /api/nation/id=xxxxx for alliance leaders, to facilitate collecting accurate and up to date warchest data. Alliance leaders already collect their members warchest data, this just makes it easier to do so as not to have to make members install silly plugins to send their nation page source or force them to have to send their warchest info to their alliance however often their alliance requires.

 

As for adding authenticated calls, the easiest way would be to add in a way to generate and access key in your account. Then your access key is tied to your nation, and you can access the api as usual using /api/nation/id=xxxxx to get non-authenticated info on a nation (i.e. what we already get today) and you would add something like /api/nation/id=xxxxx/key={unique_id} to access authenticated info. If the nation with id xxxxx is in that person's AA, they get all of the info. If they're not, then they would get the same data you would if you weren't authenticated.

 

Also, if you plan on adding a paywall to the API, which I'm totally fine with, you would need to add authentication to your API anyway. So may as well do it.

  • Upvote 1

gkt70Td.png

Link to comment
Share on other sites

Not just Leader, but Heirs and Officers too (possibly new setting as to who can get via API).

 

And I'd love this, as it'd solve the issue of having to get lazy people to report information ;)

 

Information I'd consider useful from a Nation:

- Spies

- Resources/Money from toolbar (possibly Credits too)

- Gross Income/Expenses

- Resource Production (including Manufacturing)

- Resource Usage (including Manufacturing), before reductions from Alliance Taxes and Radiation are calculated

 

I'd also like similar for an Alliance, to return:

- Alliance Tax Rate (Resources/Money)

- Current Alliance Bank (Resources/Money)

sig_cybernations.PNG.8d49a01423f488a0f1b846927f5acc7e.PNG

Link to comment
Share on other sites

Information I'd consider useful from a Nation:

- Gross Income/Expenses

- Resource Production (including Manufacturing)

- Resource Usage (including Manufacturing), before reductions from Alliance Taxes and Radiation are calculated

 

These can be calculated with information already freely provided by the API.

 

 

Not just Leader, but Heirs and Officers too (possibly new setting as to who can get via API).

 

By leaders I meant members of government, not literally people in the leader AA position. =p

Edited by hadesflames

gkt70Td.png

Link to comment
Share on other sites

These can be calculated with information already freely provided by the API.

 

Gross Monetary Income is a pain in the ass to calculate though :P And I can never 100% accurate, probably due to rounding errors (on my part or Alex's).

sig_cybernations.PNG.8d49a01423f488a0f1b846927f5acc7e.PNG

Link to comment
Share on other sites

Gross Monetary Income is a pain in the ass to calculate though :P And I can never 100% accurate, probably due to rounding errors (on my part or Alex's).

My calculations are pretty spot on, and you only have to code it once. =p

 

@Alex can we get a comment in here or something? I'll even code this suggestion in for you so you don't have to, as well as the authentication and paywall if you add it.

gkt70Td.png

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.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and the Guidelines of the game and community.