= memotoo-gem
This is not an official gem from the provider of memotoo !!!
The memotoo-gem is a soap(savon)-wrapper to (easy) access your {memotoo}[https://www.memotoo.com/index-saleshype.php] contacts.
Add, get, search, modify, sync and delete all your memotoo objects e.g. contacts, bookmarks, notes, event and tasks.
Works now an Ruby 1.8.7 and Ruby 1.9.2 !!!
== You need
you need a memotoo-credential (username/passwd) to use this gem
get a free account here: {www.memotoo.com}[https://www.memotoo.com/index-saleshype.php]
==Install
if you use bundler add
gem 'memotoo'
to your Gemfile and run
bundle install
else put
config.gem "memotoo"
in your environment.rb and run
rake gems:install
or just
gem install memotoo
==Use
give it a first try in irb
ruby-1.8.7-p334 :001 > require 'rubygems'
=> true
ruby-1.8.7-p334 :002 > require 'memotoo'
=> true
or ./script/console (in your app-folder)
@connect=Memotoo.new("myusername","mypassword")
Changelog: (prev V 2.0 I wrapped it in a module )
@connect=Memotoo::Connect.new("myusername","mypassword")
add a contact:
@response = @connect.addContact({:title => "Mr",:lastname => "Wonder",:firstname => "Test"})
get a contact from id:
@response = @connect.getContact(12345)
search for contacts:
@response = @connect.searchContact({:search=>"ka"})
modify a contact:
@response = @connect.modifyContact({:id=>"12345",:lastname=>"New",:jobtitle => "cat-doctor",:otherphone => "12345"})
get contact modified after a date
@response = @connect.getContactSync("2011-01-01 10:00:00")
contactgroups:
@connect.addContactGroup({:name=>"Testgroup"})
@connect.searchContactGroup({:search=>"ka", :limit_nb=>50})
@connect.getContactGroup(12345)
@connect.getContactGroupSync("2010-02-23 10:00:00")
@connect.deleteContactGroup(12345)
bookmarks:
@connect.addBookmark({:name=>"Testgroup"})
@connect.searchBookmark({:search=>"ka", :limit_nb=>50})
@connect.getBookmark(12345)
@connect.getBookmarkSync("2010-02-23 10:00:00")
@connect.modifyBookmark({:id=>response[:id], :url=>"www.google.com", :description => "nice"})
@connect.deleteBookmark(12345)
Requirements for the objects:
Contact:: :lastname
ContactGroup:: :name
Bookmark:: :url
BookmarkFolder:: :name
Note:: :description
CalendarCategory:: :name
Event:: :title, :dateBegin, :dateEnd
Holiday:: :description, :dateBegin, :dateEnd
Task:: :title
Requirements for the methods:
searchmethod:: minimum a hash with a symbol search and your searchstring
id:: id of record, integer
get...Sync:: datetime, format YYYY-MM-DD HH:MM:SS - "2010-02-23 10:00:00"
modify:: id of record, integer
add and modify:: need always the object requirements
Be careful with dateformats:
Holiday::
dateBegin:: "2011-01-01", Format: YYYY-MM-DD
dateEnd:: "2011-01-01", Format: YYYY-MM-DD
Task and Event::
dateBegin:: "2011-06-18T10:00:00", Format: YYYY-MM-DDTHH:II:SS - ISO8601 time format GMT
dateEnd:: "2011-06-18T10:00:00", Format: YYYY-MM-DDTHH:II:SS - ISO8601 time format GMT
==Logging
Enable/Disable Savon and HTTPI - Logging
@connect=Memotoo.new(username, password, https=true, log=false, requestlog=true)
log = Savon logging on/off
requestlog = HTTPI loggin on/off
==Testing
I added tests for all implemented functions. (rcov 100%)
You can add your own credential to /test/helper.rb
I also added support for {http://test.rubygems.org}[http://test.rubygems.org]
You can now use the gem rubygems-test for easy testing this gem.
gem test memotoo
See my testresult here: http://test.rubygems.org/gems/memotoo/v/2.0.1/test_results/1682
my testresult for ruby 1.9.2 here:
http://test.rubygems.org/gems/memotoo/v/2.0.1/test_results/1681
(To make a fast functional test only contact will be tested - goto test_soapobjects.rb line 9 and uncomment it for all soapobject-tests)
==Documentation
see rdoc
and memotoo api-documentation
https://www.memotoo.com/index.php?rub=api#SOAP-server.php
== Changelog V. 2.0.3
All tests pass now - everything works fine :-)
== Changelog V. 2.0.2
Easy configuring logging options
== Changelog V. 2.0.1
some code refactoring and support for ruby >=1.9.2
== Changelog V. 2.0.0
I create all methods now dynamically. This reduced the code dramatically.
I give up using a module to wrap the namespace. Now it's a class.
== Contributing to memotoo-gem
- Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
- Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
- Fork the project
- Start a feature/bugfix branch
- Commit and push until you are happy with your contribution
- Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
- Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
== Copyright
Copyright (c) 2011 Karsten Redmer. See LICENSE.txt for
further details.