Skip to content

Instantly share code, notes, and snippets.

@EVanGorkom
Last active December 5, 2023 21:59
Show Gist options
  • Save EVanGorkom/49a98ec044646cbf83bf2a87544fc40e to your computer and use it in GitHub Desktop.
Save EVanGorkom/49a98ec044646cbf83bf2a87544fc40e to your computer and use it in GitHub Desktop.

ITEMS: GET 127.0.0.1:8000/vendors/1/items/

[
	{
		"id": 1,
		"item_name": "Potato",
		"vendor": 1,
		"price": "2.50",
		"size": "1",
		"quantity": 50,
		"availability": false,
		"description": "Boil 'em, Mash 'em, Stick 'em in a stew",
		"image": "/files/images/shaun.jpeg",
		"date_created": "2023-12-02T21:04:11.131371Z",
		"updated_at": "2023-12-05T00:29:26.843640Z"
	},
	{
		"id": 3,
		"item_name": "potatoes",
		"vendor": 1,
		"price": "0.50",
		"size": "1",
		"quantity": 34,
		"availability": true,
		"description": "Boil' em, Mash 'em, Stick 'em in a stew",
		"image": null,
		"date_created": "2023-12-04T03:48:00.359606Z",
		"updated_at": "2023-12-04T03:48:00.360428Z"
	}
]

POST 127.0.0.1:8000/vendors/1/items/ GET 127.0.0.1:8000/vendors/1/items/1/

{
	"id": 1,
	"item_name": "Potato",
	"vendor": 1,
	"price": "2.50",
	"size": "1",
	"quantity": 50,
	"availability": false,
	"description": "Boil 'em, Mash 'em, Stick 'em in a stew",
	"image": "/files/images/shaun.jpeg",
	"date_created": "2023-12-02T21:04:11.131371Z",
	"updated_at": "2023-12-05T00:29:26.843640Z"
}

PUT 127.0.0.1:8000/vendors/1/items/1/ DELETE 127.0.0.1:8000/vendors/1/items/1/


VENDORS: GET 127.0.0.1:8000/vendors/

[
	{
		"id": 1,
		"market": null,
		"vendor_name": "Sheep Farm",
		"first_name": "Dylan",
		"last_name": "T",
		"email": "a;lsdkjf",
		"location": "Colorado",
		"date_created": "2023-12-02T21:03:56.737638Z",
		"updated_at": "2023-12-02T21:03:56.737663Z"
	},
	{
		"id": 2,
		"market": 2,
		"vendor_name": "Sheepez Farmez",
		"first_name": "Shepard",
		"last_name": "D'Sheep",
		"email": "sleepysheepy@gmail.com",
		"password": "password",
		"location": "Colorado",
		"date_created": "2023-12-05T01:03:32.364234Z",
		"updated_at": "2023-12-05T01:03:32.364263Z"
	}
]

POST 127.0.0.1:8000/vendors/ GET 127.0.0.1:8000/vendors/1/

{
	"id": 1,
	"market": null,
	"vendor_name": "Sheep Farm",
	"first_name": "Dylan",
	"last_name": "T",
	"email": "a;lsdkjf",
	"location": "Colorado",
	"date_created": "2023-12-02T21:03:56.737638Z",
	"updated_at": "2023-12-02T21:03:56.737663Z"
}

PUT 127.0.0.1:8000/vendors/1/ DELETE 127.0.0.1:8000/vendors/1/


MARKETS: GET 127.0.0.1:8000/markets/

[
	{
		"id": 1,
		"market_name": "Colorado Farmer's Market",
		"location": "1800 Colorado Street",
		"details": "Come meet local farmers near you!",
		"start_date": null,
		"end_date": null,
		"date_created": "2023-12-05T00:13:40.820784Z",
		"updated_at": "2023-12-05T00:13:40.820898Z"
	},
	{
		"id": 2,
		"market_name": "Texas Farmer's Market",
		"location": "1800 Farmer Street",
		"details": "Come meet local farmers near you!",
		"start_date": null,
		"end_date": null,
		"date_created": "2023-12-05T00:13:40.820784Z",
		"updated_at": "2023-12-05T00:13:40.820898Z"
	}
]

