Skip to content

primer commit #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions endpoints/auto/badwords.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"getAll": {
"description": "Gets all entries from 'badwords'",
"route": "/badwords",
"method": "GET",
"sql": "SELECT * FROM badwords",
"auth_required": false,
"allowed_roles": [
"*"
]
},
"getById": {
"description": "Gets an entry from 'badwords' by its primary key",
"route": "/badwords/$wordId",
"method": "GET",
"sql": "SELECT * FROM badwords WHERE wordId = $wordId",
"auth_required": false,
"allowed_roles": [
"*"
]
},
"create": {
"description": "Creates a new entry in 'badwords'",
"route": "/badwords",
"method": "POST",
"sql": "INSERT INTO badwords (word) VALUES ($word)",
"request_body_params": [
"word"
],
"auth_required": true,
"allowed_roles": [
"*"
]
},
"update": {
"description": "Updates an existing entry in 'badwords' by its primary key",
"route": "/badwords/$wordId",
"method": "PUT",
"sql": "UPDATE badwords SET word = $word WHERE wordId = $wordId",
"request_body_params": [
"word"
],
"auth_required": true,
"allowed_roles": [
"*"
]
},
"delete": {
"description": "Deletes an existing entry in 'badwords' by its primary key",
"route": "/badwords/$wordId",
"method": "DELETE",
"sql": "DELETE FROM badwords WHERE wordId = $wordId",
"auth_required": true,
"allowed_roles": [
"*"
]
}
}
64 changes: 64 additions & 0 deletions endpoints/auto/comments.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"getAll": {
"description": "Gets all entries from 'comments'",
"route": "/comments",
"method": "GET",
"sql": "SELECT * FROM comments",
"auth_required": false,
"allowed_roles": [
"*"
]
},
"getById": {
"description": "Gets an entry from 'comments' by its primary key",
"route": "/comments/$commentId",
"method": "GET",
"sql": "SELECT * FROM comments WHERE commentId = $commentId",
"auth_required": false,
"allowed_roles": [
"*"
]
},
"create": {
"description": "Creates a new entry in 'comments'",
"route": "/comments",
"method": "POST",
"sql": "INSERT INTO comments (text, date, userId, photoId) VALUES ($text, $date, $userId, $photoId)",
"request_body_params": [
"text",
"date",
"userId",
"photoId"
],
"auth_required": true,
"allowed_roles": [
"*"
]
},
"update": {
"description": "Updates an existing entry in 'comments' by its primary key",
"route": "/comments/$commentId",
"method": "PUT",
"sql": "UPDATE comments SET text = $text, date = $date, userId = $userId, photoId = $photoId WHERE commentId = $commentId",
"request_body_params": [
"text",
"date",
"userId",
"photoId"
],
"auth_required": true,
"allowed_roles": [
"*"
]
},
"delete": {
"description": "Deletes an existing entry in 'comments' by its primary key",
"route": "/comments/$commentId",
"method": "DELETE",
"sql": "DELETE FROM comments WHERE commentId = $commentId",
"auth_required": true,
"allowed_roles": [
"*"
]
}
}
12 changes: 12 additions & 0 deletions endpoints/auto/commentswithusers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"getAll": {
"description": "Gets all entries from 'commentswithusers'",
"route": "/commentswithusers",
"method": "GET",
"sql": "SELECT * FROM commentswithusers",
"auth_required": false,
"allowed_roles": [
"*"
]
}
}
68 changes: 68 additions & 0 deletions endpoints/auto/photos.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"getAll": {
"description": "Gets all entries from 'photos'",
"route": "/photos",
"method": "GET",
"sql": "SELECT * FROM photos",
"auth_required": false,
"allowed_roles": [
"*"
]
},
"getById": {
"description": "Gets an entry from 'photos' by its primary key",
"route": "/photos/$photoId",
"method": "GET",
"sql": "SELECT * FROM photos WHERE photoId = $photoId",
"auth_required": false,
"allowed_roles": [
"*"
]
},
"create": {
"description": "Creates a new entry in 'photos'",
"route": "/photos",
"method": "POST",
"sql": "INSERT INTO photos (title, description, date, url, visibility, userId) VALUES ($title, $description, $date, $url, $visibility, $userId)",
"request_body_params": [
"title",
"description",
"date",
"url",
"visibility",
"userId"
],
"auth_required": true,
"allowed_roles": [
"*"
]
},
"update": {
"description": "Updates an existing entry in 'photos' by its primary key",
"route": "/photos/$photoId",
"method": "PUT",
"sql": "UPDATE photos SET title = $title, description = $description, date = $date, url = $url, visibility = $visibility, userId = $userId WHERE photoId = $photoId",
"request_body_params": [
"title",
"description",
"date",
"url",
"visibility",
"userId"
],
"auth_required": true,
"allowed_roles": [
"*"
]
},
"delete": {
"description": "Deletes an existing entry in 'photos' by its primary key",
"route": "/photos/$photoId",
"method": "DELETE",
"sql": "DELETE FROM photos WHERE photoId = $photoId",
"auth_required": true,
"allowed_roles": [
"*"
]
}
}
60 changes: 60 additions & 0 deletions endpoints/auto/photostags.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"getAll": {
"description": "Gets all entries from 'photostags'",
"route": "/photostags",
"method": "GET",
"sql": "SELECT * FROM photostags",
"auth_required": false,
"allowed_roles": [
"*"
]
},
"getById": {
"description": "Gets an entry from 'photostags' by its primary key",
"route": "/photostags/$photoTagId",
"method": "GET",
"sql": "SELECT * FROM photostags WHERE photoTagId = $photoTagId",
"auth_required": false,
"allowed_roles": [
"*"
]
},
"create": {
"description": "Creates a new entry in 'photostags'",
"route": "/photostags",
"method": "POST",
"sql": "INSERT INTO photostags (photoId, tagId) VALUES ($photoId, $tagId)",
"request_body_params": [
"photoId",
"tagId"
],
"auth_required": true,
"allowed_roles": [
"*"
]
},
"update": {
"description": "Updates an existing entry in 'photostags' by its primary key",
"route": "/photostags/$photoTagId",
"method": "PUT",
"sql": "UPDATE photostags SET photoId = $photoId, tagId = $tagId WHERE photoTagId = $photoTagId",
"request_body_params": [
"photoId",
"tagId"
],
"auth_required": true,
"allowed_roles": [
"*"
]
},
"delete": {
"description": "Deletes an existing entry in 'photostags' by its primary key",
"route": "/photostags/$photoTagId",
"method": "DELETE",
"sql": "DELETE FROM photostags WHERE photoTagId = $photoTagId",
"auth_required": true,
"allowed_roles": [
"*"
]
}
}
12 changes: 12 additions & 0 deletions endpoints/auto/photoswithusers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"getAll": {
"description": "Gets all entries from 'photoswithusers'",
"route": "/photoswithusers",
"method": "GET",
"sql": "SELECT * FROM photoswithusers",
"auth_required": false,
"allowed_roles": [
"*"
]
}
}
58 changes: 58 additions & 0 deletions endpoints/auto/tags.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"getAll": {
"description": "Gets all entries from 'tags'",
"route": "/tags",
"method": "GET",
"sql": "SELECT * FROM tags",
"auth_required": false,
"allowed_roles": [
"*"
]
},
"getById": {
"description": "Gets an entry from 'tags' by its primary key",
"route": "/tags/$tagId",
"method": "GET",
"sql": "SELECT * FROM tags WHERE tagId = $tagId",
"auth_required": false,
"allowed_roles": [
"*"
]
},
"create": {
"description": "Creates a new entry in 'tags'",
"route": "/tags",
"method": "POST",
"sql": "INSERT INTO tags (name) VALUES ($name)",
"request_body_params": [
"name"
],
"auth_required": true,
"allowed_roles": [
"*"
]
},
"update": {
"description": "Updates an existing entry in 'tags' by its primary key",
"route": "/tags/$tagId",
"method": "PUT",
"sql": "UPDATE tags SET name = $name WHERE tagId = $tagId",
"request_body_params": [
"name"
],
"auth_required": true,
"allowed_roles": [
"*"
]
},
"delete": {
"description": "Deletes an existing entry in 'tags' by its primary key",
"route": "/tags/$tagId",
"method": "DELETE",
"sql": "DELETE FROM tags WHERE tagId = $tagId",
"auth_required": true,
"allowed_roles": [
"*"
]
}
}
Loading