Crates.io | rvk_methods |
lib.rs | rvk_methods |
version | 0.1.0 |
source | src |
created_at | 2022-06-11 18:19:41.67033 |
updated_at | 2022-06-11 18:19:41.67033 |
description | Crate providing methods of VK (VKontakte) API |
homepage | |
repository | https://github.com/u32i64/rvk |
max_upload_size | |
id | 604174 |
size | 43,985 |
This crate provides VK API methods to avoid the need to specify them as strings.
It has two complementary crates: rvk
(which this crate depends on
to actually call the methods) and rvk_objects
, which provides objects.
These crates can also be used separately.
Note that for rvk_methods
and rvk_objects
, the supported versions of the VK API may be different.
Consult the API_VERSION
constant in these crates to learn which versions they support.
See here for an example of using all 3 crates.
Rust prefers snake_case
in the function names instead of camelCase
used by the VK API,
which means all of the API method's corresponding functions are named using snake_case
.
Example: To call the appWidgets.getAppImageUploadServer
API method, use the rvk::methods::app_widgets::get_app_image_upload_server
function.
execute
The execute
method has no category, so its path is rvk::methods::execute
.
photos.move
Since move
is a Rust keyword, the function for calling photos.move
API method is rvk::methods::photos::move_
(with the underscore!)