1.0.6 • Published 4 years ago

melif v1.0.6

Weekly downloads
8
License
MIT
Repository
github
Last release
4 years ago

Melif

FOSSA Status

Melif is an SDK that helps in the integration between the developer and the Mercado Libre API

Installation

Use npm or yarn to perform the installation.

npm install melif

or

yarn add melif

Usage

First, you need to create an instance of melif with your information.

var M = require('melif')

// Fill in the required information
const Melif = new M({
    api_root_url: 'https://api.mercadolibre.com',
    auth_url: 'https://auth.mercadolibre.com/authorization',
    oauth_url: 'https://api.mercadolibre.com/oauth/token',
    client_id: 'your mercado libre client_id',
    client_secret: 'your mercado libre client_secret',
});

module.exports = Melif;

Now just import your instance of Melif and use it!

const Melif = require('./Melif');

// Now you can use all the methods of melif!
var auth_url = Melif.getAuthUrl("http://localhost:3000/v1/authentication/authorize");

console.log(auth_url)

Features

authorize(...)
getAuthUrl(...)
refreshToken(...)

getUserById(...)
getUserByNickname(...)
getUserReputationById(...)

createItem(...)
getItemIdsByUserId(...)
getItemsByIds(...)
getItemById(...)
getDescriptionById(...)
setDescriptionById(...)
setItemStatusById(...)

getOrderByResource(...)
setOrderAsDeliveredById(...)

getQuestionByResource(...)
answerQuestionById(...)

getMessagesByOrderAndSellerId(...)
sendMessageByOrder(...)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

FOSSA Status

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago