create
delete
read
read one
update
Projects Topics API files App files Database Design Common ErrorsThe purpose of the Project Ideas API is to generate project ideas when you don't know what to do. This API is capable of generating project ideas of different topics, different categories, and different projects.
There are 5 basic functions with the categories object. Create, delete, read, read one, and update.
The only value required to create a new category is a category name as the category id is auto incremented. The new category name should be posted with the key "category_name" in json format.
The delete function deletes a category. The information that must be posted for this request is the category id of what you would like to change.
The read function returns all categories. No information is needed to send to this file.
Example
http://brennensager.com/AT/individual-project/api/category/read.php
The read one function returns a single category. The category to read is set by using id and get.
Example
http://brennensager.com/AT/individual-project/api/category/read_one.php?id=4
The update files for this api are arguably the most difficult. All information about the category must be sent to properly update the category. This data includes category_id and category_name
There are three basic tables that are a part of my project's database. One table to hold types of projects (poster, film, etc.), another table stores project topics (presidents, states, etc), and the final table holds project/topic categories (technology, environment, etc.).
Message | Cause |
---|---|
read | |
No ___ found. | There aren't any ___ in the database |
create | |
Unable to create. | Something went wrong. Please try again |
Unable to create. Data is incomplete. | Not all of the required data was recieved |
Create Category Link:
http://brennensager.com/AT/individual-project/api/category/create.phpExample Post Request:
{ "category_name" : "examplecategory" }
Delete Category Link:
http://brennensager.com/AT/individual-project/api/category/delete.phpExample Post Request:
{ "category_id" : "16" }
Update Category Link:
http://brennensager.com/AT/individual-project/api/category/update.phpExample Post Request:
{ "category_name" : "examplecategory", "category_id" : "21" }