From 82813ceb717931123134d5765f85a2677e5328b3 Mon Sep 17 00:00:00 2001 From: Nikiroy78 <35032449+Nikiroy78@users.noreply.github.com> Date: Wed, 12 Jul 2023 12:48:15 +0300 Subject: [PATCH] Fix readme.md --- readme.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/readme.md b/readme.md index 1ee8110..10bc686 100644 --- a/readme.md +++ b/readme.md @@ -17,7 +17,7 @@ const vk = new vkApi.VkApi({ }); ``` or with use access_token -```nodejs +```node const vkApi = require('vk_api'); const vk = new vkApi.VkApi({ access_token : "ACCESS_TOKEN_STRING" @@ -25,7 +25,7 @@ const vk = new vkApi.VkApi({ ``` **Additional parametrs** In constructor you can edit **api_version**, **api_server** and **oauth_server**: -```nodejs +```node const vkApi = require('vk_api'); const authOptions = { /* Another auth params */ }; @@ -42,21 +42,21 @@ const vk = new vkApi.VkApi( ``` ### Step 2: Call VK API Methods You can use method **api** for call api methods. -```nodejs +```node const userObject = vk.api("users.get", { user_ids : [1].join(",") }); // [{ id : 1, first_name : "Pavel", last_name : "Durov" }] ``` ### Additional tools You can use method **exec** for call api method **Execute**. -```nodejs +```node const vkScript = `var userObject = API.users.get({"user_ids":[1]}); return userObject[0];`; const userObject = vk.exec(vkScript); // { id : 1, first_name : "Pavel", last_name : "Durov" } ``` And you can use additional tool for upload doc into server. Use method **uploadDoc** *(method at beta-develop)* -```nodejs +```node const fs = require('fs'); const filename = "picture.png";