Skip to content
/ vkashka Public

A minimal VK API wrapper.

License

Notifications You must be signed in to change notification settings

dx3mod/vkashka

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vkashka

A small wrapper-library for the VK API (version 5.199). It's not complete, but you can extend it yourself. Builds on the Cohttp and Lwt abstractions in an implementation-independent way.

Quick start

Installation of development version.

$ opam pin vkashka.dev https://github.com/dx3mod/vkashka.git

Example of use with the cohttp-lwt-unix backend:

open Lwt.Syntax

let () =
  Lwt_main.run @@

  let token = Vkashka.access_token "YOUR_TOKEN" in
  let module Vk_api = Vkashka.Make (Cohttp_lwt_unix.Client) ((val token)) in

  let* user = Vk_api.Users.(get ~user_ids:[ "username" ] () |> first_exn) in

  Lwt_fmt.printf "User : %a" Vkashka.User.pp user

See also the examples/ directory for more references.

Documentation

Lookup documentation using the odig:

odig doc vkashka

Tutorial in Russian on ocamlportal.ru

Related

Reference

  • VK API official documentation

Implemented

Objects

  • User
    • Basic
    • Optional fields A-I
    • Optional fields L-R (70%)
  • Basic Wall Record

Methods

  • Users
    • get
  • Wall
    • get (partial)
    • getById (partial)

About

A minimal VK API wrapper.

Resources

License

Stars

Watchers

Forks