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 🙏

© 2025 – Pkg Stats / Ryan Hefner

visualplatform.js

v1.0.2

Published

`visualplatform.js` is a client-side JavaScript library for the read-only parts of the [The 23 Video API](http://www.23developer.com/api) (or more correctly, The Visualplatform API).

Readme

23 Video API for JavaScript and jQuery

visualplatform.js is a client-side JavaScript library for the read-only parts of the The 23 Video API (or more correctly, The Visualplatform API).

The library is designed to work across domains using JSON-P and it requires jQuery.

Using the library

Make sure the library is including the HTML page:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="visualplatform.js"></script>

Making simple request to the open API:

var visualplatform = Visualplatform(yourDomain);
visualplatform.album.list(
  {search:'test'}, 
  function(data){...},
  function(errorMessage){...}
);

Methods can be called as:

visualplatform.photo.section.list(...)
visualplatform['photoSectionList'](...)
visualplatform['/api/photo/section/list'](...)

The first parameter is always a JS object with the filter data described in the API documentation. The second and third parameters are callbacks in the event of success and error respectively.

Concatenating request

If you are making a set of requests, you can boost performance by concatenating them. This makes a single HTTP request to the server and invokes the callback method for each contained api method:

var visualplatform = Visualplatform(yourDomain);
visualplatform.concatenate(
    [
        {name:'settings', method:'/api/player/settings', callback:function(o,name){console.debug(name, o);}},
        {method:'/api/photo/list', data:{photo_id:2628325}, callback:function(o){console.debug('list of videos', o);}}
    ],
    function(all){console.debug('done');},
    function(errorMessage){console.debug(errorMessage);}
);

Extending the library with more API endpoints

Visualplatform.js ship with support for the most common methods in the 23 Video API, but can be extended with for any other API endpoint:

var visualplatform = Visualplatform('mydomain.23video.com', ['/api/action/add', '/api/action/delete',  '/api/action/get']);
visualplatform.action.get(
  {photo_id:1234}, 
  function(data){...},
  function(errorMessage){...}
);

Support for OAuth 1.0a signatures

A number of features in the 23 Video API requires authorization through OAuth 1.0a signatures. The library supports this throug the oauth-1.0a signing library.

To sign requests, make sure the signing library is loaded alongside Visualplatform.js:

<script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/hmac-sha1.js"></script>
<script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/components/enc-base64-min.js"></script>
<script src="oauth-1.0a/oauth-1.0a.js"></script>
<script src="jquery/jquery.js"></script>
<script src="visualplatform.js/visualplatform.js"></script>

Then bootstrap with your API credentials:

var visualplatform = Visualplatform('mydomain.23video.com', [], {
  consumer_key:'<consumer key>', 
  consumer_secret:'<consumer secret>', 
  access_token:'<access token>', 
  access_token_secret:'<access token secret>'
});

After this, simply run requests as described above. Note that OAuth signatures do not work with concatenated requests.

Client vs Server.

The client-side JavaScript library does not support OAuth authentication and it does not allow for any method that requires write, admin or super privileges. For this refer to the Node.js library for the server side.