Skip to content

Instantly share code, notes, and snippets.

View dschulten's full-sized avatar

Dietrich Schulten dschulten

View GitHub Profile
@dschulten
dschulten / events.jsonld
Created September 21, 2014 15:21
Event list with POST operation
{
"@context": {
"@vocab": "http://schema.org",
"hydra": "http://www.w3.org/ns/hydra/core#"
},
"@id": "http://www.markus-lanthaler.com/hydra/event-api/events/",
"@type": "hydra:Collection",
"hydra:member": [
{
"@id": "http://www.markus-lanthaler.com/hydra/event-api/events/1",
@dschulten
dschulten / event-api-entrypoint.jsonld
Created September 21, 2014 15:18
Entrypoint for an event API
{
"@context": {
"@vocab" : "http://schema.org",
"hydra" : "http://www.w3.org/ns/hydra/core#"
},
"@id": "http://www.markus-lanthaler.com/hydra/event-api/",
"@type": "hydra:EntryPoint",
"event": {
"@id": "http://www.markus-lanthaler.com/hydra/event-api/events/",
"@type": "hydra:Link"
@dschulten
dschulten / ChoosePlanetSteps.java
Created July 25, 2013 16:55
Demo code that shows how to use Robotium RC with the Spinner sample app from the SDK and JBehave. It was necessary to create a RobotiumRC class with separate setup and teardown routines, e.g. to be called from a JUnit setup/teardown or from JBehave @BeforeStories and @AfterStories routines.
package com.example.robotiumrc;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import org.jbehave.core.annotations.AfterStory;
import org.jbehave.core.annotations.BeforeStory;
import org.jbehave.core.annotations.Given;
import org.jbehave.core.annotations.Then;
@dschulten
dschulten / gist:5696110
Last active December 18, 2015 00:19
Possible HAL equivalent to forms
// HAL "form" for single-item-resource. Clients must query OPTIONS for /account
// to ensure they can PUT, POST, DELETE, GET. The profile attribute contains a json-schema
// which can also be requested in other media types from /rels/account.
{
"userName": "Fred",
"realName": "Fred Flintstone",
"password": "yabbadabba",
"_links": {
"self": {