Version 1 vs 2
Version 1 vs 2
Content Changes
Content Changes
=Lists=
Getting list:
Request:
$result = $DVIP->get('/lists/get-list', array('list' => LIST));
Valid LIST type:
- blocked
- favorites
- ignored
- private
- requests
==Examples==
Success when list is empty:
{
"data": [],
"success": 1
}
Success when list have data:
{
"data": [
"1870705",
"1874923",
"1881969",
"1914392",
"2034177"
],
"success": 1
}
Error example:
{
"errors": [
"Invalid list name"
],
"success": 0
}
==Adding user to list==
Request:
$result = $DVIP->get('/lists/add-to-list', array('list' => LIST, 'user_id' => 1234));
Optional parameters:
- comment (string, why user is on that list)
Success:
{
"success": 1
}
Error example:
{
"errors": [
"Invalid list name"
],
"success": 0
}
==Removing user from list==
Request:
$result = $DVIP->get('/lists/remove-from-list', array('list' => LIST, 'user_id' => 1234));
Success:
{
"success": 1
}
Error:
{
"errors": [
"Invalid list name"
],
"success": 0
}
=Lists=
Getting list:
Request:
```lang=php
$result = $DVIP->get('/lists/get-list', array('list' => LIST));
```
Valid LIST type:
- blocked
- favorites
- ignored
- private
- requests
==Examples==
Success when list is empty:
```lang=json
{
"data": [],
"success": 1
}
```
Success when list have data:
```lang=json
{
"data": [
"1870705",
"1874923",
"1881969",
"1914392",
"2034177"
],
"success": 1
}
```
Error example:
```lang=json
{
"errors": [
"Invalid list name"
],
"success": 0
}
```
==Adding user to list==
Request:
```lang=php
$result = $DVIP->get('/lists/add-to-list', array('list' => LIST, 'user_id' => 1234));
```
Optional parameters:
- `comment` (string, why user is on that list)
Success:
```lang=json
{
"success": 1
}
```
Error example:
```lang=json
{
"errors": [
"Invalid list name"
],
"success": 0
}
```
==Removing user from list==
Request:
```lang=php
$result = $DVIP->get('/lists/remove-from-list', array('list' => LIST, 'user_id' => 1234));
```
Success:
```lang=json
{
"success": 1
}
```
Error:
```lang=json
{
"errors": [
"Invalid list name"
],
"success": 0
}
```
=Lists=
Getting list:
Request:
```lang=php
$result = $DVIP->get('/lists/get-list', array('list' => LIST));
```
Valid LIST type:
- blocked
- favorites
- ignored
- private
- requests
==Examples==
Success when list is empty:
```lang=json
{
"data": [],
"success": 1
}
```
Success when list have data:
```lang=json
{
"data": [
"1870705",
"1874923",
"1881969",
"1914392",
"2034177"
],
"success": 1
}
Error example:```
Error example:
```lang=json
{
"errors": [
"Invalid list name"
],
"success": 0
}
```
==Adding user to list==
Request:
```lang=php
$result = $DVIP->get('/lists/add-to-list', array('list' => LIST, 'user_id' => 1234));
```
Optional parameters:
- - `comment` (string, why user is on that list)
Success:
```lang=json
{
"success": 1
}
```
Error example:
```lang=json
{
"errors": [
"Invalid list name"
],
"success": 0
}
```
==Removing user from list==
Request:
```lang=php
$result = $DVIP->get('/lists/remove-from-list', array('list' => LIST, 'user_id' => 1234));
```
Success:
```lang=json
{
"success": 1
}
```
Error:
```lang=json
{
"errors": [
"Invalid list name"
],
"success": 0
}
```