POST 127.0.0.1:8000/markets/ GET 127.0.0.1:8000/markets/1/

{
	"id": 1,
	"market_name": "Colorado Farmer's Market",
	"location": "1800 Colorado Street",
	"details": "Come meet local farmers near you!",
	"start_date": null,
	"end_date": null,
	"date_created": "2023-12-05T00:13:40.820784Z",
	"updated_at": "2023-12-05T00:13:40.820898Z"
}

PUT 127.0.0.1:8000/markets/1/ DELETE 127.0.0.1:8000/markets/1/


PREORDERS: GET 127.0.0.1:8000/customers/1/preorders/

[
    {
        "id": 1,
        "customer": {
            "id": 1,
            "first_name": "Wallace",
            "last_name": "Wallman",
            "phone": "1234",
            "email": "cheese@gmail.uk",
            "password": "cheese",
            "location": "The Moon",
            "date_created": "2023-12-02T21:02:14.011705Z",
            "updated_at": "2023-12-02T21:02:14.011754Z"
        },
        "item": {
            "id": 1,
            "item_name": "Potato",
            "vendor": {
                "id": 1,
                "market": null,
                "vendor_name": "Sheep Farm",
                "first_name": "Dylan",
                "last_name": "T",
                "email": "a;lsdkjf",
                "password": ";alksjdf",
                "location": "Colorado",
                "date_created": "2023-12-02T21:03:56.737638Z",
                "updated_at": "2023-12-02T21:03:56.737663Z"
            },
            "price": "2.50",
            "size": "1",
            "quantity": 50,
            "availability": false,
            "description": "Boil 'em, Mash 'em, Stick 'em in a stew",
            "image": "/files/images/shaun.jpeg",
            "date_created": "2023-12-02T21:04:11.131371Z",
            "updated_at": "2023-12-05T00:29:26.843640Z"
        },
        "ready": false,
        "date_created": "2023-12-05T16:22:02.573824Z",
        "updated_at": "2023-12-05T19:54:31.335634Z"
    },
    {
        "id": 2,
        "customer": {
            "id": 1,
            "first_name": "Wallace",
            "last_name": "Wallman",
            "phone": "1234",
            "email": "cheese@gmail.uk",
            "password": "cheese",
            "location": "The Moon",
            "date_created": "2023-12-02T21:02:14.011705Z",
            "updated_at": "2023-12-02T21:02:14.011754Z"
        },
        "item": {
            "id": 1,
            "item_name": "Potato",
            "vendor": {
                "id": 1,
                "market": null,
                "vendor_name": "Sheep Farm",
                "first_name": "Dylan",
                "last_name": "T",
                "email": "a;lsdkjf",
                "password": ";alksjdf",
                "location": "Colorado",
                "date_created": "2023-12-02T21:03:56.737638Z",
                "updated_at": "2023-12-02T21:03:56.737663Z"
            },
            "price": "2.50",
            "size": "1",
            "quantity": 50,
            "availability": false,
            "description": "Boil 'em, Mash 'em, Stick 'em in a stew",
            "image": "/files/images/shaun.jpeg",
            "date_created": "2023-12-02T21:04:11.131371Z",
            "updated_at": "2023-12-05T00:29:26.843640Z"
        },
        "ready": false,
        "date_created": "2023-12-05T16:22:36.941237Z",
        "updated_at": "2023-12-05T19:54:28.554422Z"
    },
    {
        "id": 3,
        "customer": {
            "id": 1,
            "first_name": "Wallace",
            "last_name": "Wallman",
            "phone": "1234",
            "email": "cheese@gmail.uk",
            "password": "cheese",
            "location": "The Moon",
            "date_created": "2023-12-02T21:02:14.011705Z",
            "updated_at": "2023-12-02T21:02:14.011754Z"
        },
        "item": {
            "id": 1,
            "item_name": "Potato",
            "vendor": {
                "id": 1,
                "market": null,
                "vendor_name": "Sheep Farm",
                "first_name": "Dylan",
                "last_name": "T",
                "email": "a;lsdkjf",
                "password": ";alksjdf",
                "location": "Colorado",
                "date_created": "2023-12-02T21:03:56.737638Z",
                "updated_at": "2023-12-02T21:03:56.737663Z"
            },
            "price": "2.50",
            "size": "1",
            "quantity": 50,
            "availability": false,
            "description": "Boil 'em, Mash 'em, Stick 'em in a stew",
            "image": "/files/images/shaun.jpeg",
            "date_created": "2023-12-02T21:04:11.131371Z",
            "updated_at": "2023-12-05T00:29:26.843640Z"
        },
        "ready": false,
        "date_created": "2023-12-05T19:54:37.938205Z",
        "updated_at": "2023-12-05T19:54:37.938238Z"
    }
]

POST 127.0.0.1:8000/customers/1/preorders/ GET 127.0.0.1:8000/customers/1/preorders/1/

{
        "id": 1,
        "customer": {
            "id": 1,
            "first_name": "Wallace",
            "last_name": "Wallman",
            "phone": "1234",
            "email": "cheese@gmail.uk",
            "password": "cheese",
            "location": "The Moon",
            "date_created": "2023-12-02T21:02:14.011705Z",
            "updated_at": "2023-12-02T21:02:14.011754Z"
        },
        "item": {
            "id": 1,
            "item_name": "Potato",
            "vendor": {
                "id": 1,
                "market": null,
                "vendor_name": "Sheep Farm",
                "first_name": "Dylan",
                "last_name": "T",
                "email": "a;lsdkjf",
                "password": ";alksjdf",
                "location": "Colorado",
                "date_created": "2023-12-02T21:03:56.737638Z",
                "updated_at": "2023-12-02T21:03:56.737663Z"
            },
            "price": "2.50",
            "size": "1",
            "quantity": 50,
            "availability": false,
            "description": "Boil 'em, Mash 'em, Stick 'em in a stew",
            "image": "/files/images/shaun.jpeg",
            "date_created": "2023-12-02T21:04:11.131371Z",
            "updated_at": "2023-12-05T00:29:26.843640Z"
        },
        "ready": false,
        "date_created": "2023-12-05T16:22:02.573824Z",
        "updated_at": "2023-12-05T19:54:31.335634Z"
    }

PUT 127.0.0.1:8000/customers/1/preorders/1/ DELETE 127.0.0.1:8000/customers/1/preorders/1/


CUSTOMERS: GET 127.0.0.1:8000/customers/

[
	{
		"id": 1,
		"first_name": "Wallace",
		"last_name": "Wallman",
		"phone": "1234",
		"email": "cheese@gmail.uk",
		"password": "password",
		"location": "The Moon",
		"date_created": "2023-12-02T21:02:14.011705Z",
		"updated_at": "2023-12-02T21:02:14.011754Z"
	},
	{
		"id": 2,
		"first_name": "Wallace",
		"last_name": "Wallman",
		"phone": "1234",
		"email": "cheese@gmail.uk",
		"password": "password",
		"location": "The Moon",
		"date_created": "2023-12-02T21:02:14.011705Z",
		"updated_at": "2023-12-02T21:02:14.011754Z"
	}
]

POST 127.0.0.1:8000/customers/ GET 127.0.0.1:8000/customers/1/

{
	"id": 1,
	"first_name": "Wallace",
	"last_name": "Wallman",
	"phone": "1234",
	"email": "cheese@gmail.uk",
	"password": "password",
	"location": "The Moon",
	"date_created": "2023-12-02T21:02:14.011705Z",
	"updated_at": "2023-12-02T21:02:14.011754Z"
}

PUT 127.0.0.1:8000/customers/1/ DELETE 127.0.0.1:8000/customers/1/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment