tristamoff / vk-api-schema
VK API JSON Schema
5.80.1
2018-07-02 11:11 UTC
README
此存储库包含JSON Schema文档,解释了此处提到的所有VK.COM API对象和方法。
JSON Schema标准规范和最常见的使用场景可以在此找到:https://json-schema.fullstack.org.cn/
这些方案与JSON Schema版本draft-06和VK API版本5.80兼容。
结构
存储库包含四个.json文件。
- "methods.json"描述了所有VK API方法(可在此页找到)。
- "objects.json"描述了在方法响应中使用到的对象。
- "responses.json"描述了方法响应结构。
- "schema.json"描述了我们实现中使用的附加关键字,例如"method"、"error"、"parameter"等,以便扩展规范以适应我们的需求。
示例
users.get方法描述
{ "name": "users.get", "description": "Returns detailed information on users.", "open": true, "parameters": [ { "name": "user_ids", "description": "User IDs or screen names ('screen_name'). By default, current user ID.", "type": "array", "items": { "type": "string" }, "maxItems": 1000 }, { "name": "domains", "type": "array", "items": { "type": "string" } }, { "name": "fields", "description": "Profile fields to return. Sample values: 'nickname', 'screen_name', 'sex', 'bdate' (birthdate), 'city', 'country', 'timezone', 'photo', 'photo_medium', 'photo_big', 'has_mobile', 'contacts', 'education', 'online', 'counters', 'relation', 'last_seen', 'activity', 'can_write_private_message', 'can_see_all_posts', 'can_post', 'universities';", "type": "array", "items": { "type": "string" } }, { "name": "name_case", "description": "Case for declension of user name and surname:; 'nom' — nominative (default); 'gen' — genitive ; 'dat' — dative; 'acc' — accusative ; 'ins' — instrumental ; 'abl' — prepositional", "type": "string" } ], "responses": { "response": { "$ref": "responses.json#/definitions/users_get_response" } } }
market_market_album对象描述
"market_market_album": { "type": "object", "properties": { "id": { "type": "integer", "description": "Market album ID", "minimum": 1 }, "owner_id": { "type": "integer", "description": "Market album owner's ID" }, "title": { "type": "string", "description": "Market album title" }, "count": { "type": "integer", "description": "Items number", "minimum": 0 }, "updated_time": { "type": "integer", "description": "Date when album has been updated last time in Unixtime", "minimum": 0 }, "photo": { "$ref": "#/definitions/photos_photo" } }, "required": [ "id", "owner_id", "title", "count", "updated_time" ], "additionalProperties": false }