-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(doc): add docs documentationš¤«š
- Loading branch information
Showing
10 changed files
with
162 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
### `docs.add` š° | ||
|
||
Adds document to user collection | ||
|
||
**Params**: | ||
|
||
|Name|Value|Description| | ||
|--|--|--| | ||
|`owner_id`|unsigned int|ID of owner| | ||
|`doc_id`|unsigned int|ID of document| | ||
|`access_key`|string|Access key| | ||
|
||
**Result** | ||
|
||
Returns id of new document | ||
|
||
**Possible errors**: | ||
|
||
|Code|Description| | ||
|--|--| | ||
|1150|Invalid document id| | ||
|100|One of the parameters specified was missing or invalid: this document already added| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
### `docs.delete` š° | ||
|
||
Deletes document from user collection. | ||
|
||
**Params**: | ||
|
||
|Name|Value|Description| | ||
|--|--|--| | ||
|`owner_id`|unsigned int|ID of owner| | ||
|`doc_id`|unsigned int|ID of document| | ||
|
||
**Result** | ||
|
||
Returns 1 on success. | ||
|
||
**Possible errors**: | ||
|
||
|Code|Description| | ||
|--|--| | ||
|1150|Invalid document id| | ||
|1153|Access to document is denied| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
### `docs.edit` š° | ||
|
||
Edits document | ||
|
||
**Params**: | ||
|
||
|Name|Value|Description| | ||
|--|--|--| | ||
|`owner_id`|unsigned int|ID of owner| | ||
|`doc_id`|unsigned int|ID of document| | ||
|`title`|string|New title| | ||
|`tags`|csv|New tags| | ||
|`folder_id`|int|New folder id (0, 3)| | ||
|`owner_hidden`|bool (0,1)|Is owner hidden| | ||
|
||
**Result** | ||
|
||
Returns 1 on success. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
### `docs.get` š° | ||
|
||
Edits document | ||
|
||
**Params**: | ||
|
||
|Name|Value|Description| | ||
|--|--|--| | ||
|`count`|unsigned int|Count| | ||
|`offset`|unsigned int|Offset| | ||
|`type`|int|VK API type of document| | ||
|`owner_id`|int|Owner ID| | ||
|`return_tags`|bool (0, 1)|Return "tags" field| | ||
|`order`|int (0,1,2)| | | ||
|
||
**Result** | ||
|
||
Returns `count` and `items` fields. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
### `docs.getById` š° | ||
|
||
Gets docs by ids | ||
|
||
**Params**: | ||
|
||
|Name|Value|Description| | ||
|--|--|--| | ||
|`docs`|csv array|Ids of documents| | ||
|`return_tags`|bool (0, 1)|Return "tags" fields| | ||
|
||
**Result** | ||
|
||
Returns documents objects array. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
### `docs.getTags` š° | ||
|
||
**Non-standart method** | ||
|
||
Returns tags array from user/club documents. | ||
|
||
**Params**: | ||
|
||
|Name|Value|Description| | ||
|--|--|--| | ||
|`owner_id`|unsigned int|Owner id| | ||
|`type`|unsigned int|type (0ā8)| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
### `docs.getTypes` š° | ||
|
||
Returns types of uploaded documents | ||
|
||
**Params**: | ||
|
||
|Name|Value|Description| | ||
|--|--|--| | ||
|`owner_id`|unsigned int|Owner id| | ||
|
||
**Result** | ||
|
||
Returns `count` and `items` fields. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
### `docs.search` š° | ||
|
||
Searches public documents | ||
|
||
**Params**: | ||
|
||
|Name|Value|Description| | ||
|--|--|--| | ||
|`q`|string|Query| | ||
|`search_own`|bool|Search by own documents| | ||
|`order`|unsigned int|Order (0, 1, 2)| | ||
|`count`|unsigned int|Count| | ||
|`offset`|unsigned int|Offset| | ||
|`return_tags`|bool|Return "tags" fields| | ||
|`type`|unsigned int|VK API type of document| | ||
|`tags`|string|Include "tags" to the search| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Document object | ||
|
||
| Property | Value | Description | | ||
|---|---|---| | ||
|`id`|int|Document id| | ||
|`owner_id`|int|Document owner id| | ||
|`title`|string|Document title| | ||
|`size`|int|Document size| | ||
|`ext`|string|Document extension| | ||
|`url`|string|Document URL| | ||
|`date`|timestamp|Document upload time| | ||
|`type`|range(1-8)|Document VK API type| | ||
|`is_hidden`|bool|Is owner hidden| | ||
|`folder_id`|int|0 ā private, 3 ā public| | ||
|`access_key`|string|Access key| | ||
|`can_manage`|bool|Can current user modify this document| | ||
|`preview`|array|Contains photo object with preview (on images)| | ||
|`tags`|array|Tags array| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters