2018-09-22 19:25:48 -05:00
|
|
|
.. _netscriptcodingcontractapi:
|
|
|
|
|
|
|
|
Netscript Coding Contract API
|
|
|
|
=============================
|
|
|
|
Netscript provides the following API for interacting with
|
|
|
|
:ref:`codingcontracts`.
|
|
|
|
|
|
|
|
**The Coding Contract API must be accessed through the 'codingcontract' namespace**
|
|
|
|
|
|
|
|
In :ref:`netscript1`::
|
|
|
|
|
|
|
|
codingcontract.getDescription("foo.cct", "home");
|
|
|
|
codingcontract.attempt(1, "foo.cct", "foodnstuff");
|
|
|
|
|
|
|
|
In :ref:`netscriptjs`::
|
|
|
|
|
|
|
|
ns.codingcontract.getDescription("foo.cct", "home");
|
|
|
|
ns.codingcontract.attempt(1, "foo.cct", "foodnstuff");
|
|
|
|
|
2019-03-02 19:08:54 -08:00
|
|
|
.. toctree::
|
2018-09-22 19:25:48 -05:00
|
|
|
|
2019-03-02 19:08:54 -08:00
|
|
|
attempt() <codingcontractapi/attempt>
|
|
|
|
getContractType() <codingcontractapi/getContractType>
|
|
|
|
getDescription() <codingcontractapi/getDescription>
|
|
|
|
getData() <codingcontractapi/getData>
|
|
|
|
getNumTriesRemaining() <codingcontractapi/getNumTriesRemaining>
|