SEWebAPI
SEWebAPI copied to clipboard
expose and modify ownership of block
Allow user to GET ownership and shared status of a block in a grid. Also, allow for PUTing a new ownership level (though this may be game breaking, as we don't steam auth the REST caller).
Read only ownership of blocks across a whole grid will be used in notifications in the MVP
PROVIDES: This would allow me to automate "trade ships" through SEWA.
GET http://sewa.mine.nu/4Cl0xlirgcOOJ7SU/blocks
[
{
"name": "Merge Block 2",
"type": "MyShipMergeBlock",
"id": 114136464328695936,
"properties": {
"OnOff": "True",
"ShowInTerminal": "True",
"ShowInToolbarConfig": "True",
"ShowOnHUD": "False"
},
"ownership": {
"owner": "user1234",
"shared": "no share"
}
},
{
"name": "Connector 3",
"type": "MyShipConnector",
"id": 74273192742834355,
"properties": {
"OnOff": "True",
"ShowInTerminal": "True",
"ShowInToolbarConfig": "True",
"ShowOnHUD": "False",
"ThrowOut": "False",
"CollectAll": "False",
"Strength": "0.00015"
},
"ownership": {
"owner": "user1234",
"shared": "faction"
}
},.......
And to modify ownership / sharing:
PUT http://server.dom/MagicGridID/blocks
Content-Type:application/json
{
"data":
[
{
"id": 120295775471435265,
"action": "ownership",
"owner": "user54321"
}
]
}
and for sharing:
PUT http://server.dom/MagicGridID/blocks
Content-Type:application/json
{
"data":
[
{
"id": 120295775471435265,
"action": "sharing",
"owner": "all"
}
]
}