Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

docbase

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docbase

This module provides an easy way to use DocBase API.

  • 1.0.2
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

JavaScript DocBase API for Node.JS

This module provides an easy way to use DocBase API.

Installation

$ npm install docbase
More Info

set DOCBASE_API_TOKEN instead of DocBaseApi's option.

$ export DOCBASE_API_TOKEN=xxxxxxxxxx

APIs

import module

import DocBaseApi from 'docbase';

const docbase = new DocBaseApi({
  token: 'xxxxxxxxxxxxx'
});

所属チーム取得API

docbase.team.find().then(teams => {
  const domain = teams[0].domain;
  // => teams
}).then(done, done);

メモの検索API

docbase.post.search(domain, {
  q: 'test',
  author: 'keita_moromizato',
  tag: '日報',
  group: '日報'
}).then(res => {
  // => posts
});

所属グループ取得API

docbase.group.find(domain).then(groups => {
  // => groups
});

タグの取得API

docbase.tag.find(domain).then(tags => {
  // => tags
});

メモの投稿API

const params = {
  title: 'test title',
  body: 'test body',
  draft: false,
  tags: ['test'],
  scope: 'group',
  groups: [1],
  notice: false
};

docbase.post.create(domain, params).then(post => {
  // post
});

メモの詳細取得API

docbase.post.find(domain, 111).then(post => {
  // => post
});

メモの更新API

TODO

メモの削除API

TODO

License

MIT

Test

$ export DOCBASE_API_TOKEN=xxxxxxxxxx
$ npm test

Reference

DocBase APIドキュメント

Keywords

FAQs

Package last updated on 21 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc