npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@iqz/oriole

v0.14.0

Published

A NodeJS REST client for Magento 2 with full Typescript support.

Downloads

5

Readme

Oriole

npm (scoped) GitHub GitHub last commit

oriole-logo

A NodeJS REST client for Magento 2 with full Typescript support.

This package is largely inspired by Marko Nouvak's magento2-rest-client and Divante Ltd.'s magento2-rest-client packages. What they lacked was full Typescript support, which we've filled in, with some additional tweaks of our own.

This module also uses a full Typescript rewrite of Ddo's oauth-1.0a module among others.

This is a Work-in-Progress. Only a subset of Magento's REST API is implemented. You can help by submitting a PR.

Why "Oriole"?

We were building something else called as Bluebird when this one happened as a by-product. We wanted to have something similarly named. Magento's branding scheme is orange-ish (?) so we did a Google search for "orange coloured birds" and an "oriole" popped up in the results. Hence the name. :P

Installation

npm install @iqz/oriole --save

Usage

You will need to either create an "integration" with Magento 2 or obtain a user token.

To create an integration, you'll have to go to System > Extensions > Integrations and Add New Integration in the Magento 2 admin panel. Give a name and select the scope of the API and save it to obtain the OAuth keys. Then you can do:

import { Oriole } from '@iqz/oriole';

const o = new Oriole({
  oauth: {
    consumerKey: '<your magento consumer key>',
    consumerSecret: '<your magento consumer secret>',
    accessToken: '<your magento access token>',
    accessTokenSecret: '<your magento access secret>'
  },
  url: 'http://localhost:8080/rest' // Put your URL here. It should end with '/rest'
});

console.log(await o.products.list('carrot'));   // Gets you a list of all products searchable by 'carrot'

If you are using a user token, replace the oauth property above with bearer property.

Changelog

The changelog is available here.