Giter Site home page Giter Site logo

vkrequest's Introduction

VK Requests

You can send requests to VK API easily:

Install unirest by command in console:

   gem install unirest

Require main module by adding:

   require_relative 'lib/vk_request'

Generate link to receive the token for requests (permissions can be changed in token.rb):

   ./token.sh

Form request params as is needed (VK API Official Documentation). Example:

   params = VkRequest.form_params({
   	:user_id => '88005553535',
   	:order => 'hints',
   	:count => 10,
   	:access_token => '#',
   	:v => '5.37'
   })
   
   request_params = {
   	:url => 'api.vk.com',
   	:method => 'friends.get',
   	:params => params
   }

Send request to VK API:

   # first parameter is hash with previously formed params
   # second parameter - receive response_body or just status of response?
   friends = VkRequest.perform(request_params, true)      

vkrequest's People

Contributors

ailecksandr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.