2017 © Pedro Peláez
 

library sketchfab-php

A Laravel package for uploading 3D objects to the Sketchfab API.

image

manulith/sketchfab-php

A Laravel package for uploading 3D objects to the Sketchfab API.

  • Thursday, October 13, 2016
  • by fitztrev
  • Repository
  • 2 Watchers
  • 1 Stars
  • 911 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 2 Versions
  • 1 % Grown

The README.md

Sketchfab PHP

This is a Laravel package for uploading 3D objects to the Sketchfab API., (*1)

Installation

  1. Add "manulith/sketchfab-php": "dev-master" to composer.json.
  2. Run composer update
  3. Publish your config
$ php artisan vendor:publish"

Then, set your API key in config/sketchfab.php, (*2)

Usage

Upload an object

Simple:, (*3)

<?php
$file = '/path/to/file.stl';
$response = Sketchfab::upload($file);
echo $response['uid'];

With optional parameters:, (*4)

<?php
$file = '/path/to/file.stl';
$options = array(
    'name'        => 'My awesome object',
    'description' => 'This is just a test file.',
    'tags'        => 'awesome fun',
    'private'     => true,
    'password'    => 'letmein',
);
$response = Sketchfab::upload($file, $options);
echo $response['uid'];

Check status of an object

<?php
$response = Sketchfab::status('cnTC9viItfZ1fdT811NgEVafw1S');
echo $response['processing'];

Get oEmbed info for an object

<?php
$response = Sketchfab::info('cnTC9viItfZ1fdT811NgEVafw1S');
print_r($response);

Embed an object

Simple:, (*5)

<?php
echo Sketchfab::embed('cnTC9viItfZ1fdT811NgEVafw1S');

With optional parameters:, (*6)

<?php
$options = array(
    'width'       => 320, // or '100%'
    'height'      => 280,
    'ui_infos'    => 1,
    'ui_controls' => 1,
    'ui_stop'     => 1,
    'autostart'   => 1,
);
echo Sketchfab::embed('cnTC9viItfZ1fdT811NgEVafw1S');

The Versions

13/10 2016

dev-master

9999999-dev https://manulith.com

A Laravel package for uploading 3D objects to the Sketchfab API.

  Sources   Download

MIT

The Requires

 

by Manulith

laravel l4 sketchfab

14/07 2014

v0.1.0

0.1.0.0 https://manulith.com

A Laravel package for uploading 3D objects to the Sketchfab API.

  Sources   Download

MIT

The Requires

 

by Manulith

laravel l4 sketchfab