From 200fbb7cc751f910bb830cc08ff12860daeb52dc Mon Sep 17 00:00:00 2001 From: wimo7083 Date: Wed, 3 Jan 2018 19:36:10 -0700 Subject: [PATCH 1/8] included scholarship and scholarship app api docs --- apiary.apib | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/apiary.apib b/apiary.apib index bb85d945..34a247f2 100644 --- a/apiary.apib +++ b/apiary.apib @@ -749,6 +749,98 @@ API endpoints that Operation Code's Rails backend makes available to its React f errors: "Some error message" } +## Scholarships | Collection [/api/v1/scholarships] + +### List All Scholarships Available [GET] + ++ Response 200 (application/json) + + [ + { + "id": 5, + "name": "Full Stack Dev-Ops", + "location": "29 Palms", + "terms": "Recent Veterans", + "open_time": "2017-05-30T15:05:39.242Z", + "close_time": "2017-10-30T15:05:39.242Z", + "created_at": "2017-06-30T15:05:39.242Z", + "updated_at": "2017-06-30T15:05:39.242Z" + }, + { + "id": 6, + "name": "UX to UI for U University", + "location": "Florida", + "terms": "Must be Conrad H.", + "open_time": "2018-01-30T15:05:39.242Z", + "close_time": "2018-10-30T15:05:39.242Z", + "created_at": "2017-06-30T15:05:39.242Z", + "updated_at": "2017-06-30T15:05:39.242Z" + } + ] + +## Scholarships | Show [/api/v1/code_schools/{scholarship_id}] ++ Parameters + + + scholarship_id (number) - ID of the Scholarship in the form of an integer + +### Get an Existing CodeSchool [GET] + ++ Response 200 (application/json) + + { + "id": 7, + "name": "Full Stack Dev-Ops", + "location": "29 Palms", + "terms": "Recent Veterans", + "open_time": "2017-05-30T15:05:39.242Z", + "close_time": "2017-10-30T15:05:39.242Z", + "created_at": "2017-06-30T15:05:39.242Z", + "updated_at": "2017-06-30T15:05:39.242Z" + } + ++ Response 404 (application/json) + + { + error: 'No such record' + } + +## Scholarship Applications | Create [/api/v1/code_schools/{?scholarship_application,reason,terms_accepted,scholarship_id}] ++ Parameters + + + scholarship_application (string, required) - Name of the Scholarship in the form of a string + + reason (string, optional) - User specified reason for Scholarship Application in the form of a string + + terms_accepted (boolean, optional) - User specified acknowledgement of Scholarship terms in the form of string + + scholarship_id (integer, optional) - Unique Id for this scholarship application + +### Create a New Scholarship Application [POST] + ++ Request (application/json) + + + Body + + { + "scholarship_application: "Scholarship for kids who want to learn how to program", + "reason": "I want to go to college", + "terms_accepted": true, + "scholarship_id": 4 + } + ++ Response 201 (application/json) + + + Body + + { + redirect_to: '/success' + } + ++ Response 400 (application/json) + + + Body + + { + errors: "Some error message" + } +######## ## Slack User | Invite [/api/v1/slack_users] ### Invite a User to Slack [POST] From edaf323435c2518d8a91da951ecc864c8feaf374 Mon Sep 17 00:00:00 2001 From: wimo7083 Date: Wed, 3 Jan 2018 19:39:06 -0700 Subject: [PATCH 2/8] remoted dict key quotation marks and editing separations --- apiary.apib | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/apiary.apib b/apiary.apib index 34a247f2..75c081cc 100644 --- a/apiary.apib +++ b/apiary.apib @@ -788,14 +788,14 @@ API endpoints that Operation Code's Rails backend makes available to its React f + Response 200 (application/json) { - "id": 7, - "name": "Full Stack Dev-Ops", - "location": "29 Palms", - "terms": "Recent Veterans", - "open_time": "2017-05-30T15:05:39.242Z", - "close_time": "2017-10-30T15:05:39.242Z", - "created_at": "2017-06-30T15:05:39.242Z", - "updated_at": "2017-06-30T15:05:39.242Z" + id: 7, + name: "Full Stack Dev-Ops", + location: "29 Palms", + terms: "Recent Veterans", + open_time: "2017-05-30T15:05:39.242Z", + close_time: "2017-10-30T15:05:39.242Z", + created_at: "2017-06-30T15:05:39.242Z", + updated_at: "2017-06-30T15:05:39.242Z" } + Response 404 (application/json) @@ -819,10 +819,10 @@ API endpoints that Operation Code's Rails backend makes available to its React f + Body { - "scholarship_application: "Scholarship for kids who want to learn how to program", - "reason": "I want to go to college", - "terms_accepted": true, - "scholarship_id": 4 + scholarship_application: "Scholarship for kids who want to learn how to program", + reason: "I want to go to college", + terms_accepted: true, + scholarship_id: 4 } + Response 201 (application/json) @@ -840,7 +840,7 @@ API endpoints that Operation Code's Rails backend makes available to its React f { errors: "Some error message" } -######## + ## Slack User | Invite [/api/v1/slack_users] ### Invite a User to Slack [POST] From bebb719e305c9a4ded2ab21b1547343881966502 Mon Sep 17 00:00:00 2001 From: wimo7083 Date: Wed, 3 Jan 2018 19:41:56 -0700 Subject: [PATCH 3/8] added consitent quotation marks --- apiary.apib | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/apiary.apib b/apiary.apib index 75c081cc..5684f153 100644 --- a/apiary.apib +++ b/apiary.apib @@ -788,14 +788,14 @@ API endpoints that Operation Code's Rails backend makes available to its React f + Response 200 (application/json) { - id: 7, - name: "Full Stack Dev-Ops", - location: "29 Palms", - terms: "Recent Veterans", - open_time: "2017-05-30T15:05:39.242Z", - close_time: "2017-10-30T15:05:39.242Z", - created_at: "2017-06-30T15:05:39.242Z", - updated_at: "2017-06-30T15:05:39.242Z" + "id": 7, + "name": "Full Stack Dev-Ops", + "location": "29 Palms", + "terms": "Recent Veterans", + "open_time": "2017-05-30T15:05:39.242Z", + "close_time": "2017-10-30T15:05:39.242Z", + "created_at": "2017-06-30T15:05:39.242Z", + "updated_at": "2017-06-30T15:05:39.242Z" } + Response 404 (application/json) @@ -819,10 +819,10 @@ API endpoints that Operation Code's Rails backend makes available to its React f + Body { - scholarship_application: "Scholarship for kids who want to learn how to program", - reason: "I want to go to college", - terms_accepted: true, - scholarship_id: 4 + "scholarship_application": "Scholarship for kids who want to learn how to program", + "reason": "I want to go to college", + "terms_accepted": true, + "scholarship_id": 4 } + Response 201 (application/json) @@ -840,7 +840,7 @@ API endpoints that Operation Code's Rails backend makes available to its React f { errors: "Some error message" } - +######## ## Slack User | Invite [/api/v1/slack_users] ### Invite a User to Slack [POST] From aeadaca2e3729cf7635a7fe3fb99dcbb76d83b43 Mon Sep 17 00:00:00 2001 From: wimo7083 Date: Wed, 3 Jan 2018 20:06:44 -0700 Subject: [PATCH 4/8] removed trailing marker --- apiary.apib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apiary.apib b/apiary.apib index 5684f153..5b41c9e6 100644 --- a/apiary.apib +++ b/apiary.apib @@ -840,7 +840,7 @@ API endpoints that Operation Code's Rails backend makes available to its React f { errors: "Some error message" } -######## + ## Slack User | Invite [/api/v1/slack_users] ### Invite a User to Slack [POST] From f460377090b42cd34c529ed1ea3e1a1c17f38f01 Mon Sep 17 00:00:00 2001 From: wimo7083 Date: Wed, 3 Jan 2018 21:18:26 -0700 Subject: [PATCH 5/8] included working copy requests doc --- apiary.apib | 176 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 176 insertions(+) diff --git a/apiary.apib b/apiary.apib index 5b41c9e6..2fc4155c 100644 --- a/apiary.apib +++ b/apiary.apib @@ -542,7 +542,183 @@ API endpoints that Operation Code's Rails backend makes available to its React f errors: "Some error message" } +## Mentor Request | Create [/api/v1/requests{?user_id,details,language,service_id,requested_mentor_id,status,assigned_mentor_id}] ++ Parameters + + + user_id (integer, required) - Identification of the User requesting a mentor in the form of an integer + + details (string, optional) - Details of the mentor request in the form of a string + + language (string, optional) - Primary language of the requesting mentee in the form of a string + + service_id (integer, optional) - Indentification of the mentorship request in the form of an integer + + requested_mentor_id (integer, optional) - Requested mentor's id in the form of an integer + + status (string, optional) - Current fullfillment status in the form on a string + + assigned_mentor_id (integer, optional) - Assigned mentor'd id in the form of an integer + + +### Create a New Mentor Request [POST] ++ Request (application/json) + + + Headers + + Authorization: Bearer Access-Token + + + Body + + { + "user_id": 4600, + "details": "I want to type well", + "language": "English", + "service_id": 200, + "requested_mentor_id": 250, + "status": "Open", + "assigned_mentor_id": 250 + } + ++ Response 201 (application/json) + + + Body + + { + "user_id": 4600, + "details": "I want to type well", + "language": "English", + "service_id": 200, + "requested_mentor_id": 250, + "status": "Open", + "assigned_mentor_id": 250 + } + ++ Response 422 (application/json) + + + Body + + { + errors: "Some error message" + } + +## Mentor Request | Show [/api/v1/requests{?user_id}] ++ Parameters + + + user_id (integer, required) - Identification of the User requesting a mentor in the form of an integer + + +### Show an Exiting Request From User ID [POST] + ++ Request (application/json) + + + Headers + + Authorization: Bearer Access-Token + + + Body + + { + "user_id": 5200 + + } + ++ Response 200 (application/json) + + + Body + { + "user_id": 5200, + "details": "I want to program", + "language": "English", + "service_id": 210, + "requested_mentor_id": 260, + "status": "Closed", + "assigned_mentor_id": 260 + } + + +## Mentor Request | Update [/api/v1/requests{?user_id,details,language,service_id,requested_mentor_id,status,assigned_mentor_id}] ++ Parameters + + + user_id (integer, required) - Identification of the User requesting a mentor in the form of an integer + + details (string, optional) - Details of the mentor request in the form of a string + + language (string, optional) - Primary language of the requesting mentee in the form of a string + + service_id (integer, optional) - Indentification of the mentorship request in the form of an integer + + requested_mentor_id (integer, optional) - Requested mentor's id in the form of an integer + + status (string, optional) - Current fullfillment status in the form on a string + + assigned_mentor_id (integer, optional) - Assigned mentor'd id in the form of an integer + +### Update an Existing Mentor Request [PUT] + ++ Request (application/json) + + + Headers + + Authorization: Bearer Access-Token + + + Body + + { + "user_id": 5200, + "details": "I want to program", + "language": "English", + "service_id": 210, + "requested_mentor_id": 260, + "status": "Closed", + "assigned_mentor_id": 260 + } + ++ Response 200 (application/json) + + + Body + + { + "user_id": 5200, + "details": "I want to program", + "language": "English", + "service_id": 210, + "requested_mentor_id": 260, + "status": "Closed", + "assigned_mentor_id": 260 + } + ++ Response 400 (application/json) + +## Mentor Requests Unclaimed | Show [/api/v1/requests] + +### Get All Unclaimed Mentor Requests [GET] ++ Request (application/json) + + + Headers + + Authorization: Bearer Access-Token + ++ Response 200 (application/json) + + [ + { + "service_id": 223, + "language": "English", + "details": "I want to stop eating crayons", + "user_id": 1113, + "assigned_mentor_id": null, + "requested_mentor_id": 3333, + "created_at": "2017-09-26T06:54:58.607Z", + "updated_at": "2017-09-26T06:54:58.607Z", + "status": "open" + }, + { + "service_id": 243, + "language": "American Sign Language", + "details": "I need help interviewing", + "user_id": 2500, + "assigned_mentor_id": null, + "requested_mentor_id": 1250, + "created_at": "2017-09-26T06:54:58.607Z", + "updated_at": "2017-09-26T06:54:58.607Z", + "status": "open" + } + ] + ++ Response 401 (application/json) + + { + error: 'Unauthorized' + } ## Resource [/api/v1/resources/{resource_id}] From 9a38887eb50373d62b86ea06d39372a1332ee7ba Mon Sep 17 00:00:00 2001 From: wimo7083 Date: Thu, 4 Jan 2018 19:01:06 -0700 Subject: [PATCH 6/8] requested changes removed scholarships --- apiary.apib | 195 ++++++++++++++-------------------------------------- 1 file changed, 53 insertions(+), 142 deletions(-) diff --git a/apiary.apib b/apiary.apib index 2fc4155c..c4f57ac6 100644 --- a/apiary.apib +++ b/apiary.apib @@ -542,7 +542,7 @@ API endpoints that Operation Code's Rails backend makes available to its React f errors: "Some error message" } -## Mentor Request | Create [/api/v1/requests{?user_id,details,language,service_id,requested_mentor_id,status,assigned_mentor_id}] +## Mentor Request | Create a New Mentor Request [/api/v1/requests{?user_id,details,language,service_id,requested_mentor_id,status,assigned_mentor_id}] + Parameters + user_id (integer, required) - Identification of the User requesting a mentor in the form of an integer @@ -577,7 +577,8 @@ API endpoints that Operation Code's Rails backend makes available to its React f + Body - { + { + "id": 2130, "user_id": 4600, "details": "I want to type well", "language": "English", @@ -594,11 +595,11 @@ API endpoints that Operation Code's Rails backend makes available to its React f { errors: "Some error message" } - -## Mentor Request | Show [/api/v1/requests{?user_id}] + +## Mentor Request | Show [/api/v1/requests/{request_id}] + Parameters - + user_id (integer, required) - Identification of the User requesting a mentor in the form of an integer + + request_id (integer, required) - Indentification of mentor request in the form of an integer ### Show an Exiting Request From User ID [POST] @@ -612,7 +613,7 @@ API endpoints that Operation Code's Rails backend makes available to its React f + Body { - "user_id": 5200 + "request_id": 1234 } @@ -621,6 +622,7 @@ API endpoints that Operation Code's Rails backend makes available to its React f + Body { + "request_id": 1234, "user_id": 5200, "details": "I want to program", "language": "English", @@ -630,8 +632,50 @@ API endpoints that Operation Code's Rails backend makes available to its React f "assigned_mentor_id": 260 } +## Mentor Requests | Unclaimed Collection [/api/v1/requests] + +### Get All Unclaimed Mentor Requests [GET] ++ Request (application/json) + + + Headers + + Authorization: Bearer Access-Token + ++ Response 200 (application/json) -## Mentor Request | Update [/api/v1/requests{?user_id,details,language,service_id,requested_mentor_id,status,assigned_mentor_id}] + [ + { + "id": 251", + "service_id": 223, + "language": "English", + "details": "I want to stop eating crayons", + "user_id": 1113, + "assigned_mentor_id": null, + "requested_mentor_id": 3333, + "created_at": "2017-09-26T06:54:58.607Z", + "updated_at": "2017-09-26T06:54:58.607Z", + "status": "open" + }, + { "id":"264" + "service_id": 243, + "language": "American Sign Language", + "details": "I need help interviewing", + "user_id": 2500, + "assigned_mentor_id": null, + "requested_mentor_id": 1250, + "created_at": "2017-09-26T06:54:58.607Z", + "updated_at": "2017-09-26T06:54:58.607Z", + "status": "open" + } + ] + ++ Response 401 (application/json) + + { + error: 'Unauthorized' + } + +## Mentor Request | Update [/api/v1/requests{user_id}{?details,language,service_id,requested_mentor_id,status,assigned_mentor_id}] + Parameters + user_id (integer, required) - Identification of the User requesting a mentor in the form of an integer @@ -641,7 +685,7 @@ API endpoints that Operation Code's Rails backend makes available to its React f + requested_mentor_id (integer, optional) - Requested mentor's id in the form of an integer + status (string, optional) - Current fullfillment status in the form on a string + assigned_mentor_id (integer, optional) - Assigned mentor'd id in the form of an integer - + ### Update an Existing Mentor Request [PUT] + Request (application/json) @@ -667,6 +711,7 @@ API endpoints that Operation Code's Rails backend makes available to its React f + Body { + "id":4521, "user_id": 5200, "details": "I want to program", "language": "English", @@ -678,48 +723,6 @@ API endpoints that Operation Code's Rails backend makes available to its React f + Response 400 (application/json) -## Mentor Requests Unclaimed | Show [/api/v1/requests] - -### Get All Unclaimed Mentor Requests [GET] -+ Request (application/json) - - + Headers - - Authorization: Bearer Access-Token - -+ Response 200 (application/json) - - [ - { - "service_id": 223, - "language": "English", - "details": "I want to stop eating crayons", - "user_id": 1113, - "assigned_mentor_id": null, - "requested_mentor_id": 3333, - "created_at": "2017-09-26T06:54:58.607Z", - "updated_at": "2017-09-26T06:54:58.607Z", - "status": "open" - }, - { - "service_id": 243, - "language": "American Sign Language", - "details": "I need help interviewing", - "user_id": 2500, - "assigned_mentor_id": null, - "requested_mentor_id": 1250, - "created_at": "2017-09-26T06:54:58.607Z", - "updated_at": "2017-09-26T06:54:58.607Z", - "status": "open" - } - ] - -+ Response 401 (application/json) - - { - error: 'Unauthorized' - } - ## Resource [/api/v1/resources/{resource_id}] + Parameters @@ -925,98 +928,6 @@ API endpoints that Operation Code's Rails backend makes available to its React f errors: "Some error message" } -## Scholarships | Collection [/api/v1/scholarships] - -### List All Scholarships Available [GET] - -+ Response 200 (application/json) - - [ - { - "id": 5, - "name": "Full Stack Dev-Ops", - "location": "29 Palms", - "terms": "Recent Veterans", - "open_time": "2017-05-30T15:05:39.242Z", - "close_time": "2017-10-30T15:05:39.242Z", - "created_at": "2017-06-30T15:05:39.242Z", - "updated_at": "2017-06-30T15:05:39.242Z" - }, - { - "id": 6, - "name": "UX to UI for U University", - "location": "Florida", - "terms": "Must be Conrad H.", - "open_time": "2018-01-30T15:05:39.242Z", - "close_time": "2018-10-30T15:05:39.242Z", - "created_at": "2017-06-30T15:05:39.242Z", - "updated_at": "2017-06-30T15:05:39.242Z" - } - ] - -## Scholarships | Show [/api/v1/code_schools/{scholarship_id}] -+ Parameters - - + scholarship_id (number) - ID of the Scholarship in the form of an integer - -### Get an Existing CodeSchool [GET] - -+ Response 200 (application/json) - - { - "id": 7, - "name": "Full Stack Dev-Ops", - "location": "29 Palms", - "terms": "Recent Veterans", - "open_time": "2017-05-30T15:05:39.242Z", - "close_time": "2017-10-30T15:05:39.242Z", - "created_at": "2017-06-30T15:05:39.242Z", - "updated_at": "2017-06-30T15:05:39.242Z" - } - -+ Response 404 (application/json) - - { - error: 'No such record' - } - -## Scholarship Applications | Create [/api/v1/code_schools/{?scholarship_application,reason,terms_accepted,scholarship_id}] -+ Parameters - - + scholarship_application (string, required) - Name of the Scholarship in the form of a string - + reason (string, optional) - User specified reason for Scholarship Application in the form of a string - + terms_accepted (boolean, optional) - User specified acknowledgement of Scholarship terms in the form of string - + scholarship_id (integer, optional) - Unique Id for this scholarship application - -### Create a New Scholarship Application [POST] - -+ Request (application/json) - - + Body - - { - "scholarship_application": "Scholarship for kids who want to learn how to program", - "reason": "I want to go to college", - "terms_accepted": true, - "scholarship_id": 4 - } - -+ Response 201 (application/json) - - + Body - - { - redirect_to: '/success' - } - -+ Response 400 (application/json) - - + Body - - { - errors: "Some error message" - } - ## Slack User | Invite [/api/v1/slack_users] ### Invite a User to Slack [POST] From 1336b6b0ff3b374b734ea683efd14896d4bbfe09 Mon Sep 17 00:00:00 2001 From: William Montgomery Date: Thu, 4 Jan 2018 19:25:15 -0700 Subject: [PATCH 7/8] added scholarships --- apiary.apib | 274 ++++++++++++++++++---------------------------------- 1 file changed, 93 insertions(+), 181 deletions(-) diff --git a/apiary.apib b/apiary.apib index c4f57ac6..b2173322 100644 --- a/apiary.apib +++ b/apiary.apib @@ -542,187 +542,6 @@ API endpoints that Operation Code's Rails backend makes available to its React f errors: "Some error message" } -## Mentor Request | Create a New Mentor Request [/api/v1/requests{?user_id,details,language,service_id,requested_mentor_id,status,assigned_mentor_id}] -+ Parameters - - + user_id (integer, required) - Identification of the User requesting a mentor in the form of an integer - + details (string, optional) - Details of the mentor request in the form of a string - + language (string, optional) - Primary language of the requesting mentee in the form of a string - + service_id (integer, optional) - Indentification of the mentorship request in the form of an integer - + requested_mentor_id (integer, optional) - Requested mentor's id in the form of an integer - + status (string, optional) - Current fullfillment status in the form on a string - + assigned_mentor_id (integer, optional) - Assigned mentor'd id in the form of an integer - - -### Create a New Mentor Request [POST] -+ Request (application/json) - - + Headers - - Authorization: Bearer Access-Token - - + Body - - { - "user_id": 4600, - "details": "I want to type well", - "language": "English", - "service_id": 200, - "requested_mentor_id": 250, - "status": "Open", - "assigned_mentor_id": 250 - } - -+ Response 201 (application/json) - - + Body - - { - "id": 2130, - "user_id": 4600, - "details": "I want to type well", - "language": "English", - "service_id": 200, - "requested_mentor_id": 250, - "status": "Open", - "assigned_mentor_id": 250 - } - -+ Response 422 (application/json) - - + Body - - { - errors: "Some error message" - } - -## Mentor Request | Show [/api/v1/requests/{request_id}] -+ Parameters - - + request_id (integer, required) - Indentification of mentor request in the form of an integer - - -### Show an Exiting Request From User ID [POST] - -+ Request (application/json) - - + Headers - - Authorization: Bearer Access-Token - - + Body - - { - "request_id": 1234 - - } - -+ Response 200 (application/json) - - + Body - - { - "request_id": 1234, - "user_id": 5200, - "details": "I want to program", - "language": "English", - "service_id": 210, - "requested_mentor_id": 260, - "status": "Closed", - "assigned_mentor_id": 260 - } - -## Mentor Requests | Unclaimed Collection [/api/v1/requests] - -### Get All Unclaimed Mentor Requests [GET] -+ Request (application/json) - - + Headers - - Authorization: Bearer Access-Token - -+ Response 200 (application/json) - - [ - { - "id": 251", - "service_id": 223, - "language": "English", - "details": "I want to stop eating crayons", - "user_id": 1113, - "assigned_mentor_id": null, - "requested_mentor_id": 3333, - "created_at": "2017-09-26T06:54:58.607Z", - "updated_at": "2017-09-26T06:54:58.607Z", - "status": "open" - }, - { "id":"264" - "service_id": 243, - "language": "American Sign Language", - "details": "I need help interviewing", - "user_id": 2500, - "assigned_mentor_id": null, - "requested_mentor_id": 1250, - "created_at": "2017-09-26T06:54:58.607Z", - "updated_at": "2017-09-26T06:54:58.607Z", - "status": "open" - } - ] - -+ Response 401 (application/json) - - { - error: 'Unauthorized' - } - -## Mentor Request | Update [/api/v1/requests{user_id}{?details,language,service_id,requested_mentor_id,status,assigned_mentor_id}] -+ Parameters - - + user_id (integer, required) - Identification of the User requesting a mentor in the form of an integer - + details (string, optional) - Details of the mentor request in the form of a string - + language (string, optional) - Primary language of the requesting mentee in the form of a string - + service_id (integer, optional) - Indentification of the mentorship request in the form of an integer - + requested_mentor_id (integer, optional) - Requested mentor's id in the form of an integer - + status (string, optional) - Current fullfillment status in the form on a string - + assigned_mentor_id (integer, optional) - Assigned mentor'd id in the form of an integer - -### Update an Existing Mentor Request [PUT] - -+ Request (application/json) - - + Headers - - Authorization: Bearer Access-Token - - + Body - - { - "user_id": 5200, - "details": "I want to program", - "language": "English", - "service_id": 210, - "requested_mentor_id": 260, - "status": "Closed", - "assigned_mentor_id": 260 - } - -+ Response 200 (application/json) - - + Body - - { - "id":4521, - "user_id": 5200, - "details": "I want to program", - "language": "English", - "service_id": 210, - "requested_mentor_id": 260, - "status": "Closed", - "assigned_mentor_id": 260 - } - -+ Response 400 (application/json) - ## Resource [/api/v1/resources/{resource_id}] + Parameters @@ -927,7 +746,100 @@ API endpoints that Operation Code's Rails backend makes available to its React f { errors: "Some error message" } + +## Scholarships | Collection [/api/v1/scholarships] + +### List All Scholarships Available [GET] + ++ Response 200 (application/json) + + [ + { + "id": 5, + "name": "Full Stack Dev-Ops", + "location": "29 Palms", + "terms": "Recent Veterans", + "open_time": "2017-05-30T15:05:39.242Z", + "close_time": "2017-10-30T15:05:39.242Z", + "created_at": "2017-06-30T15:05:39.242Z", + "updated_at": "2017-06-30T15:05:39.242Z" + }, + { + "id": 6, + "name": "UX to UI for U University", + "location": "Florida", + "terms": "Must be Conrad H.", + "open_time": "2018-01-30T15:05:39.242Z", + "close_time": "2018-10-30T15:05:39.242Z", + "created_at": "2017-06-30T15:05:39.242Z", + "updated_at": "2017-06-30T15:05:39.242Z" + } + ] + +## Scholarships | Show [/api/v1/code_schools/{scholarship_id}] ++ Parameters + + + scholarship_id (number) - ID of the Scholarship in the form of an integer + +### Get an Existing CodeSchool [GET] + ++ Response 200 (application/json) + + { + "id": 7, + "name": "Full Stack Dev-Ops", + "location": "29 Palms", + "terms": "Recent Veterans", + "open_time": "2017-05-30T15:05:39.242Z", + "close_time": "2017-10-30T15:05:39.242Z", + "created_at": "2017-06-30T15:05:39.242Z", + "updated_at": "2017-06-30T15:05:39.242Z" + } + ++ Response 404 (application/json) + + { + error: 'No such record' + } + +## Scholarship Applications | Create [/api/v1/code_schools/{?scholarship_application,reason,terms_accepted,scholarship_id}] ++ Parameters + + + scholarship_application (string, required) - Name of the Scholarship in the form of a string + + reason (string, optional) - User specified reason for Scholarship Application in the form of a string + + terms_accepted (boolean, optional) - User specified acknowledgement of Scholarship terms in the form of string + + scholarship_id (integer, optional) - Unique Id for this scholarship application + +### Create a New Scholarship Application [POST] + ++ Request (application/json) + + + Body + + { + "scholarship_application": "Scholarship for kids who want to learn how to program", + "reason": "I want to go to college", + "terms_accepted": true, + "scholarship_id": 4 + } + ++ Response 201 (application/json) + + + Body + + { + redirect_to: '/success' + } ++ Response 400 (application/json) + + + Body + + { + errors: "Some error message" + } + + ## Slack User | Invite [/api/v1/slack_users] ### Invite a User to Slack [POST] From d83fc99232556b46e3800788167e380eb0b436fe Mon Sep 17 00:00:00 2001 From: wimo7 Date: Sat, 6 Jan 2018 18:44:23 -0700 Subject: [PATCH 8/8] updated url, included required param, included user_id --- apiary.apib | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apiary.apib b/apiary.apib index b2173322..9c84fe1c 100644 --- a/apiary.apib +++ b/apiary.apib @@ -776,12 +776,12 @@ API endpoints that Operation Code's Rails backend makes available to its React f } ] -## Scholarships | Show [/api/v1/code_schools/{scholarship_id}] +## Scholarships | Show [/api/v1/scholarships/{scholarship_id}] + Parameters - + scholarship_id (number) - ID of the Scholarship in the form of an integer + + scholarship_id (number, required) - ID of the Scholarship in the form of an integer -### Get an Existing CodeSchool [GET] +### Get an Existing Scholarship [GET] + Response 200 (application/json) @@ -802,9 +802,10 @@ API endpoints that Operation Code's Rails backend makes available to its React f error: 'No such record' } -## Scholarship Applications | Create [/api/v1/code_schools/{?scholarship_application,reason,terms_accepted,scholarship_id}] +## Scholarship Applications | Create [/api/v1/scholarship_applications/{?user_id,scholarship_application,reason,terms_accepted,scholarship_id}] + Parameters + + user_id (integer, required) - ID of the user that is applying for a scholarship in the form of an integer + scholarship_application (string, required) - Name of the Scholarship in the form of a string + reason (string, optional) - User specified reason for Scholarship Application in the form of a string + terms_accepted (boolean, optional) - User specified acknowledgement of Scholarship terms in the form of string @@ -817,6 +818,7 @@ API endpoints that Operation Code's Rails backend makes available to its React f + Body { + "user_id": 1234, "scholarship_application": "Scholarship for kids who want to learn how to program", "reason": "I want to go to college", "terms_accepted": true,