Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event schema #3

Merged
merged 8 commits into from Jun 25, 2018
Merged

Event schema #3

merged 8 commits into from Jun 25, 2018

Conversation

loleg
Copy link
Member

@loleg loleg commented Jun 24, 2018

Initial API call for dribdat#112 which provides a schema.org compatible Event API at /api/event/1/hackathon.json which looks like this:

{
    "@context": "http://schema.org",
    "@type": "Event",
    "description": "Lorem ipsum",
    "endDate": "Sat, 26 Sep 2020 17:00:00 GMT",
    "image": [
        "http://...jpg"
    ],
    "location": {
        "@type": "Place",
        "address": "Kraftwerk",
        "name": "EWZ"
    },
    "name": "Alpha Beta hackathon",
    "offers": {
        "@type": "Offer",
        "url": "https://..."
    },
    "startDate": "Sat, 25 Sep 2010 09:00:00 GMT"
}

@gonzalocasas
Copy link

Looking good! Could you add url to the output also?
For reference, here's the output on makezurich.ch:

{
	"@context": "http://www.schema.org",
	"@type": "Event",
	"name": "Make Zurich Vol. II",
	"url": "https://makezurich.ch/",
	"description": "Civic Tech and LoRaWAN Hackathon for a better city ",
	"startDate": "2018-06-22",
	"endDate": "2018-06-30",
	"image": "https://makezurich.ch/images/logo-inv.png",
	"location": {
		"@type": "Place",
		"name": "Kraftwerk",
		"address": {
			"@type": "PostalAddress",
			"streetAddress": "Selnaustrasse 25",
			"addressLocality": "Zürich",
			"addressRegion": "Zürich",
			"postalCode": "8001",
			"addressCountry": "Switzerland"
		},
		"geo": {
			"@type": "GeoCoordinates",
			"latitude": 47.3722277,
			"longitude": 8.53201869999993
		}
	}
}

@loleg loleg changed the title Initial Event schema API Event schema Jun 25, 2018
@loleg
Copy link
Member Author

loleg commented Jun 25, 2018

Done. Additionally the schema is now accessible at /hackathon.json

@gonzalocasas
Copy link

LGTM! 🚀 :shipit:

@loleg loleg merged commit dbf23a4 into makezurich:master Jun 25, 2018
@loleg
Copy link
Member Author

loleg commented Jun 25, 2018

loleg added a commit that referenced this pull request Oct 19, 2020
loleg added a commit that referenced this pull request May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants