obsidian-api v1.0.9
Obsidian API
Obsidian API is a library that allows you to implement an API between a web
application running in an iframe
and the web page that integrates it.
Obsidian API is composed of two parts:
- An application-side Class (inside the
iframe
) that will be used to implement the API (methods that will be called remotely by the integration,...), - and an integration-side script (outside the
iframe
) that will be used as a client for the API. This script is completely generic and can be used to connect to any web application that implements an Obsidian API.
Features:
- Remote method calls with return value (integration → app → integration),
- Provides callback-based events (app → integration),
- Allows the integration to send some configuration to the application before it is loaded,
- Allows to transfer various types of objects (including
TypedArrays
,Blob
andBuffer
), - Allows to use both node-like callbacks or promises for asynchronous calls.
Install
npm install obsidian-api
Documentation
Documentation and examples:
Contributing
Questions
If you have any question, you can:
Bugs
If you found a bug, please open an issue on Github with as much information as possible.
Pull Requests
Please consider filing a bug before starting to work on a new feature. This will allow us to discuss the best way to do it. This is of course not necessary if you just want to fix some typo or small errors in the code.
Coding Style / Lint
To check coding style, run the follwoing command:
npx grunt jshint
Tests
Tu run tests, use the following command:
npx grunt test
Changelog
NEXT (changes on master that have not been released yet):
- Nothing yet ;)
v1.0.9:
- Updated dependencies (@jbghoul, #31)
- Replaced deprecated mocha-phantomjs by mocha-headless-chrome to run tests (@jbghoul, #31)
v1.0.8:
- Import only used lodash functions instead of the whole library (#30)
v1.0.7:
- Fixes Error unserialization
v1.0.6:
- Fixes issue when API functions return
null
(#17)
- Fixes issue when API functions return
v1.0.5:
- Updates dependencies
v1.0.4:
- Documentation
v1.0.3:
- Updates dependencies
v1.0.2:
- Fixes Node.js Buffer transfer
v1.0.1:
- Updates dependencies
v1.0.0:
- First public release