| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
The T-Shirt Go API is a web-based application programming interface (API) designed to provide access to a wide range of T-shirt-related information and functionalities. The API enables developers to retrieve information about T-shirt categories, brands, sizes, colors, materials, and products.
Endpoint: GET /categories
Description: Retrieve a list of available T-shirt categories.
Example Response:
[
{
"id": 1,
"name": "Men's T-shirts"
},
{
"id": 2,
"name": "Women's T-shirts"
},
{
"id": 3,
"name": "Kids' T-shirts"
}
]Endpoint: GET /brands
Description: Retrieve a list of available T-shirt brands.
Example Response:
[
{
"id": 1,
"name": "Nike"
},
{
"id": 2,
"name": "Adidas"
},
{
"id": 3,
"name": "Puma"
}
]Endpoint: GET /sizes
Description: Retrieve a list of available T-shirt sizes.
Example Response:
[
{
"id": 1,
"name": "Small"
},
{
"id": 2,
"name": "Medium"
},
{
"id": 3,
"name": "Large"
}
]Endpoint: GET /colors
Description: Retrieve a list of available T-shirt colors.
Example Response:
[
{
"id": 1,
"name": "Red"
},
{
"id": 2,
"name": "Blue"
},
{
"id": 3,
"name": "Black"
}
]Endpoint: GET /materials
Description: Retrieve a list of available T-shirt materials.
Example Response:
[
{
"id": 1,
"name": "Cotton"
},
{
"id": 2,
"name": "Polyester"
},
{
"id": 3,
"name": "Blend"
}
]Endpoint: GET /products
Description: Retrieve a list of available T-shirt products, with optional filters for brand, color, size, and material.
Parameters:
Example Usage:
Example Response:
[
{
"id": 1,
"name": "Men's Red T-shirt",
"category": "Men's T-shirts",
"brand": "Nike",
"size": "Large",
"color": "Red",
"material": "Cotton",
"price": 29.99
},
{
"id": 2,
"name": "Women's Blue T-shirt",
"category": "Women's T-shirts",
"brand": "Adidas",
"size": "Medium",
"color": "Blue",
"material": "Polyester",
"price": 24.99
},
{
"id": 3,
"name": "Kids' Black T-shirt",
"category": "Kids' T-shirts",
"brand": "Puma",
"size": "Small",
"color": "Black",
"material": "Blend",
"price": 19.99
}
]-- Table: Categories
CREATE TABLE Categories (
category_id INT PRIMARY KEY AUTO_INCREMENT,
category_name VARCHAR(255)
);
-- Table: Brands
CREATE TABLE Brands (
brand_id INT PRIMARY KEY AUTO_INCREMENT,
brand_name VARCHAR(255)
);
-- Table: Sizes
CREATE TABLE Sizes (
size_id INT PRIMARY KEY AUTO_INCREMENT,
size_name VARCHAR(50)
);
-- Table: Colors
CREATE TABLE Colors (
color_id INT PRIMARY KEY AUTO_INCREMENT,
color_name VARCHAR(50)
);
-- Table: Materials
CREATE TABLE Materials (
material_id INT PRIMARY KEY AUTO_INCREMENT,
material_name VARCHAR(50)
);
-- Table: Products
CREATE TABLE Products (
product_id INT PRIMARY KEY AUTO_INCREMENT,
product_name VARCHAR(255),
category_id INT,
brand_id INT,
size_id INT,
color_id INT,
material_id INT,
price DECIMAL(10, 2),
FOREIGN KEY (category_id) REFERENCES Categories(category_id),
FOREIGN KEY (brand_id) REFERENCES Brands(brand_id),
FOREIGN KEY (size_id) REFERENCES Sizes(size_id),
FOREIGN KEY (color_id) REFERENCES Colors(color_id),
FOREIGN KEY (material_id) REFERENCES Materials(material_id)
);Copyright 2023, Max Base
| Back | FazBrowse Home | New Git URL |