# mercadolibre-nodejs-sdk

> This is the official NodeJS SDK for the MercadoLibre Marketplace platform.

Latest version **3.0.1** (published 2020-08-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install mercadolibre-nodejs-sdk
pnpm add mercadolibre-nodejs-sdk
yarn add mercadolibre-nodejs-sdk
bun add mercadolibre-nodejs-sdk
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.1 |
| Published | 2020-08-05 |
| First published | 2020-05-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 94.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | diazmartin |

## Links

- npm: https://www.npmjs.com/package/mercadolibre-nodejs-sdk
- npm.io page: https://npm.io/package/mercadolibre-nodejs-sdk

## Dependencies (2)

- [@babel/cli](https://npm.io/package/@babel/cli.md) ^7.0.0
- [superagent](https://npm.io/package/superagent.md) 3.7.0

## Recent versions

- 3.0.1 (latest) — 2020-08-05
- 3.0.0 — 2020-07-30
- 1.1.0 — 2020-07-30
- 0.1.1 — 2020-07-23
- 0.0.40 — 2020-07-22
- 0.0.39 — 2020-07-22
- 0.0.38 — 2020-07-22
- 0.0.34 — 2020-07-22
- 0.0.33 — 2020-07-22
- 0.0.32 — 2020-07-22
- 0.0.31 — 2020-07-22
- 0.0.30 — 2020-07-22
- 0.0.20 — 2020-05-29
- 0.0.19 — 2020-05-29
- 0.0.18 — 2020-05-29
- … 2 more at https://npm.io/package/mercadolibre-nodejs-sdk/versions

## README

<h1 align="center">
  <a href="https://developers.mercadolibre.com">
    <img src="https://user-images.githubusercontent.com/1153516/29861072-689ec57e-8d3e-11e7-8368-dd923543258f.jpg" alt="Mercado Libre Developers" width="230"></a>
  </a>
  <br><br>
  MercadoLibre's Node.JS SDK
  <br>
</h1>

<h4 align="center">This is the official Node.JS SDK for MercadoLibre's Platform.</h4>


## Installation

```shell

npm install mercadolibre-nodejs-sdk --save

```

## Usage

```javascript
var meli = require('mercadolibre-nodejs-sdk');

let apiInstance = new meli.ItemsApi();
let id = "id_example"; // String | 
apiInstance.itemsIdGet(id, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

## Or you can use the RestClient
```javascript
var meli = require('mercadolibre-nodejs-sdk');

let apiInstance = new meli.RestClientApi();
let resource = "resource_example"; // String | 
let accessToken = "accessToken_example"; // String | 
apiInstance.resourceGet(resource, accessToken, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

## Example using the RestClient with a POST Item
```javascript
var meli = require('mercadolibre-nodejs-sdk');

var meli = require('mercadolibre-nodejs-sdk');
const InlineObject = {
  "title": "Item de test - No Ofertar",
  "category_id": "MLA5991",
  "price": "350",
  "currency_id": "ARS",
  "available_quantity": "12",
  "buying_mode": "buy_it_now",
  "listing_type_id": "bronze",
  "condition": "new",
  "description": "Item de Teste. Mercado Livre SDK",
  "video_id": "RXWn6kftTHY",
  "pictures": [
    {
      "source": "https://upload.wikimedia.org/wikipedia/commons/f/fd/Ray_Ban_Original_Wayfarer.jpg"
    }
  ]
};

let apiInstance = new meli.RestClientApi();
let resource = "resource_example"; // Example "items" | 
let accessToken = "accessToken_example"; // String | 
let body = InlineObject; // Object | 
apiInstance.resourcePost(resource, accessToken, body, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

## Documentation & Important notes

##### The URIs are relative to https://api.mercadolibre.com

##### The Authorization URL: https://auth.mercadolibre.com.ar/authorization

#####  All docs for the library are located [here](https://github.com/mercadolibre/nodejs-sdk/tree/master/docs)

#####  Check out our examples codes in the folder [examples](https://github.com/mercadolibre/nodejs-sdk/tree/master/examples)

##### Don’t forget to check out our [developer site](https://developers.mercadolibre.com/)

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