melif
v1.0.6
Published
Biblioteca NodeJs criada para facilitar a integração com a API do Mercado Livre
Downloads
15
Maintainers
Readme
Melif
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.