-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(readme): add README.md and LICENSE
- Loading branch information
Showing
2 changed files
with
76 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
The MIT License (MIT) | ||
Copyright (c) 2017 Jumpei Miyata <[email protected]> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,69 @@ | ||
# garoon-soap | ||
Garoon soap api client for Node and Browser | ||
|
||
Garoon SOAP API client library for JavaScript applications (both on web browser and Node.js). | ||
|
||
[![npm version](https://img.shields.io/npm/v/garoon-soap.svg)](https://www.npmjs.com/package/garoon-soap) | ||
[![npm downloads](https://img.shields.io/npm/dm/garoon-soap.svg)](https://www.npmjs.com/package/garoon-soap) | ||
![License](https://img.shields.io/npm/l/garoon-soap.svg) | ||
|
||
## Overview | ||
|
||
garoon-soap is an isomorphic JavaScript library utilizing Garoon SOAP API. It works both in the browser and Node.js. | ||
|
||
With this library, you can use Garoon SOAP API without considering XML which is too hard for developers to handle. | ||
|
||
[Supported APIs](https://developer.cybozu.io/hc/ja/categories/200157760-Garoon-API) | ||
|
||
## Setup | ||
|
||
### Node.js | ||
|
||
Install ```garoon-soap``` via npm. | ||
|
||
``` | ||
npm install garoon-soap | ||
``` | ||
|
||
Require ```garoon-soap``` in your Node.js code. | ||
|
||
``` | ||
const GaroonSoap = require('garoon-soap'); | ||
const garoon = new GaroonSoap('https://example.cybozu.com/g/', 'username', 'password'); | ||
// example | ||
const start = new Date(); | ||
const end = new Date(); | ||
end.setDate(start.getDate() + 1); | ||
garoon.schedule.getEvents(start, end).then(events => { | ||
console.log(events); | ||
}); | ||
``` | ||
|
||
### Web Browser | ||
|
||
Download ```garoon-soap.min.js``` from [Releases](https://github.com/miyajan/garoon-soap/releases). | ||
|
||
Load it by ```<script src="/path/to/garoon-soap.min.js"></script>```. | ||
|
||
Then, you can use ```GaroonSoap``` class in your JavaScript. | ||
|
||
``` | ||
// You can use session authorization if you have already logged-in to Garoon. | ||
const garoon = new GaroonSoap('https://example.cybozu.com/g/'); | ||
// example | ||
const start = new Date(); | ||
const end = new Date(); | ||
end.setDate(start.getDate() + 1); | ||
garoon.schedule.getEvents(start, end).then(events => { | ||
console.log(events); | ||
}); | ||
``` | ||
|
||
## License | ||
|
||
MIT | ||
|
||
## Author | ||
|
||
[miyajan](https://github.com/miyajan): Jumpei Miyata [email protected] |