# neto

> Neto API wrapper for your Node.js applications

Latest version **0.0.2** (published 2016-02-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install neto
pnpm add neto
yarn add neto
bun add neto
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2016-02-18 |
| First published | 2016-02-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | David Howell |
| Maintainers | davidh |
| Keywords | Neto, API |

## Links

- npm: https://www.npmjs.com/package/neto
- npm.io page: https://npm.io/package/neto

## Dependencies (1)

- [request](https://npm.io/package/request.md) ^2.65.0

## Recent versions

- 0.0.2 (latest) — 2016-02-18
- 0.0.1 — 2016-02-16

## README

# node-neto

This is a basic API wrapper for the Neto API (https://www.neto.com.au/api). Since this package use the JSON transport, you must be using Neto v5.4 and above.

# Usage Example
This is a complete example to create an order.
```js
var Neto = require('neto');
var api = new Neto({ uri: 'https://www.yournetosite.com.au', apiKey: '<Your Neto API Secure Key>'});

var order = {
	"Order": [{
		"OrderID": "A123",
		"Email": "davidh@dynamicmethods.com.au",
		"Username": "username",
		"BillFirstName": "David",
		"BillLastName": "Howell",
		"BillCompany": "Dynamic Methods Pty Ltd",
		"BillStreet1": "122 Sturt street",
		"BillStreet2": "",
		"BillCity": "Adelaide",
		"BillState": "SA",
		"BillPostCode": "5000",
		"BillCountry": "Australia",
		"ShipFirstName": "John",
		"ShipLastName": "Doe",
		"ShipCompany": "",
		"ShipStreet1": "1 Smith Street",
		"ShipStreet2": "",
		"ShipCity": "Adelaide",
		"ShipState": "SA",
		"ShipPostCode": "5000",
		"ShipCountry": "Australia",
		"ShippingMethod": "Standard Delivery",
		"DateRequired": "2016-02-14"
	}]
};

api.addOrder(order, function(err, res) {
	if(err) console.log(err);

	console.log(res);
});
```

## Installation
```sh
$ npm install neto
```

## Usage

### Initialisation

```js
var Neto = require('neto');
var api = new Neto({ uri: 'https://www.yournetosite.com.au', apiKey: '<Your Neto API Secure Key>'});
```
  * `uri` - The website URL of your Neto site
  * `apikey` - The API Key generated within the CPanel of your Neto website

## Methods
All methods follow the documentation at https://www.neto.com.au/api/. All methods take two arguments:

  * `data`: The JSON object specified in the request (e.g. order, payment, product, category, warehouse, customer, filter)
  * `callback`: The callback with an `err` and `response` arguments

#### Orders / Invoices
  * `addOrder`: https://www.neto.com.au/api/orders-invoices/addorder/
  * `getOrder`: https://www.neto.com.au/api/orders-invoices/getorder/
  * `updateOrder`: https://www.neto.com.au/api/orders-invoices/updateorder/

#### Payments
  * `addPayment`: https://www.neto.com.au/api/payments/addpayment/
  * `getpayment`: https://www.neto.com.au/api/payments/getpayment/

#### Products
  * `addProduct`: https://www.neto.com.au/api/products/addproduct/
  * `getProduct`: https://www.neto.com.au/api/products/getproduct/
  * `updateProduct`: https://www.neto.com.au/api/products/updateproduct/

#### Categories
  * `addCategory`: https://www.neto.com.au/api/categories/addcategory/
  * `getCategory`: https://www.neto.com.au/api/categories/getcategory/
  * `updateCategory`: https://www.neto.com.au/api/categories/updatecategory/

#### Warehouses
  * `addWarehouse`: https://www.neto.com.au/api/warehouses/addwarehouse/
  * `getWarehouse`: https://www.neto.com.au/api/warehouses/getwarehouse/
  * `updateWarehouse`: https://www.neto.com.au/api/warehouses/updatewarehouse/

#### Content
  * `addContent`: https://www.neto.com.au/api/content/addcontent/
  * `getContent`: https://www.neto.com.au/api/content/getcontent/
  * `updateContent`: https://www.neto.com.au/api/content/updatecontent/

#### Customers
  * `addCustomer`: https://www.neto.com.au/api/customers/addcustomer/
  * `getCustomer`: https://www.neto.com.au/api/customers/getcustomer/
  * `updateCustomer`: https://www.neto.com.au/api/customers/updatecustomer/

---
_Source: https://npm.io/package/neto · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
