{
    "description": "Space API 0.13",
    "type": "object",
    "properties": {
        "api": {
            "description": "The space api version you use",
            "type": "string",
            "required": true,
            "enum": ["0.13"]
        },
        "space": {
            "description": "The space name",
            "type": "string",
            "required": true
        },
        "logo": {
            "description": "The space logo",
            "type": "string",
            "required": true
        },
        "url": {
            "description": "The main website",
            "required": true,
            "type": "string"
        },
        "location": {
            "description": "Position data such as a postal address or geographic coordinates",
            "required": true,
            "type": "object",
            "properties": {
                "address": {
                    "description": "The space address",
                    "required": false,
                    "type": "string"
                },
                "lat": {
                    "description": "Latitude of your space location",
                    "required": true,
                    "type": "number"
                },
                "lon": {
                    "description": "Longitude of your space location",
                    "required": true,
                    "type": "number"
                }
            }
        },
        "spacefed-auth": {
            "description": "A Flag indicating if the hackerspace uses spacefed - a federated login scheme so that visiting hackers can use the space wifi with their home space credentials.",
            "required": false,
            "type": "boolean"
        },
        "cam": {
            "description": "",
            "required": false,
            "type": "array",
            "items": {
                "type": "string"
            },
            "minItems": 1
        },
        "stream": {
            "description": "",
            "required": false,
            "type": "object"
        },
        "state": {
            "description": "A collection of status-related data. Actual open/closed status, icons, last change timestamp etc.",
            "required": true,
            "type": "object",
            "properties": {
                "open": {
                    "description": "",
                    "required": true,
                    "type": "boolean"
                },
                "lastchange": {
                    "description": "At what (unix) timestamp has your space status lastly changed?",
                    "required": false,
                    "type": "number"
                },
                "message": {
                    "description": "A free-form string something like 'open for public', 'members only' or whatever you want it to be)",
                    "required": false,
                    "type": "string"
                },
                "icon": {
                    "description": "Icons that show the status graphically",
                    "type": "object",
                    "required": false,
                    "properties": {
                        "open": {
                            "description": "This could be your customized space logo showing an open space",
                            "type": "string",
                            "required": true
                        },
                        "closed": {
                            "description": "This could be your customized space logo showing a closed space",
                            "type": "string",
                            "required": true
                        }
                    }
                }
            }
        },
        "events": {
            "description": "These are events something like 'X has entered/triggered/did Y at timestamp Z'",
            "required": false,
            "type": "array",
            "items": {
                "required": false,
                "type": "object",
                "properties": {
                    "name": {
                        "description": "Person/Computer/Item X or whatever name",
                        "required": true,
                        "type": "string"
                    },
                    "type": {
                        "description": "Type name (e.g. check-in, check-out, ...)",
                        "required": true,
                        "type": "string"
                    },
                    "timestamp": {
                        "description": "Unix timestamp when the event occured",
                        "required": true,
                        "type": "number"
                    },
                    "extra": {
                        "description": "An custom text field",
                        "required": false,
                        "type": "string"
                    }
                }
            }
        },
        "contact": {
            "description": "",
            "required": true,
            "type": "object",
            "properties": {
                "phone": {
                    "description": "",
                    "required": false,
                    "type": "string"
                },
                "sip": {
                    "description": "",
                    "required": false,
                    "type": "string"
                },
                "keymaster": {
                    "description": "",
                    "required": false,
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "irc": {
                    "description": "",
                    "required": false,
                    "type": "string"
                },
                "twitter": {
                    "description": "",
                    "required": false,
                    "type": "string"
                },
                "identica": {
                    "description": "",
                    "required": false,
                    "type": "string"
                },
                "email": {
                    "description": "Email address to which other people can contact your space",
                    "required": false,
                    "type": "string"
                },
                "ml": {
                    "description": "The email address of your mailing list. If you use google groups then the email looks like your-group@googlegroups.com",
                    "required": false,
                    "type": "string"
                },
                "jabber": {
                    "description": "",
                    "required": false,
                    "type": "string"
                },
                "issue-mail": {
                    "description": "A seperate email address for issue reports (see the issue-report-channels field). The value can be base64-encoded.",
                    "required": false,
                    "type": "string"
                }
            }
        },
        "issue-report-channels": {
            "description": "Define all the communication channels where you want to get issue reports. At least one must be defined.",
            "required": true,
            "type": "array",
            "items": {
                "type": "string",
                "enum": ["email", "issue-mail", "twitter", "ml"]
            },
            "minItems": 1
        },
        "sensors": {
            "description": "",
            "required": false,
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "temp": {
                        "description": "",
                        "required": false,
                        "type": "object"
                    }
                }
            }
        },
        "feeds": {
            "description": "",
            "required": false,
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "name": {
                        "description": "",
                        "required": true,
                        "type": "string"
                    },
                    "type": {
                        "description": "",
                        "required": false,
                        "type": "string"
                    },
                    "url": {
                        "description": "",
                        "required": true,
                        "type": "string"
                    }
                }
            }
        },
        "cache": {
            "description": "use the cache if you want avoid hundreds/thousands of app instances crawling your space status. Just choose a cache update cycle (m = minutes, h = hours, d = days)",
            "required": false,
            "type": "object",
            "properties": {
                "schedule": {
                    "description": "",
                    "type": "string",
                    "required": true,
                    "enum": ["m.02", "m.05", "m.10"]
                }
            }
        },
        "projects": {
            "description": "Your project sites (links to github, wikis or wherever your projects are hosted)",
            "required": false,
            "type": "array",
            "items": {
                "type": "string"
            }
        }
    }
}