Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wadm-js-client

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wadm-js-client - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "wadm-js-client",
"version": "1.0.1",
"version": "1.0.2",
"description": "Client for connecting to the REST APIs via a JS library",

@@ -5,0 +5,0 @@ "main": "./src/index.js",

# OhMyPrints / WadM JavaScript Client
## Table of Contents
- [Introduction](#introduction)
- [Fair use](#fair-use)
- [Requirements](#requirements)
- [Usage](#usage)
- [Methods](#methods)
- [connectionTest](#connectiontest)
- [authenticationTest](#authenticationtest)
- [getArtworkById](#getartworkbyid)
- [getPagedArtworks](#getpagedartworks)
- [getArtworks](#getartworks)
- [Contributing](#contributing)
- [Disclaimer](#disclaimer)
## Introduction
This package exposes the API of [Werkaandemuur](https://www.werkaandemuur.nl/nl) via a JavaScript wrapper. It is pretty basic but should help you get started in combining data for your own use.
It might also work for data that's exposed on [OhMyPrints](https://www.ohmyprints.com/de) (sibling company), but I haven't had a usecase nor tested it.
The package is meant and tested to use (preferably) on a NodeJs environment. It could work well on the client side, but I **strongly recommend against** it, since you'll be exposing either your own API key to the interwebs and it also implies you are making an API call on every possible request, which conflicts with the [fair use](#fair-use) policy.
## Fair use
The REST API is exposed based by WadM on a fair usage policy. I've added a specific User Agent marker on the headers of every request it makes. With unfair usage, the package may get throttled or blocked. Please consider caching the result one way or another (it's not that you'd need live connection since uploading is a manual task). The API only exposes your own data, so don't bother trying to access some other profiles' data.
The REST API is exposed based by WadM on a fair usage policy. I've added a specific User Agent marker on the headers of every request it makes. With unfair usage, the package may get throttled or blocked.
Please consider caching the result one way or another (it's not that you'd need live connection since uploading is a manual task).
The API only exposes your own data, so don't bother trying to access some other profiles' data.
## Requirements
Make sure you have a personal API key. You can register one via your dashboard via the [WordPress plugin page](https://www.werkaandemuur.nl/nl/Wordpress-plugin/474), since we piggyback on the methods the WordPress plugin exposes. Store the `Artist ID` and `API Key` somewhere safe (secrets).
Make sure you have a personal API key. You can register one via your dashboard via the [WordPress plugin page](https://www.werkaandemuur.nl/nl/Wordpress-plugin/474), since we piggyback on the methods the WordPress plugin exposes. Store the `Artist ID` and `API Key` somewhere safe (secrets 🤫).

@@ -19,3 +42,3 @@ ## Usage

```js
const WadmClient = require('./wadm-client')
const WadmClient = require('./wadm-js-client')

@@ -50,3 +73,3 @@ const client = new WadmClient(USER_ID, API_KEY)

### getArtworkById(id)
### getArtworkById

@@ -61,3 +84,3 @@ Returns the JSON object of a particular artwork based on the provided Id. Returns an object `artwork: {}`:

### getPagedArtworks(page)
### getPagedArtworks

@@ -72,3 +95,3 @@ Returns an object containing artworks and stats. The artworks contain an array of JSON objects of a particular page of artworks based on the provided page number. If page number is not provided, it wil default to return page 1. The stats give you the paging properties which can be used to get a different page. The maximum number of items per page is 33. The client is set to **25**. Returns an object `{ artworks: [{}], stats }`:

### getArtworks()
### getArtworks

@@ -75,0 +98,0 @@ Uses the paged result and maps the pages to a single array.

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