jeyroik/extas-operations-jsonrpc-index

There is no license information available for the latest version (0.2.1) of this package.

Index operation for JSON RPC

0.2.1 2020-12-01 09:07 UTC

This package is auto-updated.

Last update: 2024-12-29 06:21:50 UTC


README

tests codecov.io PHPStan Enabled Extas Installer v3 Latest Stable Version Total Downloads Dependents

extas-operations-jsonrpc-index

Index operation for JSON RPC.

Спецификация

{
  "request": {
    "type": "object",
    "properties": {
      "select": {
      		"type": "array",
      		"items": {"type": "string"}
      	},
      	"filter": {
      		"type": "object",
      		"properties": {}
      	},
      	"sort": {
      		"type": "object",
      		"properties": {}
      	},
      	"limit": {
      		"type": "number"
      	},
      	"offset": {
      		"type": "number"
      	}
    }
  }
}

Пример запроса

{
  "id": "2f5d0719-5b82-4280-9b3b-10f23aff226b",
  "method": "snuff.index",
  "params": {
    "limit": 1,
    "offset": 0,
    "sort": {"name": -1},
    "select": ["name", "value"],
    "expand": ["snuff.item.description"],
    "filter": {
      "name": {
        "~": "test"
      }
    }
  }
}

Примечание возможности expand можно изучить в документации пакета extas-expands.