balous / ruby-kerio-api Goto Github PK
View Code? Open in Web Editor NEWRuby gem for accessing json-rpc api of Kerio products.
License: MIT License
Ruby gem for accessing json-rpc api of Kerio products.
License: MIT License
If wrong URL is specified thrown exception has nil message:
uri = URI.parse('http://localhost:4040/admin//')
kms = Kerio::Api::Client.new(url: uri)
begin
kms.Session.login(userName: 'Admin', password: '******', application: {name: "", vendor: "", version: ""})
rescue Kerio::Api::Error => e
pp e
pp e.message
end
Outputs:
#<Kerio::Api::Error: #<Kerio::Api::Error:0x005625a7b62808>>
nil
It should be made configurable.
Hi, I'm trying to use your gem in a small script. I am running into a problem just in adding it to my script. If I add
require 'kerio-api'
to the top of my ruby file, and add nothing else, I get errors when trying to execute the file. Here is the output:
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in require': /usr/local/lib/ruby/gems/1.9.1/gems/kerio-api-1.0.0/lib/kerio-api/client.rb:15: syntax error, unexpected tLABEL, expecting ')' (SyntaxError) def initialize (url: nil, insecure: false, debug: false) ^ /usr/local/lib/ruby/gems/1.9.1/gems/kerio-api-1.0.0/lib/kerio-api/client.rb:15: Can't assign to nil def initialize (url: nil, insecure: false, debug: false) ^ /usr/local/lib/ruby/gems/1.9.1/gems/kerio-api-1.0.0/lib/kerio-api/client.rb:15: Can't assign to false def initialize (url: nil, insecure: false, debug: false) ^ /usr/local/lib/ruby/gems/1.9.1/gems/kerio-api-1.0.0/lib/kerio-api/client.rb:25: syntax error, unexpected keyword_end, expecting $end from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in
require'
from /usr/local/lib/ruby/gems/1.9.1/gems/kerio-api-1.0.0/lib/kerio-api.rb:1:in <top (required)>' from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:133:in
require'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:133:in rescue in require' from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:40:in
require'
from NewMailListUpdate.rb:4:in `
Curious if you have any thoughts. Thanks,
Kyle
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.