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

lonnon / helipad

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 1
    • 0
  • Source
  • Commits
  • Network (0)
  • 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.

Helipad Ruby interface — Read more

  cancel

http://nyerm.com/helipad

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

This URL has Read+Write access

Added Gemcutter and Rubyforge to Rakefile for Jeweler to chew on 
lonnon (author)
Wed Oct 07 12:43:03 -0700 2009
commit  e62979b294ed1b2d393fdc9da6595c44b942286b
tree    2d440b355792ac46946bf9a4ccf81914f815936a
parent  44f24bb38d440bfd608c774857d79339a95615cd
helipad /
name age
history
message
file .gitignore Loading commit data...
file README
file Rakefile
file VERSION.yml
file helipad.gemspec
directory lib/
directory test/
README
# Ruby interface to the excellent Helipad[http://pad.helicoid.net/home.html]
# online note pad.
#        
# Author: Lonnon Foster (lonnon.foster@gmail.com)
#        
# == Overview
#        
# This package provides three classes for working with
# Helipad[http://pad.helicoid.net/home.html]: Helipad, Helipad::Document, and
# Helipad::Response.
#
# The Helipad class does all the heavy lifting. Creating an instance of
# Helipad requires your login credentials.
#
#     hp = Helipad.new("lonnon@example.com", "password")
#
# Armed with an instance of Helipad, you can call its methods to interact
# with Helipad[http://pad.helicoid.net/home.html] documents.
#
# The Helipad::Document class holds the data contained in a
# Helipad[http://pad.helicoid.net/home.html] document. The get method
# returns a Helipad::Document instance. The find, get_all, and get_titles
# methods return an Array of Helipad::Document instances.
#
# The Helipad::Response class holds return data sent by
# Helipad[http://pad.helicoid.net/home.html] that describes the success or
# failure of various actions. The create, destroy, and update methods
# return a Helipad::Response instance.
#        
# == Examples of Use
#
# All of these examples assume that a Helipad object called +hp+ exists.
#
#     hp = Helipad.new("lonnon@example.com", "password")
#            
# === Get an Existing Document
#
#     document = hp.get(3)
#     puts document.source
#
# === Get a Document Formatted as HTML
#
#     puts hp.get_html(3)
#
# === Find Documents
#
#     def how_many(search_term)
#       documents = hp.find(search_term)
#       documents.size
#     end
#
#     find_this = "wombats"
#     puts "#{how_many(find_this)} document(s) were found containing '#{find_this}'."
#
# === Find Documents by Tags
#
#     documents = hp.find(:tag, "work")
#     titles = documents.collect { |doc| doc.title }
#     puts "Documents tagged with 'work':\n  #{titles.join("\n  ")}"
#
# === Create a Document
#
#     source = File.read("cake_recipe.txt")
#     response = hp.create(:title  => "Delicious Chocolate Cake",
#                          :tags   => "recipe dessert",
#                          :source => source)
#     puts "Recipe saved" if response.saved?
#
# === Delete Documents
#
#     doc_ids = hp.find(:tag, "incriminating").collect { |doc| doc.doc_id }
#     doc_ids.each do |id|
#       hp.destroy(id)
#     end
#
# == Legal
#
# Copyright (c) 2008 Lonnon Foster. All rights reserved.
#        
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# 
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# 
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
# == Thanks
#
# Special thanks to {Alex Young}[http://alexyoung.org/] at Helicoid[http://helicoid.net]
# for creating Helipad[http://pad.helicoid.net/home.html].
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