Created
          June 16, 2012 04:02 
        
      - 
      
- 
        Save mchung/2939858 to your computer and use it in GitHub Desktop. 
    Slicehost API
  
        
  
    
      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 'rubygems' | |
| require 'activeresource' | |
| SITE = "https://<key goes here>@api.slicehost.com/" | |
| class Slice < ActiveResource::Base | |
| self.site = SITE | |
| def self.find_by_name(name) | |
| Slice.find(:first, :params => { :name => name }) | |
| end | |
| end | |
| # Address class is required for Slice class | |
| class Address < String; end | |
| class Zone < ActiveResource::Base | |
| self.site = SITE | |
| end | |
| class Record < ActiveResource::Base | |
| self.site = SITE | |
| end | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment