{"id":22916599,"url":"https://github.com/nunohpinheiro/pnia-api","last_synced_at":"2025-04-01T12:44:05.689Z","repository":{"id":40906962,"uuid":"220639806","full_name":"nunohpinheiro/pnia-api","owner":"nunohpinheiro","description":"Phone Number Info Aggregate API - .NET Core 3.0 with Docker","archived":false,"fork":false,"pushed_at":"2022-12-08T06:23:47.000Z","size":1872,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-07T07:32:02.935Z","etag":null,"topics":["csharp","dotnet-core","rest-api"],"latest_commit_sha":null,"homepage":"","language":"C#","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/nunohpinheiro.png","metadata":{"files":{"readme":"README_PniaAPI_NunoPinheiro.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}},"created_at":"2019-11-09T12:35:38.000Z","updated_at":"2020-05-13T13:30:52.000Z","dependencies_parsed_at":"2023-01-24T16:15:09.546Z","dependency_job_id":null,"html_url":"https://github.com/nunohpinheiro/pnia-api","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/nunohpinheiro%2Fpnia-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nunohpinheiro%2Fpnia-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nunohpinheiro%2Fpnia-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nunohpinheiro%2Fpnia-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nunohpinheiro","download_url":"https://codeload.github.com/nunohpinheiro/pnia-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246642136,"owners_count":20810548,"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":["csharp","dotnet-core","rest-api"],"created_at":"2024-12-14T06:13:55.788Z","updated_at":"2025-04-01T12:44:05.664Z","avatar_url":"https://github.com/nunohpinheiro.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pnia v1.1 - Resolution, by Nuno Pinheiro\n\nThis exercise was solved with:\n- C# .NET Core v3.0\n- Docker v19.03.2\n\n# Phone number information aggregator API\n\n**Endpoint:** `/aggregate` (POST)\n\n**Requests:** The requests' body must be an array of phone numbers, as described by the exercise.\n\n**Responses:**\n1. Successful response, with content: HTTP status **200**, with the formatted data in the responses' body.\n2. Successful response, without content: HTTP status **204**, without body. If no valid input is given in the request, there will be any matching content, so, the responses' body is empty.\n3. Unsuccessful response, with error: HTTP status **500**, showing the occurring error within the application.\n\n- A valid input was defined as any phone number that:\n  - Is interpreted as it;\n  - Matches a prefix in the list;\n  - Matches a sector returned by the business sector API.\n\n**Settings:**\n\nIn the project's file *appsettings.json*, some custom settings are available, in order to change behaviors within the application:\n\n| Settings Section | Setting  | Meaning | Allowed values    | Default value |\n|------------------|----------|---------|-------------------|---------------|\n| CacheOptions | UseCache | Use cache or not | true/false (bool) | true |\n|              | ExpireTimeMinutes | Cache expiration time (minutes) | double | 5 minutes |\n| ServiceEndpoints | PhoneBusinessSector | Endpoint to search a phone number's business sector | string | --- |\n\n- When the use of cache is set, the content from `prefixes.txt` file is cached.\n\n# Deployment\n\n- Please, use Docker, running: `docker-compose up pniaapi`\n- The endpoint will be reachable through: `http://localhost:8080/aggregate`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnunohpinheiro%2Fpnia-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnunohpinheiro%2Fpnia-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnunohpinheiro%2Fpnia-api/lists"}