npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

uo-wix-data

v3.1.6

Published

Unofficial Wix Data API. Uses HTTP requests to connect.

Downloads

7

Readme

About

This is an unofficial NPM Package which includes some functions from the Wix Data API by Wix. The purpose of this package is to use Wix Data (database collections) in a different environment (site or Node.js app). It uses HTTP requests to connect to Wix.

Installation

npm install uo-wix-data --save

Check documentaiton for more steps.

Documentation

On your wix site create a backend file called http-functions.js and inside it put the code that is in uowd-http.js.

Getting started

1. Create a Wix site (blank template) and enable Developer mode.

2. On your wix site create a backend file called http-functions.js (if not created already) and inside it put the code from uowd-http.js.

3. In const wdToken = "foobar"; replace foobar with your secret token.

4. On your Node.JS file import uo-wix-data with const wixData = require("uo-wix-data") and set up wixData.setup("username", "my-site", "token") replacing username with your wix username, my-site with your site name and token with your secret token.

Functions

  • setup(username, siteName, token) - Sets everything up and returns the WixData object.
  • enableDevMode(void) - Sends requests to published site.
  • disableDevMode(void) - Sends requests to saved site.

WixData object

  • get
  • query
    • eq, ne, gt, ge, lt, lt, le, between, contains, starsWith, endsWith, hasAll, hasSome, isEmpty, isNotEmpty, ascending, descending, limit, include, find, count
  • get
  • query
  • insert
  • bulkInsert
  • insertReference
  • isReferenced
  • queryReferenced
  • update
  • bulkUpdate
  • save
  • remove
  • bulkRemove
  • removeReference
  • replaceReferences

Example:

const wixData = require("uo-wix-data")
  .setup("username", "my-site", "foobar");

// Example
wixData.query("Users").eq("name", "John").find().then((result) => {
    console.log(result.items[0]);
});

Version 3.0.0

  • Changed setup function to return WixData object
  • Added new functions:
    • insertReference
    • isReferenced
    • queryReferenced
    • save
    • removeReference
    • replaceReferences

Version 2.0.0

  • Added new functions:
    • bulkInsert
    • bulkUpdate
    • bulkRemove
    • query.include
    • query.count
    • enableDevMode
    • disableDevMode
  • Changed some error messages:
    • type_invalid to invalid_type
    • token_invalid to invalid_token
    • query_type_invalid to invalid_query_type
    • query_failed to find_failed