Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
A node client for the Box View API
npm install box-view
Create a client:
var myKey = process.env.BOX_VIEW_API_TOKEN;
var client = require('box-view').createClient(myKey);
See the Box View API Documentation for a list of available endpoints and their parameters.
client.documents.list(params, callback)
Fetch a list of documents uploaded using this API key.
params
- (Object
) a map of URL parametersparams.limit
- (int
) The number of documents to return (default: 10, max: 50)params.created_before
- (Date
) An upper limit on the creation timestamps of documents returned (default: now)params.created_after
- (Date
) A lower limit on the creation timestamps of documents returnedcallback
- (function(error, response)
) A callback to call with the response data (or error)client.documents.get(id, fields, callback)
Fetch the metadata for a single document.
id
- (String
) The document uuidfields
- (String
) Comma-separated list of fields to return (e.g., 'id,type,name,status'
); id and type are always returnedcallback
- (function(error, response)
) A callback to call with the response data (or error)client.documents.update(id, data, callback)
Update the metadata for a single document
id
- (String
) The document uuiddata
- (Object
) The new metadata (currently only name
is supported)callback
- (function(error, response)
) A callback to call with the response data (or error)client.documents.delete(id, callback)
Delete a single document
id
- (String
) The document uuidcallback
- (function(error, response)
) A callback to call with the response data (or error)client.documents.uploadFile(file, params, callback)
Do a multipart upload from a file path or readable stream
file
- (String
or stream.Readable
) A path to a file to read or a readable streamparams
- (Object
) Upload parametersparams.name
- (String
) The name of the fileparams.thumbnails
- (String
) Comma-separated list of thumbnail dimensions of the format {width}x{height}
(e.g. '128×128,256×256'
) – width can be between 16 and 1024, height between 16 and 768params.non_svg
- (Boolean
) Whether to also create the non-svg version of the documentcallback
- (function(error, response)
) A callback to call with the response data (or error)client.documents.uploadFile(url, params, callback)
Do a URL upload of a file
url
- (String
) A URL to a publicly-accessible file to uploadparams
- (Object
) Upload parametersparams.name
- (String
) The name of the fileparams.thumbnails
- (String
) Comma-separated list of thumbnail dimensions of the format {width}x{height}
(e.g. '128×128,256×256'
) – width can be between 16 and 1024, height between 16 and 768params.non_svg
- (Boolean
) Whether to also create the non-svg version of the documentcallback
- (function(error, response)
) A callback to call with the response data (or error)client.documents.getContent(id, extension, callback)
Fetches a document in the form specified by extension
, which can be pdf
or zip
.
id
- (string
) The document uuidextension
- (string
) The document format to requestcallback
- (function(error, response)
) A callback to call with the response (or error)client.documents.getThumbnail(id, params, callback)
Fetches a thumbnail for the given document id
id
- (string
) The document uuidparams
- (Object
) The thumbnail paramsparams.width
- (int
) The thumbnail widthparams.height
- (int
) The thumbnail heightcallback
- (function(error, response)
) A callback to call with the response (or error)Request a viewing session for a documentRequest a viewing session for a document
id
- (String
) The document uuidparams
- (Object
) Session parametersparams.duration
- (int
) The duration in minutes until the session expires (default: 60)params.expires_at
- (Date
) The timestamp at which the session should expireparams.is_downloadable
- (boolean
) Whether a the original file will be available for download via GET /sessions/{id}/content while the session is activecallback
- (function(error, response)
) A callback to call with the response data (or error)Copyright 2014 Box, Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
FAQs
A node client for the Box View API
The npm package box-view receives a total of 41 weekly downloads. As such, box-view popularity was classified as not popular.
We found that box-view demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.