Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/doubleleft/hook-javascript
Browser/JavaScript client for hook.
https://github.com/doubleleft/hook-javascript
Last synced: 18 days ago
JSON representation
Browser/JavaScript client for hook.
- Host: GitHub
- URL: https://github.com/doubleleft/hook-javascript
- Owner: doubleleft
- License: mit
- Created: 2014-01-31T22:33:39.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2016-01-13T20:36:20.000Z (almost 9 years ago)
- Last Synced: 2024-05-16T16:07:24.846Z (6 months ago)
- Language: JavaScript
- Homepage: http://hook-platform.org/
- Size: 976 KB
- Stars: 29
- Watchers: 21
- Forks: 7
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
hook-javascript client ![Build status](https://travis-ci.org/doubleleft/hook-javascript.svg?branch=master)
===[![Selenium Test Status](https://saucelabs.com/browser-matrix/hook-javascript.svg)](https://saucelabs.com/u/hook-javascript)
JavaScript client for [hook](https://github.com/doubleleft/hook).
- [Documentation](http://doubleleft.github.io/hook-javascript/classes/Hook.Client.html).
- [Plugins](https://github.com/doubleleft/hook-javascript/wiki/Plugins).How to use
---Initialize with your app's credentials:
```javascript
var hook = new Hook.Client({
endpoint: "http://localhost:4665/",
app_id: 1, // your app id
key: 'test' // browser credentials of your app
});
```Creating collection entries:
```javascript
hook.collection('posts').create({
title: "Post name",
summary: "My awesome new post",
stars: 5
});
```Filtering:
```javascript
hook.collection('posts').where('stars', '>=', 5).then(function(data) {
console.log(data);
});
```View full documentation [here](http://doubleleft.github.io/hook-javascript/classes/Hook.Client.html).
How to build
---You'll need [nodejs](http://nodejs.org/) installed first. Then run the following
commands:$ npm install -g grunt-cli bower
$ npm install
$ bower install
$ gruntTo build and publish the docs:
```bash
make publish-docs
```License
---MIT