{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"a231d836-abdc-4ecb-91cf-1cc0a128bde2","name":"Vinyl-Swarm","description":"This project provides a RESTful API to manage vinyl records, stores, and user records in a database through a Rust backend, The implementation is based on Postgres databases, The Schema can be seen within the project as `sqlx a toolkit for interacting with SQL databases.`The API facilitates CRUD (Create, Read, Update, Delete) operations on records, record stores, and users, with special features for handling user-specific records that can be stored within a collection a `user_records` collection or `user_wishlist` for the reference when cash is flowing and your willing to spend some local dollars on great music. The API also stores **Record Store** data, so enthusiests can browse user selected hot spots for collecting their treasures.\n\nThe goal was to build a service that allows users to manage their music collections and associated record stores, providing a comprehensive system for others to admire or simply intermingle and express fandom for a once popular art, that has seen a vibrant resurgance.\n\n**Vinyl Swarm Database Schema**\n\nthe following shows the `postgreSQL` implementation of the database objects used to represent these endpoints and may be used for your reference.\n\n``` sql\n-- PostgreSQL:\nCREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";\n\n-- users table \nCREATE TABLE \n    IF NOT EXISTS users (\n        user_id UUID PRIMARY KEY NOT NULL DEFAULT uuid_generate_v4(),\n        user_name VARCHAR(50) NOT NULL UNIQUE,\n        user_first_name VARCHAR(50) NOT NULL,\n        user_last_name VARCHAR(50) NOT NULL,\n        user_email VARCHAR(250) NOT NULL UNIQUE, \n        user_password TEXT NOT NULL,\n        created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()\n    );\n\n-- records table\nCREATE TABLE \n    IF NOT EXISTS records (\n        record_id UUID PRIMARY KEY NOT NULL DEFAULT uuid_generate_v4(),\n        artist VARCHAR(100) NOT NULL,\n        title VARCHAR(100) NOT NULL,\n        released DATE NOT NULL,\n        genre TEXT[],\n        format VARCHAR(50),\n        price DECIMAL(10,2),\n        label VARCHAR(150) NOT NULL,\n        duration_length TIME NOT NULL,\n        CONSTRAINT unique_artist_release UNIQUE (artist, title, format)\n    );\n\n-- record_stores table\nCREATE TABLE \n    IF NOT EXISTS record_stores (\n        record_store_id UUID PRIMARY KEY NOT NULL DEFAULT uuid_generate_v4(),\n        store_name VARCHAR(50) NOT NULL,\n        store_address VARCHAR(200) NOT NULL,\n        store_city VARCHAR(75) NOT NULL,\n        store_state VARCHAR(50) NOT NULL,\n        store_zip VARCHAR(20) NOT NULL, \n        phone_number VARCHAR(20), \n        website TEXT,\n        CONSTRAINT unique_record_store UNIQUE (store_name, store_address, store_city, store_state)\n    );\n\n\n-- user_record_stores table\nCREATE TABLE\n    IF NOT EXISTS user_record_stores (\n        user_favorite_stores_id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),\n        user_key UUID NOT NULL REFERENCES users (user_id) ON DELETE CASCADE,\n        record_store_id UUID NOT NULL REFERENCES record_stores (record_store_id) ON DELETE CASCADE,\n        CONSTRAINT unique_user_record_store UNIQUE (user_key, record_store_id)\n    );\n\n-- user_records table\nCREATE TABLE \n    IF NOT EXISTS user_records (\n    user_record_id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),\n    user_id UUID NOT NULL REFERENCES users(user_id) ON DELETE CASCADE,\n    record_id UUID NOT NULL REFERENCES records(record_id) ON DELETE CASCADE,\n    added_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),\n    CONSTRAINT unique_user_record UNIQUE (user_id, record_id)\n);\n\n-- user_wish_list table\nCREATE TABLE \n    IF NOT EXISTS user_wishlist (\n        user_wish_list_id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),\n        user_id UUID NOT NULL REFERENCES users(user_id) ON DELETE CASCADE,\n        record_id UUID NOT NULL REFERENCES records(record_id) ON DELETE CASCADE,\n        added_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),\n        CONSTRAINT unique_wish_list_record UNIQUE (user_id, record_id)\n    );\n\n ```","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"5839344","team":2333198,"collectionId":"a231d836-abdc-4ecb-91cf-1cc0a128bde2","publishedId":"2sAYk7SizX","public":true,"publicUrl":"https://documenter-api.postman.tech/view/5839344/2sAYk7SizX","privateUrl":"https://go.postman.co/documentation/5839344-a231d836-abdc-4ecb-91cf-1cc0a128bde2","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-single-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.10.1","publishDate":"2025-03-11T06:43:52.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/6b8244e972d680bced04c0b08a432b4f0ae5aaf9efb7f332080faf6ff3363658","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2sAYk7SizX"}