Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
api-client-node
Advanced tools
Readme
The official vibely node api client
Add this as a dependency to your project using yarn with
$ yarn add @vibely/api-client-node
This package exposes an api for getting events intended to be use like.
import { Content } from '@vibely/api-client-node'
import { Event } from '@vibely/api-client-node'
import { Location } from '@vibely/api-client-node'
// api is vibely api route eg. `https://getvibely.herokuapp.com` [required]
// token is the auth token after login default is ''
// log the loging api to use, defaults to console
const content = new Content({api: ``, token: ``, log: console})
const event = new Event({api: ``, token: ``, log: console})
const location = new Location({api: ``, token: ``, log: console})
location.createLocation({
geo: [9.894934, -2.4599409],
tags: [`town`],
info: ``,
active: true
})
.then(loc => {
console.log({loc})
})
/*
{
loc: {
geo: [9.894934, -2.4599409],
tags: [`town`],
info: ``,
active: true
}
}
*/
location.updateLocation({id, updates})
.then(loc => {
console.log({loc})
})
location.getLocations({filter})
.then(locs => {
console.log({locs})
})
/*
{
locs: [{
geo: [9.894934, -2.4599409],
tags: [`town`],
info: ``,
active: true
}
}]
*/
location.getLocation({id})
.then(loc => {
console.log({loc})
})
/*
{
locs: {
geo: [9.894934, -2.4599409],
tags: [`town`],
info: ``,
active: true
}
}
*/
// same methods are on Event and Content
// if you want to know the schema of the models, please visit
https://bitbucket.org/magohq/vibely-api/src/9e545417fc4fd807cb069857b3402e888eb57c00/server/api/content/content.model.js?at=master&fileviewer=file-view-default
https://bitbucket.org/magohq/vibely-api/src/9e545417fc4fd807cb069857b3402e888eb57c00/server/api/event/event.model.js?at=master&fileviewer=file-view-default
https://bitbucket.org/magohq/vibely-api/src/9e545417fc4fd807cb069857b3402e888eb57c00/server/api/location/location.model.js?at=master&fileviewer=file-view-default
$ git clone https://github.com/vibely/api-client-node.git
$ cd api-client-node
$ nvm install
$ yarn
The api-client-node source is hosted on GitHub. Clone the project with
$ git clone https://github.com/vibely/api-client-node.git
You will need Node.js with yarn.
Be sure that all commands run under the correct Node version, e.g., if using nvm, install the correct version with
$ nvm install
and set the active version for each shell session with
$ nvm use
Install the development dependencies with
$ yarn
Primary development tasks are defined under scripts
in package.json
and available via yarn run
.
View them with
$ yarn run
Lint, test, and transpile the production build to dist
with
$ yarn run dist
Release a new version using npm version
.
This will run all tests, update the version number,
create and push a tagged commit.
Linting against the JavaScript Standard Style and JSON Lint is handled by gulp.
Automatically fix most JavaScript formatting errors with
$ yarn run format
Unit testing is handled by AVA and coverage is reported by Istanbul. Watch and run tests on change with
$ yarn run test
Generate a coverage report with
$ yarn run report
An HTML version will be saved in coverage
.
This npm package is Copyright (c) 2016-2017 Vibely Inc.
This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright holder or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.
FAQs
The official vibely node api client
We found that api-client-node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).