@
@
@mtl2015-06-23 12:54:41
API
@mtl, 2015-06-23 12:54:41

How to use vkscript/stored procedures in standalone vk application?

Hello, I use rad studio c++builder and its RESTReqest/RESTResponse to send and receive lists of video records from groups. The essence of the component is sending a post to api.vk.com/method... The link automatically includes the necessary parameters like accsess_token, etc.
The fact is that you have to send too many requests and, in fact, receive either the number of videos or the full information about several videos. Given the limitations of the api, this takes a lot of time.
How can I pass the finished script to the builder components to speed up the process? Using indy or the same rest * replacing the parameters with the ones you need?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mtl, 2015-06-29
@mtl

Okay, I'll try to explain in more detail. We take C++Builder, we take components from the REST Client palette for working with OAuth, sending and receiving requests to the VK API.
(Only the bottom line of the quote is useful - the server's answer)
We poke 2 times on Request'u.
The address line is generated automatically: _tps://api.vk.com/method/access_token=...&v=5.34&user_id=...... Sent by GET or POST.
Result:

{
"response":[]
}

Where is the mistake? I'm probably missing something. Some kind of parameter, a way to work with execute.
I can get a response in the form of a regular JSON, then parse and work with the data. With the usual methods like video.get rolls with a bang. But they need to be done a lot and often. VK API restrictions are to blame.
There are 2 possible solutions to the problem - stored procedures or script text. I already tried to call a stored procedure, the answer is empty. Works in browser, not on CPP.
The second option is preferable. it's easier to add or remove parameters in a script and send it by POST. But how? RESTRequest looks like it can only send a URI with parameters + little things like a proxy and an encoding.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question