DocBase API Client, written in Ruby.
Add this line to your application's Gemfile:
gem 'docbase'And then execute:
$ bundle
Or install it yourself as:
$ gem install docbase
client = DocBase::Client.new(access_token: 'your_access_token', team: 'your_team')- access_token
- access token
 
 - team
- team subdomain
 
 - retry_on_rate_limit_exceeded
- #16
 - true or false
 
 
client.users(q: 'name')
client.users(q: 'name', page: 2)
client.users(q: 'name', page: 1, per_page: 100)
client.users(q: 'name', page: 1, per_page: 100, include_user_groups: true)client.tags.body
# => [{ name: 'ruby' }, { name: 'rails' }]client.groups.body
client.groups(name: 'developers').body
client.groups(page: 2, per_page: 10).bodyclient.group(1).bodyparams = {
  name: 'group',
  description: 'Important group.',
}
client.create_group(params)params = {
  group_id: 1,
  user_ids: [10, 11, 12]
}
client.add_users_to_group(params)params = {
  group_id: 1,
  user_ids: [10, 11, 12]
}
client.remove_users_from_group(params)client.posts(q: 'body')
client.posts(q: 'body', page: 2)
client.posts(q: 'body', page: 1, per_page: 100)client.post(1)params = {
  title: 'memo title',
  body: 'memo body',
  draft: false,
  tags: ['rails', 'ruby'],
  scope: 'group',
  groups: [1],
  notice: true,
}
client.create_post(params)params = {
  id: 1,
  title: 'memo title',
  body: 'memo body',
  draft: false,
  tags: ['rails', 'ruby'],
  scope: 'group',
  groups: [1],
  notice: true,
}
client.update_post(params)client.archive_post(1)client.unarchive_post(1)client.delete_post(1)params = {
  post_id: 1,
  body: 'GJ!!',
  notice: true,
}
client.create_comment(params)client.delete_comment(1)client.upload('./test.jpg')
client.upload(['./test.jpg', './README.md'])response = client.attachment(file_id)
File.open(file_id, 'wb') { |f| f.write(response.body) }client = DocBase::Client.new(access_token: 'your_access_token', team: 'kray')
client.tags.body
# => [{ name: 'ruby' }, { name: 'rails' }]
client.team = 'danny'
client.access_token = 'danny_team_access_token'
client.tags.body
# => [{ name: 'javascript' }, { name: 'react' }]https://help.docbase.io/posts/45703
The gem is available as open source under the terms of the MIT License.