✨feature: Final mining touches, with closing contracts and negotiating new ones
This commit is contained in:
@@ -291,6 +291,34 @@ class SpacetradersApi {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fulfill a contract for the current agent.
|
||||
*
|
||||
* @param string $contractId The contract ID to fulfill.
|
||||
*
|
||||
* @return array<string,mixed>
|
||||
*/
|
||||
public function fulfillContract( string $contractId ): array {
|
||||
return $this->request(
|
||||
'POST',
|
||||
'/my/contracts/' . rawurlencode( $contractId ) . '/fulfill'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Negotiate a new contract using a ship.
|
||||
*
|
||||
* @param string $shipSymbol The ship symbol that will negotiate the contract.
|
||||
*
|
||||
* @return array<string,mixed>
|
||||
*/
|
||||
public function negotiateContract( string $shipSymbol ): array {
|
||||
return $this->request(
|
||||
'POST',
|
||||
'/my/ships/' . rawurlencode( $shipSymbol ) . '/negotiate/contract'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deliver cargo for a contract using a ship at the delivery destination.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user