diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 5802d4be..acae3f0c 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -57,7 +57,7 @@ - [execute](./toolchain/sozo/world-commands/execute.md) - [register](./toolchain/sozo/world-commands/register.md) - [system](./toolchain/sozo/world-commands/system.md) - - [component](./toolchain/sozo/world-commands/component.md) + - [model](./toolchain/sozo/world-commands/model.md) - [events](./toolchain/sozo/world-commands/events.md) - [auth](./toolchain/sozo/world-commands/auth.md) - [Katana](./toolchain/katana/overview.md) diff --git a/src/toolchain/sozo/reference.md b/src/toolchain/sozo/reference.md index 7fe1983e..ecaba70f 100644 --- a/src/toolchain/sozo/reference.md +++ b/src/toolchain/sozo/reference.md @@ -17,6 +17,6 @@ - [execute](./world-commands/execute.md) - [register](./world-commands/register.md) - [system](./world-commands/system.md) -- [component](./world-commands/component.md) +- [model](./world-commands/model.md) - [events](./world-commands/events.md) - [auth](./world-commands/auth.md) diff --git a/src/toolchain/sozo/world-commands/component.md b/src/toolchain/sozo/world-commands/component.md deleted file mode 100644 index cae26d30..00000000 --- a/src/toolchain/sozo/world-commands/component.md +++ /dev/null @@ -1,69 +0,0 @@ -## sozo component - -`component` is used to interact with a World's components. It is useful for querying about a component's information, or a component value of an entity. - -### USAGE - -```sh -sozo component - -Commands: - get Get the class hash of a component - schema Retrieve the schema for a component - entity Get the component value for an entity -``` - -### SUBCOMMANDS - -#### `get` - -Get the class hash of a component - -```sh -sozo component get -``` - -##### Arguments - -_`NAME`_ -    The name of the component - -#### `schema` - -Retrieve the schema for a component - -```sh -sozo component schema -``` - -##### Arguments - -_`NAME`_ -    The name of the component - -#### `entity` - -Get the component value for an entity - -```sh -sozo component entity [KEYS]... -``` - -##### Arguments - -_`NAME`_ -     The name of the component - -_`KEYS`_ -     The keys of the entity that you want to query. -     Comma separated values e.g., 0x12345,0x69420,... - -### OPTIONS - -#### World Options - -{{#include ../common/world-options.md}} - -#### Starknet Options - -{{#include ../common/starknet-options.md}} diff --git a/src/toolchain/sozo/world-commands/model.md b/src/toolchain/sozo/world-commands/model.md new file mode 100644 index 00000000..a0fde16d --- /dev/null +++ b/src/toolchain/sozo/world-commands/model.md @@ -0,0 +1,71 @@ +# models + +## sozo model + +`model` is used to interact with a World's models. It is useful for querying about a model's information, or a model value of an entity. + +### USAGE + +```sh +sozo model + +Commands: + get Get the class hash of a model + schema Retrieve the schema for a model + entity Get the model value for an entity +``` + +### SUBCOMMANDS + +#### `get` + +Get the class hash of a model + +```sh +sozo model get +``` + +##### Arguments + +_`NAME`_ +    The name of the model + +#### `schema` + +Retrieve the schema for a model + +```sh +sozo model schema +``` + +##### Arguments + +_`NAME`_ +    The name of the model + +#### `entity` + +Get the model value for an entity + +```sh +sozo model entity [KEYS]... +``` + +##### Arguments + +_`NAME`_ +     The name of the model + +_`KEYS`_ +     The keys of the entity that you want to query. +     Comma separated values e.g., 0x12345,0x69420,... + +### OPTIONS + +#### World Options + +{{#include ../common/world-options.md}} + +#### Starknet Options + +{{#include ../common/starknet-options.md}}