Sergey Mironov | 8 Sep 23:44 2012
Picon

ANNOUNCE vkhs-0.0.3

I'm happy to announce a new package called VKHS:

    http://hackage.haskell.org/package/VKHS
    https://github.com/ierton/vkhs

VKHS provides access to Vkontakte [1] (popular Russian social network)
API methods.
Library can be used to login into the network as a standalone application
(OAuth implicit flow as they call it). Interaction with user is not required.
For now, vkhs offers limited error detection and no captcha support. Here is an
example code:

    import Web.VKHS.Login
    import Web.VKHS.Api

    main = do
        let client_id = "111111" -- application id, register first
        let user_of_interest = "222222"
        let e = env client_id "user <at> example.com" "password"
[Photos,Audio,Groups]
        (Right at) <- login e
        (Right ans) <- api e at "users.get" [
              ("uids",user_of_interest)
            , ("fields","first_name,last_name,nickname,screen_name")
            , ("name_case","nom")
            ]
        putStrLn ans

Internally, library uses small curl-based HTTP automata and tagsoup for jumping
over relocations and submitting various 'Yes I agree' forms.
(Continue reading)


Gmane