This project is not covered by Drupal’s security advisory policy.

Integrates the Box View API into Drupal:
https://developers.box.com/view

Using the Box View PHP SDK:
https://github.com/donutdan4114/box-view-api

Dependencies: libraries

Instructions

Download the PHP SDK from github: https://github.com/donutdan4114/box-view-api
Place into your sites/.../libraries/box-view-api folder.

Once you have the module installed, and the library saved, you'll have to set your API Key.
Set the API Key in the admin ( admin/config/services/box/view ).

Test the API by clicking the "load files" button in the admin.

Documentation

Uploading files:

<?php
$doc = box_view_document(array(
  'file_url' => 'http://path.to.file',
));
if(box_view_api_upload($doc)) {
  // Upload successful, do something here.
}
?>

Delete a file:

<?php
$doc = box_view_document(array(
  'id' => 'DOCUMENT_ID_HERE',
));
if(box_view_api_delete($doc)) {
  // Deletion successful.
}
?>

View a file:

<?php
$doc = box_view_document(array(
  'id' => 'DOCUMENT_ID_HERE',
));

// Using the Drupal function, we will cache the Session URL so we don't
// have to refetch it every time we call this function.
if(box_view_api_view($doc)) {
  // Viewing session created.
  drupal_goto($doc->session->url);
}
?>

Created by: CommonPlaces, Inc
Sponsored by: LawJacked, LLC

Project Information

Downloads