{"id":24544003,"url":"https://github.com/tobie-rathbun/restful_api--method-testing","last_synced_at":"2025-03-16T08:09:43.775Z","repository":{"id":162706077,"uuid":"628483859","full_name":"Tobie-Rathbun/RESTful_API--Method-Testing","owner":"Tobie-Rathbun","description":"A RESTful API built in PHP that listens to calls from a desktop Python application","archived":false,"fork":false,"pushed_at":"2024-01-20T21:12:47.000Z","size":6,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-22T20:15:45.264Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Tobie-Rathbun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-04-16T04:46:27.000Z","updated_at":"2025-01-22T10:37:22.000Z","dependencies_parsed_at":"2024-01-20T22:22:00.464Z","dependency_job_id":"c5169ffa-163d-4d96-a220-b3a81b9e3208","html_url":"https://github.com/Tobie-Rathbun/RESTful_API--Method-Testing","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tobie-Rathbun%2FRESTful_API--Method-Testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tobie-Rathbun%2FRESTful_API--Method-Testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tobie-Rathbun%2FRESTful_API--Method-Testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tobie-Rathbun%2FRESTful_API--Method-Testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tobie-Rathbun","download_url":"https://codeload.github.com/Tobie-Rathbun/RESTful_API--Method-Testing/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243841224,"owners_count":20356446,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-22T20:15:47.336Z","updated_at":"2025-03-16T08:09:43.756Z","avatar_url":"https://github.com/Tobie-Rathbun.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Tools Summary:\n\n    PHP API (api.php):\n        Purpose: Handles incoming POST requests, processes JSON data, and stores items in a file (items.txt).\n        Key Feature: Responds with a success message if the item is created.\n\n    Python Script:\n        Purpose: Sends a POST request to the PHP API (api.php).\n        Key Features: Uses the requests library to send a POST request with JSON data. Displays response details.\n\nHow to Use:\nSetting Up the PHP API (api.php):\n\n    Install XAMPP:\n        Install XAMPP on your machine.\n\n    Copy to htdocs:\n        Place the provided my_api folder inside the htdocs directory of your XAMPP installation.\n\nRunning the Python Script:\n\n    Check API URL:\n        Ensure the URL in the Python script points to your PHP API (http://localhost/my_api/api.php).\n\n    Install Required Package:\n        If not installed, run pip install requests to install the requests library.\n\n    Execute Script:\n        Run the Python script from the terminal using python your_script_name.py.\n\n    Review Output:\n        Check the terminal output for information on the request and response.\n\nTesting with Simple Rest Client in VS Code:\n\n    Install Simple Rest Client:\n        Install the \"REST Client\" extension in VS Code.\n\n    Open Simple Rest Client:\n        Click on the \"Send Request\" link in your Python script file.\n\n    Configure Request:\n        Set the method to POST.\n        Enter the URL as http://localhost/my_api/api.php.\n\n    Headers and Body:\n        Configure headers if needed.\n        Enter JSON data in the body (e.g., {\"item\": \"Test Item\"}).\n\n    Send Request:\n        Click the \"Send Request\" button.\n\n    Review Response:\n        Check the response in the client for the status, message, and item details\n        Alternatively look at the updated .txt C:/xampp/htdocs/my_api/items.txt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobie-rathbun%2Frestful_api--method-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftobie-rathbun%2Frestful_api--method-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobie-rathbun%2Frestful_api--method-testing/lists"}