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 contacts.
Add, get, search, modify and delete your memotoo contacts.
You need
you need a memotoo-credential (username/passwd) to use this gem
get a free account here: wwwwww.memotoowww.memotoo.com[http://www.memotoo.com/index-saleshype.php]
Install
if you use bundler add gem ‘memotoo’ to your Gemfile run
bundle install
else put it in your environment.rb and run
rake gems:install
Use
give a first try in ./script/console
@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)
Testing
I added tests for all implemented functions. (rcov 100%) You can add your own credential to /test/test_memotoo.rb
I also added support for test.rubygems.org
You can now use the gem rubygems-test for easy testing this gem.
gem test memotoo
See my testresult here: test.rubygems.org/gems/memotoo/v/1.0.6/test_results/1655
Documentation
see rdoc
To-Dos
-
Exception handling should be done - fetched problems are written to console
-
I only implemented contacts, contact’s group and bookmark - these soap-objects are missing: bookmark’s folder, event, holiday, task, note
It would be nice if someone could help me with the missing parts .
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 © 2011 Karsten Redmer. See LICENSE.txt for further details.