-
Notifications
You must be signed in to change notification settings - Fork 0
REST API
connercowling edited this page Apr 13, 2015
·
12 revisions
[TODO] Log-in [TODO] Handle whether a user is logged in or not [TODO] Saving / persisting to db
/explore?sort=<'recent'-or-'popular'-or-'random'>
`/explore?content-engine=&sort=<'recent'-or-'popular'-or-'random'>``
/explore?user=<mongodb-user-id>
/develop?content-engine=new
[TODO]
/develop?content-engine=<mongodb-content-engine-id>
{
"content-engine" : {
"_id" : <mongodb-content-engine-id>,
"title" : <developer-provided-string>,
"inputs" : [
<input-type>,
...
<input-type>
],
"developer" : {
"username" : <user-chosen-string>,
"_id" : <mongodb-user-id>
},
"parent" : <mongodb-content-engine-id>,
"code" : {
"configure" : <developer-provided-code>,
"html" : <developer-provided-code>,
"css" : <developer-provided-code>,
"javascript" : <developer-provided-code>
}
}
}
/contribute?contribution=new
[TODO]
/contribute?contribution=<mongodb-contribution-id>
{
"content-engine" : {
"_id" : <mongodb-content-engine-id>,
"title" : <developer-provided-string>,
"inputs" : [
<input-type>,
...
<input-type>
],
"developer" : {
"username" : <user-chosen-string>,
"_id" : <mongodb-user-id>
},
"parent" : <mongodb-content-engine-id>,
"code" : {
"configure" : <developer-provided-code>,
"html" : <developer-provided-code>,
"css" : <developer-provided-code>,
"javascript" : <developer-provided-code>
}
},
"contribution" : {
"_id" : <mongodb-contribution-id>,
"contributor" : <mongodb-user-id>,
"title" : <contributor-provided-string>,
"content-engine" : <mongodb-content-engine-id>,
"likes" : [
<user-id-1>,
...
<user-id-n>
],
"sources" : [
<developer-provided-string-1>,
...
<developer-provided-string-2>
],
"inputs" : [
{
"type" : <type-identifier>,
"name" : <developer-provided-name>,
"value" : <contributor-provided-value>
},
...
{
"type" : <type-identifier>,
"name" : <developer-provided-name>,
"value" : <contributor-provided-value>
}
]
}
}