Skip to content

piromaru/cybozu-office-ruby

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cybozu-office-ruby

Cybozu Office Client (Ruby)

Install

Add in Gemfile

gem 'cybozu-office', :git => 'https://github.com/fukata/cybozu-office-ruby.git', :tag => 'v0.0.3'

Usage

Create message threads(text body)

client = CybozuOffice::Client.new(url: "YOUR URL", username: "YOUR USERNAME", password: "YOUR PASSWORD")
res = client.message_create_threads(
    subject: "SUBJECT",
    body: "BODY",
    user_ids: ["1","2"...],
    files: ["/path/to/file1", "/path/to/file2"],
)
if res.success? then
    response = res.response()
    respnose['returns']
else
    puts res.error
end

Create message threads(html body)

client = CybozuOffice::Client.new(url: "YOUR URL", username: "YOUR USERNAME", password: "YOUR PASSWORD")
res = client.message_create_threads(
    subject: "SUBJECT",
    body: "<h1>BODY</h1>",
    html: true,
    user_ids: ["1","2"...],
    files: ["/path/to/file1", "/path/to/file2"],
)
if res.success? then
    response = res.response()
    respnose['returns']
else
    puts res.error
end

Test

bundle exec rspec spec

License

Apache License, Version 2.0.

About

Cybozu Office Client (Ruby)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%