esi / esi-issues

Issue tracking and feature requests for ESI
https://esi.evetech.net/
207 stars 23 forks source link

Alliance level contracts endpoint #1218

Open shdwpuppet opened 4 years ago

shdwpuppet commented 4 years ago

Feature Request

Expanding the current contract endpoints to include "to alliance" contracts.

Use case

This would be primarily used by Alliance level industrialists or officers in charge of ensuring that doctrines are well stocked, but could be used by all people who regularly browse alliance contracts, and in SEAT/similar software to help track contracts assigned to the alliance without having to make multiple pulls based on every character.

As of right now, the only way to get all contracts assigned to an alliance is to have everyone who makes those contracts authed to a service that then pulls /character/character_id/contracts, filters them by the entity they are assigned to, and collated that way. This is a huge amount of API calls for a large alliance and is also unnecessarily invasive for people who don't want the entire contract history of the entire alliance being exposed.

Additionally, the bids and items endpoints would also be added for alliance contracts.

Alternatively, could change the existing /contracts/corporation endpoints to also accept an alliance ID as the assignee and return the data that way.

Authentication

The route would require auth to the same degree that corporation contracts do. In game, anyone in an alliance is already able to see a contract that is assigned to the alliance and accept it.

Example return

The return would be fundamentally identical to both the /character/contracts and corporation/contracts returns, just with an assignee ID that could also be an alliance ID.

Checklist

Check all boxes that apply to this issue:

Lucius-Q-User commented 4 years ago

Asking for corporation contracts with any corp in the alliance will return alliance contracts

curl https://esi.evetech.net/v1/corporations/667531913/contracts/ results in this one among others


{
    "acceptor_id": 0,
    "assignee_id": 1354830081,
    "availability": "personal",
    "collateral": 0.0,
    "contract_id": REDACTED,
    "date_expired": REDACTED,
    "date_issued":REDACTED,
    "days_to_complete": 0,
    "end_location_id":REDACTED,
    "for_corporation": false,
    "issuer_corporation_id": REDACTED,
    "issuer_id": REDACTED,
    "price": REDACTED,
    "reward": 0.0,
    "start_location_id": REDACTED,
    "status": "outstanding",
    "title": REDACTED,
    "type": "item_exchange",
    "volume": REDACTED
}```
TkTech commented 7 months ago

This is still desperately needed for tool builders. A character should be able to see all contracts via the API that they can see in game. It's not reasonable to depend a corp officer grant roles to 3rd party programs just to see contracts. This is foundational, essential functionality for seeding tools.

Is ESI officially on life-support?

recursivetree commented 4 months ago

Is ESI officially on life-support?

It is so much on life support, that they don't even announce that it is on life support.

But yes, I agree a n alliance contracts endpoint would be extremely useful.