Dota 2 Workshop Tools/Community/IRC/lebot: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with "== Overview == Lebot is RoyAwesome's API bot. It is responsible for maintaining the API page. Access to modifying the API info is res...")
 
Line 42: Line 42:


Looks up ''className'''s ''Property''.  Properties are <Code>Description, Accessor, BaseClass</code>
Looks up ''className'''s ''Property''.  Properties are <Code>Description, Accessor, BaseClass</code>
<code> .class add <rawhastebinLink> </code>
Adds a class to the Database.  The 2nd parameter must be a 'just text' link of a json blob hosted on hastebin.com.
Example class:
<source>
    {
      "ClassName": "Global",
      "Description": "Global functions.  These can be called without any class",
      "Accessor": "",
      "BaseClass": ""
    }
</source>


=== .param ===
=== .param ===

Revision as of 21:49, 10 August 2014

Overview

Lebot is RoyAwesome's API bot. It is responsible for maintaining the API page.

Access to modifying the API info is restricted to certain users. Ask RoyAwesome for permission to modify API content.

Usage

Lebot has 3 public functions, all preceded by a .

.function

.function searches through the api function database.

Usage:

.function

Reports back a help text

.function find [text]

Searches the API for any function that contains [text] and reports back the function name and API link

.function [functionName] <Modify|View> [Property] [optional: Data]

Looks up functionName's Property. Properties are Class, FunctionDescription, ReturnType, ReturnDescription, Example

.class

.class searches through the api function database.

Usage:

.class

Reports back a help text

.class find [text]

Searches the API for any class that contains [text] and reports back the class name.

.class [className] <Modify|View> [Property] [optional: Data]

Looks up className's Property. Properties are Description, Accessor, BaseClass

.class add <rawhastebinLink>

Adds a class to the Database. The 2nd parameter must be a 'just text' link of a json blob hosted on hastebin.com.

Example class:

    {
      "ClassName": "Global",
      "Description": "Global functions.  These can be called without any class",
      "Accessor": "",
      "BaseClass": ""
    }

.param

.class modifies or views a parameter as part of a function.

Usage:

.class

Reports back a help text

.class list [functionName]

Displays the parameters for functionName

.class [functionName] [paramID] <Modify|View> [Property] [optional: Data]

Looks up the parameter paramID in functionName. ParamIDs start indexing at 0.

Properties are Name, Type, Description