Skip to content

Commit

Permalink
Add better example.
Browse files Browse the repository at this point in the history
git-svn-id: http://toodledo.rubyforge.org/svn/trunk@74 7a1d1287-79c4-4140-ad4e-221ab6fece8c
  • Loading branch information
wsargent committed May 10, 2008
1 parent 077cfe3 commit aaddbb1
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions lib/toodledo.rb
Expand Up @@ -5,7 +5,7 @@
module Toodledo

# Required for gem
VERSION = '1.2.0'
VERSION = '1.2.1'

# Returns the configuration object.
def self.get_config()
Expand All @@ -24,11 +24,21 @@ def self.set_config(override_config)
#
# The following will do most everything you want, assuming you've set
# the config correctly:
#
# require 'toodledo'
# Toodledo.begin do |session|
# session.add_task('foo')
# end
#
# require 'rubygems'
# require 'toodledo'
# require 'yaml'
# config = {
# "connection" => {
# "url" => "http://www.toodledo.com/api.php",
# "user_id" => "<your user id>",
# "password" => "<your password>"
# }
# }
# Toodledo.set_config(config)
# Toodledo.begin do |session|
# session.add_task('foo')
# end
#
def self.begin(logger = nil)
config = Toodledo.get_config()
Expand Down

0 comments on commit aaddbb1

Please sign in to comment.