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

paiza-io

v0.2.3

Published

paiza.io unofficial API wrapper - you can run any language on Node.js!

Downloads

15

Readme

node-paiza-io

paiza.io API unofficial wrapper - you can run any language on Node.js!

Thank paiza.io for providing such greatest API!!

npm Build Status Dependency Status

notice for using

this package uses paiza.io's API. so please read term of use (Japanese only)!

install

$ npm install --save paiza-io

using

run Ruby on Node.js.

var
paiza_io = require('paiza-io');

paiza_io('ruby', 'puts "Hello, Ruby World!"', '', function (error, result) {
  if (error) throw error;
  console.log('ruby result:');
  console.log(result.stdout); //=> Hello, Ruby World!
});

run Python on Node.js.

var
paiza_io = require('paiza-io');

paiza_io('python', 'print "Hello, Python World!"', '', function (error, result) {
  if (error) throw error;
  console.log('python result:');
  console.log(result.stdout); //=> Hello, Python World!
});

run C++ on Node.js.

var
paiza_io = require('paiza-io');

paiza_io('cpp', [
  '#include <iostream>',
  'int main(void) {',
  '  std::cout << "Hello, C++ World!" << std::endl;',
  '}',
].join('\n'), '', function (error, result) {
  if (error) throw error;
  console.log('c++ result:');
  console.log(result.stdout); //=> Hello, C++ World!
});

api

you may want to read official API document with this.

paiza_io(lang, code, input, option, callback)

arguments

  • lang is language name. it will be passed as language parameter to runners/create.
  • code is source code. it will be passed as source_code parameter to runners/create.
  • input is stdin text. it will be passed as input parameter to runners/create.
  • option is a json. it is an optional argument. it follws such keys/values.
    • option.api_key is your API key of paiza-io. it will be passed as api_key parameter to all request.
    • option.base_url uses as base URL for API request.
    • option.max_get_status_loop is max number of runners/get_status request for checking completed running. If requests number is overflow this, paiza_io throws an error.
    • option.retry_get_status_time is a time of retrying runners/get_status.
    • option.parameter will be passed to runners/create.
  • callback is a Function whose signature is function callback(error, result). result is result json of runners/get_details, however it is extended by http_result parameter which is http response of runners/get_details.

returns

it dosen't return clearly, so its result is undefined.


paiza_io.with_api_key(api_key)

arguments

  • api_key is your API key of paiza-io. it will be passed as api_key parameter to all request.

returns

it returns wrapped paiza_io function.

license

this package was published under the MIT-License.

contribute

if this package has a bug and you fix it, i am waiting your pull-request and issue :laughing: