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

septem

v1.0.2

Published

API bindings for Scene7 API

Downloads

2

Readme

septem

"Septem" is latin for seven, and this package is a thin wrapper around the Scene7 API. Current implementation is limited to a few of the API calls, detailed below. Over time, the endpoints supported will expand.

Installation

This module is installed via npm

npm install --save septem

Quick Start

Configuration

The tool is controlled via standard configuration options, using the npm rc module. See the rc docs for more details on options.

The Scene7 API requires several common parameters which must be supplied by the user.

{
  appName: "septem",
  appVersion: "defaults to current septem pkg version",
  uid: "insert_your_scene7_uid",
  pwd: "insert_your_scene7_pwd"
}

Usage

Note: the initial require() returns a function, to which you can pass any options that are not defaulted or are not handled in rc files.

NOTE: It is not recommended to include authorization secrets in source code.

// Use defaults or config provided through rc
const septem = require('septem')();

// or override/supply your own...
const septem = require('septem')({
  appName: 'my app name'
  appVersion: '1.0.0'
});

septem object

method: getCompany(companyName)

The Scene7 UI and API use a company context, and a user can be a member or 0 or more companies. The name of the company (companyName) is the value that is in the drop-down box on the Scene7 UI. Return value is an object reference to a company object that will be used for all further API calls.

const septem = require('septem')();
const company = septem.getCompany('company_name')   // from the Scene7 UI company drop-down

company object

method: getImageFormats()

This method returns an array of default image formats for the company. Each element will have the following structure:

{
  imageFormatHandle: 'i|012345|01234567',
  name: 'format_name',
  urlModifier: 'wid=400&hei=400'
}

method: findAssetsNameContains(prod)

This method returns an array of asset information, searching for any assets that CONTAIN the text in 'prod'. Each element will have the following structure:

{
  assetHandle: 'a|0123457890',
  filename: 'filename.png',
  createUser: '',
  lastModifyUser: '',
  type: 'Image',
  name: 'image_name',
  folder: 'companyName/folderName',
  folderHandle: 'f|cmp|fld',
  readyForPublish: 'true',
  trashState: 'NotInTrash',
  projects: '',
  ipsImageUrl: 'companyName/name',
  created: 'timestamp',
  lastModified: 'timestamp',
  imageInfo: {
    originalPath: 'companyName/_master_/012/',
    originalFile: '<uuid>.png',
    width: '2150',
    height: '2150',
    fileSize: '2873900',
    resolution: '300.0',
    sku: '',
    description: ''
  }
}