Created
          December 5, 2010 16:31 
        
      - 
      
- 
        Save MattHall/729218 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | require 'net/http' | |
| require 'uri' | |
| require 'rubygems' | |
| @auth = {:api_token => 'my token'} | |
| Net::HTTP.start('posterous.com') {|http| | |
| req = Net::HTTP::Get.new("/api/v2/users/me/sites/primary/posts?api_token=#{@auth[:api_token]}") | |
| req.basic_auth 'my email address', 'my password' | |
| response = http.request(req) | |
| puts response.body | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment