This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib | |
import urllib2 | |
api_token = "FF00FF" # your api token | |
## | |
# Create a new folder | |
# POST to https://api.sketchfab.com/v1/folders | |
## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Ensure that you have MultipartForm imported in your project | |
*/ | |
string url = @ "https://api.sketchfab.com/v1/models"; | |
MultipartForm form = new MultipartForm (url); | |
form.SetField ("title", "Uber Glasses"); | |
form.SetField ("description", "Test of the api with a simple model"); | |
form.SetField ("token", "FF00FF"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
from django.db import models | |
from rest_framework import serializers | |
class Toto(models.Model): | |
description = models.CharField() | |
is_lol = models.BooleanField() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// AppDelegate.m | |
// Upload to Sketchfab sample code | |
// | |
// Created by Pierre-Antoine Passet on 11/26/13. | |
// Copyright (c) 2013 Sketchfab. All rights reserved. | |
// | |
#import "AppDelegate.h" | |
#import "AFHTTPRequestOperation.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# crafted with love by https://github.com/cambonf | |
from __future__ import print_function | |
from urllib.request import urlopen, Request | |
import mimetypes | |
import random | |
import string | |
# Encode form-data without external dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# easy_install poster | |
import datetime | |
import threading | |
from poster.encode import multipart_encode | |
from poster.streaminghttp import register_openers | |
import urllib2 | |
import json | |
import base64 | |
register_openers() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( function ( root, factory ) { | |
root[ 'sketchfab-iframe' ] = factory( ); | |
} ( this, function ( ) { | |
/** | |
* almond 0.2.5 Copyright (c) 2011-2012, The Dojo Foundation All Rights Reserved. | |
* Available via the MIT or new BSD license. | |
* see: http://github.com/jrburke/almond for details | |
*/ | |
//Going sloppy to avoid 'use strict' string cost, but strict practices should |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# Sample script for uploading to sketchfab | |
# using the v2 api and the requests library | |
## | |
from time import sleep | |
# import the requests library | |
# http://docs.python-requests.org/en/latest | |
# pip install requests | |
import requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying that +pap is my openname (Bitcoin username). https://onename.io/pap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
# urls for matching models | |
regex = re.compile(r'^http(s?)://sketchfab.com/(show|models)/(?P<urlid>\w+)') | |
# Examples | |
https://sketchfab.com/models/62d77e6a14284e91b2f737d6909e965d | |
https://sketchfab.com/models/b7LzIm8JrnPw4GBDOMBNGYc39qM | |
https://sketchfab.com/models/4f4802d5c24847fda35408eed5f9a066 |
OlderNewer