This application serves as the backbone for UndocuScholar by providing a Web Service that returns JSON
TODO: details on how to clone this repo and set things up
Method | Use |
---|---|
GET | Retrieving resources. |
POST | Creating/Unarchiving resources. |
PUT | Updating resources. |
DELET | Deleting/Archiving resources. |
Responses are in JSON format.
Node | Description |
---|---|
code | Error code. A non-zero value indicates an error occurred. |
message | Message for the response. |
results | List of resources. |
The following HTTP Status Codes are possible.
Status Code | Description |
---|---|
200 | OK |
404 | URL Not Found |
500 | Internal Server Error |
TODO
There are a lot of attributes pertaining to each scholarship. Not all attributes are returned in a given request.
These are the attributes that will show up when retrieving a list of results. Always check for null or the empty string as those often times indicate no value.
Name | Type | Description |
---|---|---|
scholarship_id |
integer | The unique identifier for the scholarship |
name |
string | The name of the scholarship |
deadline |
string | The deadline date in format 'YYYY-MM-DD' |
amount |
integer | The max amount of the scholarship |
url |
string | The link for scholarship details |
GET /api/scholarships
Name | Type | Description |
---|---|---|
q |
string | The query string |
min_amount |
string | The minimum scholarship amount |
max_amount |
string | The maximum scholarship amount |
deadline_after |
string | The minimum deadline threshold |
deadline_before |
string | The maximum deadline threshold |
sort |
string | The attribute for which to sort by |
sort_order |
string | "desc" to sort in descending order, "asc" to sort in ascending order. |
POST /api/scholarships
Use any/all of the scholarship attributes except for future date_created
, date_updated
, and archived
attributes.
Required: amount
, deadline
, name
, url
.
GET /api/scholarships/<id>
PUT /api/scholarships/<id>
Use any/all of the scholarship attributes except for future date_created
, date_updated
, and archived
attributes.
See arguments for "Creating a Scholarship"
DELETE /api/scholarships/<id>
POST /api/scholarships/<id>