From 55f9963a943ebcc31b93917180a8dc2405556360 Mon Sep 17 00:00:00 2001
From: Cullen <cullen@cullenwatson.com>
Date: Sun, 9 Jul 2023 18:53:29 -0500
Subject: [PATCH] chore(postman): add collection and environment files

---
 JobSpy.postman_collection.json  | 190 ++++++++++++++++++++++++++++++++
 JobSpy.postman_environment.json |  15 +++
 2 files changed, 205 insertions(+)
 create mode 100644 JobSpy.postman_collection.json
 create mode 100644 JobSpy.postman_environment.json

diff --git a/JobSpy.postman_collection.json b/JobSpy.postman_collection.json
new file mode 100644
index 0000000..a7f2538
--- /dev/null
+++ b/JobSpy.postman_collection.json
@@ -0,0 +1,190 @@
+{
+	"info": {
+		"_postman_id": "a0aa8829-fd18-47fa-a50d-03c8193adb9a",
+		"name": "JobSpy",
+		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+		"_exporter_id": "24144392"
+	},
+	"item": [
+		{
+			"name": "Search Jobs",
+			"request": {
+				"auth": {
+					"type": "bearer",
+					"bearer": [
+						{
+							"key": "token",
+							"value": "{{access_token}}",
+							"type": "string"
+						}
+					]
+				},
+				"method": "GET",
+				"header": [],
+				"url": {
+					"raw": "http://127.0.0.1:8000/api/v1/jobs?site_type=indeed&search_term=software intern&location=dallas&page=2",
+					"protocol": "http",
+					"host": [
+						"127",
+						"0",
+						"0",
+						"1"
+					],
+					"port": "8000",
+					"path": [
+						"api",
+						"v1",
+						"jobs"
+					],
+					"query": [
+						{
+							"key": "site_type",
+							"value": "indeed"
+						},
+						{
+							"key": "search_term",
+							"value": "software intern"
+						},
+						{
+							"key": "location",
+							"value": "dallas"
+						},
+						{
+							"key": "page",
+							"value": "2"
+						}
+					]
+				}
+			},
+			"response": []
+		},
+		{
+			"name": "Health",
+			"request": {
+				"auth": {
+					"type": "bearer",
+					"bearer": [
+						{
+							"key": "token",
+							"value": "{{access_token}}",
+							"type": "string"
+						}
+					]
+				},
+				"method": "GET",
+				"header": [],
+				"url": {
+					"raw": "http://127.0.0.1:8000/",
+					"protocol": "http",
+					"host": [
+						"127",
+						"0",
+						"0",
+						"1"
+					],
+					"port": "8000",
+					"path": [
+						""
+					]
+				}
+			},
+			"response": []
+		},
+		{
+			"name": "Token",
+			"event": [
+				{
+					"listen": "test",
+					"script": {
+						"exec": [
+							"var jsonData = JSON.parse(responseBody);",
+							"postman.setEnvironmentVariable(\"access_token\", jsonData.access_token)"
+						],
+						"type": "text/javascript"
+					}
+				}
+			],
+			"request": {
+				"method": "POST",
+				"header": [],
+				"body": {
+					"mode": "urlencoded",
+					"urlencoded": [
+						{
+							"key": "username",
+							"value": "cwatson",
+							"type": "text"
+						},
+						{
+							"key": "password",
+							"value": "mypass",
+							"type": "text"
+						}
+					]
+				},
+				"url": {
+					"raw": "http://127.0.0.1:8000/api/auth/token",
+					"protocol": "http",
+					"host": [
+						"127",
+						"0",
+						"0",
+						"1"
+					],
+					"port": "8000",
+					"path": [
+						"api",
+						"auth",
+						"token"
+					]
+				}
+			},
+			"response": []
+		},
+		{
+			"name": "Register",
+			"event": [
+				{
+					"listen": "test",
+					"script": {
+						"exec": [
+							"var jsonData = JSON.parse(responseBody);",
+							"postman.setEnvironmentVariable(\"access_token\", jsonData.access_token)"
+						],
+						"type": "text/javascript"
+					}
+				}
+			],
+			"request": {
+				"method": "POST",
+				"header": [],
+				"body": {
+					"mode": "raw",
+					"raw": "{\n    \"username\": \"cwatson\",\n    \"email\": \"cgwatson@smu.edu\",\n    \"password\": \"mypass\",\n    \"full_name\": \"cullen watson\"\n}",
+					"options": {
+						"raw": {
+							"language": "json"
+						}
+					}
+				},
+				"url": {
+					"raw": "http://127.0.0.1:8000/api/auth/register",
+					"protocol": "http",
+					"host": [
+						"127",
+						"0",
+						"0",
+						"1"
+					],
+					"port": "8000",
+					"path": [
+						"api",
+						"auth",
+						"register"
+					]
+				}
+			},
+			"response": []
+		}
+	]
+}
\ No newline at end of file
diff --git a/JobSpy.postman_environment.json b/JobSpy.postman_environment.json
new file mode 100644
index 0000000..b69ee6c
--- /dev/null
+++ b/JobSpy.postman_environment.json
@@ -0,0 +1,15 @@
+{
+	"id": "a7ea6d58-8dca-4216-97a9-224dadc1e18f",
+	"name": "JobSpy",
+	"values": [
+		{
+			"key": "access_token",
+			"value": "",
+			"type": "any",
+			"enabled": true
+		}
+	],
+	"_postman_variable_scope": "environment",
+	"_postman_exported_at": "2023-07-09T23:51:36.709Z",
+	"_postman_exported_using": "Postman/10.15.8"
+}
\ No newline at end of file