VK API
It's in early stage, so we need your contribution
How to get access_token?
You can get it by 3 ways:
- Direct auth
- call
direct_auth()
method - or by this link:
https://api.vk.com/oauth/token?grant_type=password&client_id=2274003&scope=notify,photos,friends,audio,video,notes,pages,docs,status,questions,offers,wall,groups,messages,notifications,stats,ads,offline&client_secret=hHbZxrka2uZ6jB1inYsH&username=YOUR_PHONE_OR_MAIL&password=YOUR_PASSWORD
- call
- Service token
- Create you application here and copy service token
- Enter in your group, click Manage, in right menu click API usage and then create access_token Last way is a prefered way, because access_token of user has some limitations
Quick Guide
Your best friends are param!
macro and request
method!
let mut vk_api = VK new;
vk_api.set_access_token;
let mut params = param!;
let response = vk_api
.request
.await
.unwrap;
I want examples!
Here you go!
Plans
- Release first version
- Make direct auth
- Add LongPolling api support
- Make documentation
- Add to crates.io
- Make code more readable
- Add Buttons support
- Ensure that this crate is added to the VK SDK site
- Add graceful error handling
- Make file loading more easier(it works, but it still in progress)
- Make macroses
Thanks guys from Rust chat, namely:
@MikailBag, @ozkriff and Bulat Idiatullin