-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Nickolay edited this page Mar 2, 2016
·
11 revisions
GET : http://example.com/api/v1.0/radon_terms/{QUERY}
name | тип | required | source | description |
---|---|---|---|---|
key | string | yes | param | Authorisation key. |
Example: http://example.com/api/v1.0/radon_terms?key=123
Responce:
[
{
"id": "34",
"title": "dreg",
"category": "Tags",
"system_title": "tags"
},
{
"id": "25",
"title": "clipracobrus",
"category": "Uaanuvidri",
"system_title": "uanuvidri"
}
]
POST : http://example.com/api/v1.0/radon_nodes
name | тип | required | source | description |
---|---|---|---|---|
key | string | yes | post body | Authorisation key. |
publication | array | yes | post body | Node object. |
user | array | yes | post body | User with email |
Create example:
{
"key": "123",
"publication": {
"title": "Мой заголовок",
"type": "article",
"body": "Мое содержимое",
"summary": "Мое саммари",
"category_field_tags": "gacruseuos",
"category_field_another_terms": ["thobuu", "pr", "trevajamo"],
"file_field_images": "https://www.google.ru/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png",
"file_alt_field_images": "Test alt",
"file_title_field_images": "Test title",
"promote": 0,
"metatags": {
"og:title": {
"value": "Test1"
},
"og:description": {
"value": "Test2"
}
}
},
"user": {
"email": "dan@ra-don.ru"
}
}
Responce:
{
"id": "154"
}
Update example:
{
"key": "123",
"publication": {
"id": 154,
"title": "Мой заголовок обновлен",
"type": "article",
"body": "Мое содержимое обновлено",
"summary": "Мое саммари тоже обновлено",
"category_field_tags": "gacruseuos",
"category_field_another_terms": ["thobuu", "pr", "trevajamo"],
"file_field_images": ["https://yastatic.net/morda-logo/i/arrow2/logo_simple.png",
"https://www.google.ru/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"]
},
"user": {
"email": "admin@example.com"
}
}
Responce:
{
"id": "154"
}
Чтобы удалить все значения у категории передайте значение "None", например:
{
"key": "123",
"publication": {
"id": 154,
"title": "Мой заголовок обновлен",
"type": "article",
"body": "Мое содержимое обновлено",
"summary": "Мое саммари тоже обновлено",
"category_field_tags": "None",
"category_field_another_terms": "None"
},
"user": {
"email": "admin@example.com"
}
}
POST : http://example.com/api/v1.0/radon_user
name | тип | required | source | description |
---|---|---|---|---|
key | string | yes | post body | Authorisation key. |
user | array | yes | post body | The user object |
Example:
{
"key": "123",
"user": {
"name": "My test user",
"mail": "mytest@example.com",
"pass": "123456"
}
}
Responce:
{
"uid": "167"
}
POST : http://example.com/api/v1.0/radon_user_disable
name | тип | required | source | description |
---|---|---|---|---|
key | string | yes | post body | Authorisation key. |
string | yes | post body | The user email |
Example:
{
"key": "123",
"mail": "mytest@example.com"
}
Responce:
[
true
]
POST : http://example.com/api/v1.0/radon_user_delete
name | тип | required | source | description |
---|---|---|---|---|
key | string | yes | post body | Authorisation key. |
string | yes | post body | The user email |
Example:
{
"key": "123",
"mail": "mytest@example.com"
}
Responce:
[
true
]