summaryrefslogtreecommitdiff
path: root/lib/api/projects.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r--lib/api/projects.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
new file mode 100644
index 0000000..f9e6e94
--- /dev/null
+++ b/lib/api/projects.rb
@@ -0,0 +1,19 @@
+module API
+ # Projects API
+ class Projects < Grape::API
+ before { authenticate! }
+
+ resource :projects do
+ # Retrieve info for a project
+ #
+ # Parameters:
+ # id (required) - The ID of a project
+ # Example Request:
+ # GET /projects/:id
+ get ":id" do
+ project = Project.where(id: params[:id])
+ present project, with: Entities::Project
+ end
+ end
+ end
+end