awaitlink / rvk Goto Github PK
View Code? Open in Web Editor NEW:package: A set of crates for easy access to the VK (VKontakte) API
Home Page: https://docs.rs/rvk
License: MIT License
:package: A set of crates for easy access to the VK (VKontakte) API
Home Page: https://docs.rs/rvk
License: MIT License
5.87
(current)5.88
(no changes needed)5.89
(new is_closed
and can_access_closed
fields in user object)5.90
(no changes needed)5.92
(changes to message, wall post, video, market item objects)The rvk_methods
crate currently uses macros to "generate" functions for all methods. The issue is that in order to convert snake_case
names into mixedCase
names expected by the VK API, a static HashMap
is initialized for each category at runtime.
This is not ideal, as it should be possible to generate everything at compile time by using proc macros and/or build.rs
.
What type generator did you use for this package?
e.extra =>
field `extra` of struct `rvk::error::APIError` is private```
let value : Value = from_value(e).unwrap();
```mismatched types
expected enum `serde_json::Value`, found struct `rvk::error::APIError````
Allow using a custom API client in rvk_methods
instead of just rvk::APIClient
.
This will likely involve creating a trait that has the necessary function, call_method
, and implementing that trait for rvk::APIClient
.
rvk_methods
depending on rvk
A possible solution for this may be to add a new crate like rvk_traits
for this purpose (and also move the Params
type alias there, although it might be unnecessary and should rather be entirely removed).
Additionally, rvk_methods::supported_api_client
would need to be removed.
Both rvk_methods
and rvk
would depend on rvk_traits
(the former—to use it, the latter—to implement the trait).
rvk_traits
name good enough or should a better one be used (e.g. rvk_core
)?У меня есть одна просьба, можете ли вы вывести результат ошибки через функцию to_json в тип Value? Или же как то выдать ссылку на саму каптчу? Могу предложить Pull Request если нужно указать поправку
Example: GetById result where forwarded message have no "id" field
Object({
"count": Number(1),
"items": Array([
Object({
"attachments": Array([]),
"conversation_message_id": Number(3),
"date": Number(1234567890),
"from_id": Number(-123456789),
"fwd_messages": Array([
Object({
"attachments": Array([]),
"conversation_message_id": Number(1),
"date": Number(1234567890),
"from_id": Number(123456789),
"text": String("Бюджетное paзвитие вашей гpуппы, без замоpoженныx. Пpайc - https://vk.com/id123456789")
})
]),
"id": Number(1234567),
"important": Bool(false),
"is_hidden": Bool(false),
"out": Number(0),
"peer_id": Number(-123456789),
"random_id": Number(0),
"text": String("")
})
])
})
Error:
Could not get message from message id: Serialization/Deserialization error: missing field `id`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.