TeamdriveApi

Gem Version Build Status Code Climate Test Coverage

Client library for the TeamDrive XML API.

Project State

Currently only supports the RegServer API

Installation

Add this line to your application's Gemfile:

gem 'teamdrive_api'

And then execute:

$ bundle

Or install it yourself as:

$ gem install teamdrive_api

Usage

api = TeamdriveApi::Register.new('example.com', 'd3b07384d113edec49eaa6238ad5ff00', '1.0.005')

api.remove_user 'foobar'
#=> true

api.search_user username: '$CODE-*'
#=> {:apiversion=>"1.0.005",
#=>  :searchresult=>{:current=>"3", :maximum=>"50", :total=>"3"},
#=>  :userlist=>
#=>   {:user=>
#=>     [{:userid=>"2",
#=>       :username=>"$CODE-1002",
#=>       :email=>"[email protected]",
#=>       :reference=>nil,
#=>       :department=>nil,
#=>       :language=>"en",
#=>       :distributor=>"CODE",
#=>       :usercreated=>"07/25/2014 15:06:41.00",
#=>       :status=>"activated"},
#=>      {:userid=>"10",
#=>       :username=>"$CODE-1010",
#=>       :email=>"[email protected]",
#=>       :reference=>nil,
#=>       :department=>nil,
#=>       :language=>"en",
#=>       :distributor=>"CODE",
#=>       :usercreated=>"10/01/2014 09:31:49.00",
#=>       :status=>"activated"},
#=>      {:userid=>"15",
#=>       :username=>"$CODE-1015",
#=>       :email=>"[email protected]",
#=>       :reference=>nil,
#=>       :department=>nil,
#=>       :language=>"en",
#=>       :distributor=>"CODE",
#=>       :usercreated=>"03/04/2015 13:39:09.00",
#=>       :status=>"activated"}]}}

For more Information see TeamdriveApi::Register

Development

After checking out the repo, run bin/setup to install dependencies. Then, run bin/console for an interactive prompt that will allow you to experiment.

Contributing

  1. Fork it ( https://github.com/mhutter/teamdrive_api/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Trademarks

All trademarks named within this project are, without limitation, subject to the regulations of the trademark laws in each case, and as appropriate to ownership rights of the respective registered owners.