Skip to content

Instantly share code, notes, and snippets.

View bobvanluijt's full-sized avatar

Bob van Luijt bobvanluijt

View GitHub Profile
@bobvanluijt
bobvanluijt / Weave - registrationTickets.json
Created February 6, 2017 21:22
Weave - registrationTickets
{
"RegistrationTicket": {
"externalTypeName": "clouddevices.RegistrationTicket",
"properties": {
"creationTimeMs": {
"description": "Creation timestamp of the registration ticket in milliseconds since epoch UTC.",
"format": "int64",
"type": "string"
},
"deviceDraft": {
@bobvanluijt
bobvanluijt / Weave - personalizedInfos.json
Created February 6, 2017 21:17
Weave - personalizedInfos
{
"PersonalizedInfo": {
"externalTypeName": "clouddevices.PersonalizedInfo",
"properties": {
"id": {
"default": "me",
"description": "Unique personalizedInfo ID. Value: the fixed string \"me\".",
"type": "string"
},
"kind": {
@bobvanluijt
bobvanluijt / Weave - modelManifest.json
Created February 6, 2017 21:14
Weave - modelManifest
{
"ModelManifest": {
"description": "Model manifest info.",
"externalTypeName": "clouddevices.ModelManifest",
"properties": {
"allowedChildModelManifestIds": {
"description": "For gateways, a list of device ids that are allowed to connect to it.",
"items": {
"type": "string"
},
@bobvanluijt
bobvanluijt / Weave - event.json
Created February 6, 2017 21:11
Weave - event
{
"Event": {
"externalTypeName": "clouddevices.Event",
"properties": {
"commandPatch": {
"description": "Command-related changes (if applicable).",
"properties": {
"commandId": {
"description": "ID of the affected command.",
"type": "string"
@bobvanluijt
bobvanluijt / Weave - devices.json
Created February 6, 2017 21:08
Weave - devices
{
"Device": {
"externalTypeName": "clouddevices.Device",
"properties": {
"certFingerprint": {
"description": "The HTTPS certificate fingerprint used to secure communication with device..",
"type": "string"
},
"channel": {
"description": "Device notification channel description.",
@bobvanluijt
bobvanluijt / Weave - commands.json
Created February 6, 2017 21:03
Weave - commands
{
"Command": {
"externalTypeName": "clouddevices.Command",
"properties": {
"blobParameters": {
"$ref": "#/definitions/JsonObject",
"description": "Blob parameters list."
},
"blobResults": {
"$ref": "#/definitions/JsonObject",
@bobvanluijt
bobvanluijt / Weave - authorizedApps.json
Created February 6, 2017 21:00
Weave - authorizedApps
{
"AuthorizedApp": {
"properties": {
"androidApps": {
"description": "Android apps authorized under this project ID.",
"items": {
"properties": {
"certificate_hash": {
"description": "Android certificate hash.",
"type": "string"
@bobvanluijt
bobvanluijt / Weave - aclEntries.json
Created February 6, 2017 20:55
Weave - aclEntries
{
"AclEntry": {
"properties": {
"cloudAccessRevoked": {
"description": "Indicates whether the AclEntry has been revoked from the cloud and the user has no cloud access, but they still might have local auth tokens that are valid and can access the device and execute commands locally. See localAccessInfo for local auth details.",
"type": "boolean"
},
"creatorEmail": {
"description": "User who created this entry. At the moment it is populated only when pending == true.",
"type": "string"
@bobvanluijt
bobvanluijt / Weave - Adapters.json
Created February 6, 2017 20:30
Weave - Adapters
{
"Adapter": {
"properties": {
"activateUrl": {
"description": "URL to adapter web flow to activate the adapter. Deprecated, use the activationUrl returned in the response of the Adapters.activate API.",
"type": "string"
},
"activated": {
"description": "Whether this adapter has been activated for the current user.",
"type": "boolean"
@bobvanluijt
bobvanluijt / fullscreen-video.js
Created April 6, 2016 14:57
Center a video element in full screen mode
/**
* Set the video sizes
*/
var videoWith = 1280,
videoHeight = 720;
/**
* The magic
*/
var videoRatio = videoHeight / videoWith,