Skip to content

Instantly share code, notes, and snippets.

@datafatmunger
Created August 18, 2012 13:35
Show Gist options
  • Save datafatmunger/3386877 to your computer and use it in GitHub Desktop.
Save datafatmunger/3386877 to your computer and use it in GitHub Desktop.
Ideedock Request Examples
// Example Ideedock Requests
// - /topic/questions
{
id: Utils.generateGUID(),
question: 'What the heck am I doing here?',
user: authenticatedUser,
created: date,
time: date,
end: new Date(new Date().setDate(date.getDate() + 2)),
url: 'dev.ideedock.com',
clientId: clientGUID,
token: authenticatedUser.token
};
// - /topic/answers
{
id: Utils.generateGUID(),
questionId: 'b98ea39b-f44e-4f89-b32f-dc450bb84565',
answer: 'I am an awesome answer!',
time: new Date(),
user: authenticatedUser,
url: 'dev.ideedock.com',
clientId: clientGUID,
token: authenticatedUser.token
};
// - /topic/login
{
email: 'sophie@example.com',
password: 'password',
url: 'dev.ideedock.com'
};
// - /topic/signup
{
name: 'Sophie',
email: 'sophie@example.com',
password: 'password',
url: 'dev.ideedock.com'
};
// - /topic/clients (tells the server you are connected)
{
clientId: Utils.generateGUID(),
url: 'dev.ideedock.com'
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment