Skip to content

Interact with Mercado Libre from your Fish shell

License

Notifications You must be signed in to change notification settings

coiti/meli.fish

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

meli.fish

Interact with Mercado Libre's API from your fish shell.

Installation

With Fisher:

fisher install coiti/meli.fish

Requirements

Make requests

Making requests to the API is simple.

# Fetch all sites
meli sites

# Works also with a partial or full URL
meli https://api.mercadolibre.com/sites

# Fetch private user information
meli --access-token=$access_token users/me

# You can also store the access token on a variable that meli will pick up
set MELI_ACCESS_TOKEN $access_token
meli users/me

# Pass query parameters as arguments
set user_id (meli users/me --attributes=id | jq --raw-output .id)
meli "users/$user_id/items/search" --include-filters --limit=100 --status=active

You can also make POST requests (along with other HTTP verbs) though I have not tested them at all.

meli get sites/MLU
meli head /
meli options users
meli put "items/$item_id" status=closed
echo '{"title": "Hello World", "price": 14.50}' | meli put "items/$item_id"
meli post items <item.json