Socket
Socket
Sign inDemoInstall

grunt-box-view

Package Overview
Dependencies
51
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    grunt-box-view

Box View API grunt tasks


Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Install size
777 kB
Created
Weekly downloads
 

Readme

Source

grunt-box-view

Box View API grunt tasks

Getting Started

This plugin requires Grunt ~0.4.5

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-box-view --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-box-view');

The "boxview-upload" task

Upload a document to the View API

Overview

In your project's Gruntfile, add a section named boxview-upload to the data object passed into grunt.initConfig().

grunt.initConfig({
  'boxview-upload': {
    somefile: {
      options: {
        file: '/path/to/some/file.pdf'
        uploadOptions: {
          'non_svg': true
        }
      }
    }
  },
});

Options

options.file

Type: String Default value: null

A string value of a local file to upload.

options.url

Type: String Default value: null

A string value of a URL to a file to upload.

options.uploadOptions

Type: Object Default value: {}

An object representing the upload parameters to use (see node-box-view docs for more details).

The "boxview-session" task

Create a session for a document on the View API

Overview

In your project's Gruntfile, add a section named boxview-session to the data object passed into grunt.initConfig().

grunt.initConfig({
  'boxview-session': {
    somefile: {
      options: {
        documentId: 'somedocumentuuid'
        sessionOptions: {
          duration: 99999999
        }
      }
    }
  },
});

Options

options.documentId

Type: String Default value: null

A string value of the document id to use when creating the session.

options.sessionOptions

Type: Object Default value: {}

An object representing the session parameters to use (see node-box-view docs for more details).

The "boxview-view" task

Upload and create a session for a document on the View API

Overview

In your project's Gruntfile, add a section named boxview-view to the data object passed into grunt.initConfig().

grunt.initConfig({
  'boxview-view': {
    somefile: {
      options: {
        url: 'http://some.url/file.pdf',
        uploadOptions: {
          name: 'awesome pdf'
        },
        sessionOptions: {
          duration: 99999999
        }
      }
    }
  },
});

Options

options.file

Type: String Default value: null

A string value of a local file to upload.

options.url

Type: String Default value: null

A string value of a URL to a file to upload.

options.uploadOptions

Type: Object Default value: {}

An object representing the upload parameters to use (see node-box-view docs for more details).

options.sessionOptions

Type: Object Default value: {}

An object representing the session parameters to use (see node-box-view docs for more details).

The "boxview-list" task

List documents uploaded to the View API

Overview

In your project's Gruntfile, add a section named boxview-list to the data object passed into grunt.initConfig().

grunt.initConfig({
  'boxview-list': {
    mytask: {
      options: {
        limit: 5,
        callback: function (res) {
          console.log(JSON.stringify(res, true, 2));
        }
      }
    }
  },
});

Options

options

An object representing the list parameters to use (see node-box-view docs for more details).

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

Keywords

FAQs

Last updated on 10 Sep 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc