...
To create a new object. On success, the method always returns the internal object id of the newly created objectParameters:
{
| Code Block |
|---|
| language | js |
|---|
| title | Parameters |
|---|
|
{
"attrs":{list of attribute value pairs}
} |
...
...
...
"result":{"id":the id of the newly created object} |
...
Examples:
Method:/user/create
| Code Block |
|---|
| language | js |
|---|
| title | Parameters |
|---|
|
...
...
...
...
...
...
| Code Block |
|---|
|
{
"error":0,
"result":{"id": |
...
-------------------------------------------------------------------
Method:/usertoken/create
| Code Block |
|---|
| language | js |
|---|
| title | Parameters |
|---|
|
...
...
...
{
"user.id":"user id",
"product.id":"product id"
}
} |
| Code Block |
|---|
|
{
"error":0,
"result":{"id": |
...
| Anchor |
|---|
| _Toc341972292 |
|---|
| _Toc341972292 |
|---|
|
/
| Anchor |
|---|
| _Toc315972316 |
|---|
| _Toc315972316 |
|---|
|
object/delete
To delete an object. The request parameter MUST be the internal id of the object to be deleted. On success the method returns error 0.
Parameters: {"id":the id of the object to be deleted}
Response: {"error":0}
Example:
Method:/user/delete
| Code Block |
|---|
| language | js |
|---|
| title | Parameters |
|---|
|
...
...
...
| Anchor |
|---|
| _Toc341972293 |
|---|
| _Toc341972293 |
|---|
|
/
| Anchor |
|---|
| _Toc315972317 |
|---|
| _Toc315972317 |
|---|
|
object/get
...
To set the object's attributes. The request must provide a list of attributes and values that are to be set. On success the method returns error 0.Parameters:
{
| Code Block |
|---|
| language | js |
|---|
| title | Parameters |
|---|
|
{
"id":"the id of the object to be edited", |
...
"attrs":{list of attribute pairs}
} |
...
...
Example:
Method:/user/set
| Code Block |
|---|
| language | js |
|---|
| title | Parameters |
|---|
|
...
...
...
...
...
...
| Anchor |
|---|
| _Toc341972295 |
|---|
| _Toc341972295 |
|---|
|
/
| Anchor |
|---|
| _Toc315972319 |
|---|
| _Toc315972319 |
|---|
|
object/search
...