New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

syncano-server

Package Overview
Dependencies
Maintainers
2
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

syncano-server

A library to intereact with the Syncano API on a server side

  • 0.4.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
19
increased by850%
Maintainers
2
Weekly downloads
 
Created
Source

XO code style CircleCI

Syncano server

Library initialization

import server from 'syncano-server-js'

const { data, events } = server()
// OR 
const { data, events } = server({
  token: '9-12jdiasdnfo23nrokms',
  instance: 'example-instance-name'
})

Examples

// Get first user with given mail
data.users
  .where('email', 'john.doe@example.com')
  .first()
  .then(user => {
    // user variable is null if not found
    // so no need for catch method
  })

// Get first user with given mail, throws error if user was not found
data.users
  .where('email', 'john.doe@example.com')
  .firstOrFail()
  .then(user => {})
  .then(err => {
    // error is thrown if user was not found
  })

// Get list of 140 tags used more than 100 times
data.tags
  .where('usage_count', 'gt', 100)
  .take(140)
  .list()
  .then(tags => {})

// Delete tags with with given array of ids
data.tags.delete([8735, 8733])

// Delete single tag
data.tags.delete(7652)

Check documentation to learn more.

FAQs

Package last updated on 26 Jan 2017

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