{"id":25543937,"url":"https://github.com/josephp27/restful-api-ss","last_synced_at":"2025-10-11T05:38:57.875Z","repository":{"id":130805177,"uuid":"130811676","full_name":"josephp27/RESTful-API-SS","owner":"josephp27","description":null,"archived":false,"fork":false,"pushed_at":"2018-04-25T17:40:31.000Z","size":88,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-30T07:34:39.168Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/josephp27.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-24T07:09:01.000Z","updated_at":"2018-04-25T17:40:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"c98294b0-b530-4ef9-ab9f-a5a1849e5e29","html_url":"https://github.com/josephp27/RESTful-API-SS","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/josephp27/RESTful-API-SS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josephp27%2FRESTful-API-SS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josephp27%2FRESTful-API-SS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josephp27%2FRESTful-API-SS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josephp27%2FRESTful-API-SS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/josephp27","download_url":"https://codeload.github.com/josephp27/RESTful-API-SS/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josephp27%2FRESTful-API-SS/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262431379,"owners_count":23310029,"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-02-20T07:39:50.299Z","updated_at":"2025-10-11T05:38:52.857Z","avatar_url":"https://github.com/josephp27.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A RESTful API written in JAVA using Spring Boot for Solstice\n\n## Scope\nDevelop a RESTful API that would allow a web or mobile front-end to:\n\n* Create a contact record\n* Retrieve a contact record\n* Update a contact record\n* Delete a contact record\n* Search for a record by email or phone number\n* Retrieve all records from the same state or city\n\nThe contact record should represent the following information: name, company, profile image, email,\nbirthdate, phone number (work, personal) and address.\n\n## Compiling and Running\n```\nWithin the directory run:\n\n   ./gradlew build \n   java -jar build/libs/solstice-0.0.1-SNAPSHOT.jar\n   \n\nOr to directly run:\n\n   ./gradlew bootRun\n```\n## Notes and Assumptions\n* The email is the main unique identifier for this API as many people can have the same name, etc, but not the same email. \n\n\n* The database is a simple SQL database that is not persistant for ease of Solstice testing. Inside data.sql are some preloaded contacts however\n\n* When running the below tests I recommend using curl as navigating with the browser on errors looks slightly different than a terminal request as Spring Boot adds in more info.\n\n* Assumes images are links\n\n* 9 Unit Tests [located in the tests folder](https://github.com/josephp27/RESTful-API-SS/blob/master/src/test/java/com/solstice/api/SolsticeApiApplicationTests.java). Feel free to use these to understand parameters to requests\n\n* Performs validations on various inputs like phone numbers using Regular Expressions\n\n## Requests\n2. /get\n\n   http://localhost:8080/get (returns all contacts)\n\n   http://localhost:8080/get?work_number= (returns contact assigned to work number)\n\n   http://localhost:8080/get?email= (returns contact assigned to email)\n   \n3. /getall (retrieve all records from state or city. States are 2 char codes like IL or MO)\n\n   http://localhost:8080/getall?state=IL\n\n   http://localhost:8080/getall?city=chicago\n\n3. /delete (It is based only on the email as I have set emails to be the unique identifier) \n\n   http://localhost:8080/delete?email= \n\n4. /add (Add a user if the email does not already exist)\n\n   Arguments: name (required), email (required), work (required), personal, company, street, state, city, image, bd\n\n   http://localhost:8080/add?name=Tom%20Cruise\u0026email=myemail@live.com\u0026work=+1(555)555-5555\u0026personal=6305555555\u0026company=walmart\u0026bd=11/27/1992\u0026street=99+S+6th\u0026state=IL\u0026city=Chicago\n\n   Spacing can be emulated by + or %20\n\n5. /update (Update a user if they exist in database. Updates based on email address. If parameter not specified, sets to blank)\n\n   Arguments: name (required), email (required), work (required), personal, company, street, state, city, image, bd\n   \n   http://localhost:8080/update?name=Johnny%20Depp\u0026email=myemail@live.com\u0026work=+1(123)555-4567\u0026personal=6306666666\u0026company=Jewel\n\n## TODO\n\n* Abstract away more things with the validator and cleanup. Make most methods private from protected\n\n* Do better checking for valid entries\n\n* Make a cooler looking error page for browsers\n\n* Allow for updating only some values and retaining old if value is empty within update method\n\n* Add more unit tests\n\n* Provide better feedback on delete, add, update, etc in form of a JSON response\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosephp27%2Frestful-api-ss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosephp27%2Frestful-api-ss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosephp27%2Frestful-api-ss/lists"}