github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

joost / hyves_api

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 9
    • 2
  • Source
  • Commits
  • Network (2)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Ruby wrapper for the Hyves API — Read more

  cancel

blog.joopp.com

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Added suggested changes by Consti and some documentation changes. Should 
now work with oauth 0.2.7. 
joost (author)
Fri Jul 24 07:20:19 -0700 2009
commit  d4641e7ca88cf75eb639d1f3eaf46a99f6ef51a4
tree    8d62937e9107846ce2d3342addacafb6da08d6d9
parent  ddcaf2ca7af2d2f80eef5909a4024c93d8f6206d
hyves_api /
name age
history
message
file LICENSE Thu Jul 09 00:50:29 -0700 2009 Initial import. [joost]
file README.rdoc Fri Jul 24 07:20:19 -0700 2009 Added suggested changes by Consti and some docu... [joost]
directory examples/ Thu Jul 09 00:50:29 -0700 2009 Initial import. [joost]
file init.rb Fri Jul 24 07:20:19 -0700 2009 Added suggested changes by Consti and some docu... [joost]
directory lib/ Fri Jul 24 07:20:19 -0700 2009 Added suggested changes by Consti and some docu... [joost]
README.rdoc

Hyves API Library for Ruby

Copyright Joost Hietbrink (joost@joopp.com) 2008.

A very quickly created API for the Hyves.net API 1.0, see trac.hyves-api.nl/. Check blog.joopp.com/tag/hyves for more info. Check the code for most info :)

Changes

  • 2009-07-24: Added suggested changes by Consti and some documentation changes. Should now work with oauth 0.2.7.

Installation

For a Rails install just put the hyves_api dir in your vendor dir. This version of the API depends on two gems: oauth (0.2.2) and xml-simple (1.0.11). Install them both using:

  sudo gem install xml-simple
  sudo gem install oauth

Note that this overwrites some methods of the oauth gem. This means that any other code depending on oauth is BROKEN!

Usage

Simplest usage is shown below. For more examples check the examples dir.

  require 'hyves_api/hyves_api'
  # You need to apply for a key via http://www.hyves.nl/api/apply/
  key     = 'key' # Your key here
  secret  = 'secret' # Your secret here

  h = Hyves.new(key, secret)
  # Go and login on the following URL
  h.authorize_url('http://your_return_url/')
  h.get_access_token
  h.users_getByUsername(:username => 'claude')

You can probably call all of Hyves API methods (see trac.hyves-api.nl/hyves-api/wiki/APIMethods). Although I haven’t tested them all. Just replace the . with an _, like:

  h.wwws_getByUser(:userid => 'someuserid')
  h.wwws_getForFriends

Make sure you have the proper user’s authorizations. By default this is only [‘users.get’, ‘users.getByUsername’]. You can specify this using:

  h = Hyves.new(key, secret, :methods => ['users.get', 'users.getByUsername'], :ha_fancylayout => true, :expirationtype => 'infinite')

TODO

  • Leave the OAuth gem or only use a small part.
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server