Giter VIP home page Giter VIP logo

icewarpserver's Introduction

IceWarpServer Api Gem

This is a re-write of the original IceWarpApi that was here on github (deleted). The old verision use standard lib XMLRPC::Client. Unfortunately this was slow and painful to work with.

This rewrite uses IceWarpServer .dll's/.so files using the FFI gem(https://github.com/ffi/ffi) to talk directly to the IcewarpServer API. This is much faster and removes the heavy lifting.

You will need to drop the api.dll (windows) or libapi.so (linux) into the project root folder. Linux might require so OS level dependencies which I will list later. The dll/so files are not included in this project. You can grab them from

C:\Program Files\IceWarp\api.dll windows 32 ruby C:\Program Files\IceWarp\api_64.dll Windows 64bit Ruby (copy and rename to api.dll) /opt/icewarp/lib/libapi.so Linux

Usage

Most commands can be take from the api pdf http://www.icewarp.com/download/documentation/server/API/V%2011%20IceWarp%20Server%20API%20Reference.pdf. but have been ruby-ifed

Example: Get Domain Count

api = IceWarpServer::ApiObject.new
api.get_domain_count

Example: Get Domain List

api = IceWarpServer::ApiObject.new
api.get_domain_list
This will return and array of domains (api returns string. helper makes it enum array)

Example Get Server Verison

api = IceWarpServer::ApiObject.new
api.get_property('c_version')
or shorthand
api.version

use the Icewarp server Api PDF for more information on usable properties

Note: To connect from a remote machine will require the use of the TokenObject then bind its token handle with all objects

auth string = administrator ":" password "@" server

auth = "system_account:securepass@myipaddress"
token_object = IceWarpServer::TokenObject.new
token_object.url = auth
api_object = IceWarpServer::ApiObject.new
api_object.token_handle = token_object.token_handle # apply token object handle to api token

preferred connection method: pass the TokenObject to the ApiObject (with authentication in the token)

auth = "system_account:securepass@myipaddress"
token_object = IceWarpServer::TokenObject.new(auth)
api_object = IceWarpServer::ApiObject.new(token_object)

TODO...

The Following Objects need to be mapped

AccountObject

RemoteAccountObject

StatisticsObject

Mailer

IMMessage

IDP

Groupware

ChallengeResponse

SSL support with the token object coming later.

ApiObject Chaining will come soon (eg: api.token_object.token_handle,api.domain_object,get_account_list)

detect from configuration if its local or remote. if remote automagically apply use the TokenObject

Installation

Add this line to your application's Gemfile:

gem 'ice_warp_server' , :git => 'git://github.com:freibuis/IceWarpServer.git'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ice_warp_server

Usage

TODO: Write usage instructions here

Contributing

  1. Fork it ( https://github.com/freibuis/ice_warp_server/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
  6. Smile!

icewarpserver's People

Contributors

freibuis avatar

Stargazers

Kishorekumar Neelamegam avatar  avatar

Watchers

James Cloos avatar  avatar

Forkers

naag

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.