{"id":20461474,"url":"https://github.com/pythonbyte/call-api","last_synced_at":"2025-10-08T04:28:37.772Z","repository":{"id":181433487,"uuid":"332568573","full_name":"pythonbyte/call-api","owner":"pythonbyte","description":null,"archived":false,"fork":false,"pushed_at":"2021-01-24T22:18:56.000Z","size":1086,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-05T11:35:48.462Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pythonbyte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-01-24T22:18:38.000Z","updated_at":"2021-01-24T22:19:02.000Z","dependencies_parsed_at":"2023-07-15T16:06:37.574Z","dependency_job_id":null,"html_url":"https://github.com/pythonbyte/call-api","commit_stats":null,"previous_names":["pythonbyte/call-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pythonbyte/call-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythonbyte%2Fcall-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythonbyte%2Fcall-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythonbyte%2Fcall-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythonbyte%2Fcall-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pythonbyte","download_url":"https://codeload.github.com/pythonbyte/call-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythonbyte%2Fcall-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278891104,"owners_count":26063852,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2024-11-15T12:25:46.963Z","updated_at":"2025-10-08T04:28:37.729Z","avatar_url":"https://github.com/pythonbyte.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Call API\n\n# Description\n\nThis project it's like a Call Receiver, the API will receive Start Calls and End Calls and the API will return the bills of subscribers number, accordingly with the period sent as parameter.\n\n\n# Installing\n\nFirst step of installation is having Pipenv installed in your machine, if you doesn't have just use the below command:\n\n``` $ pip install pipenv ```\n\nNow after cloned the repository all you need to do is:\n\n```\n$ cd callapi/\n$ pipenv install\n$ python manage.py migrate\n$ python manage.py createsuperuser\n$ python manage.py runserver\n```\nRemember that if there is no intention to use Heroku, need to comment dj_database_url in settings, the line in the bottom with dj_database as well and set your own database before migrate.\n\n# Testing\n\nTo test the application use:\n\n```$ python manage.py test```\n\n# Work Enviroment\n\n* **Text Editor**      - Sublime Text v3.1.1\n* **Python** - 3.7.0\n* **Django** - 2.1\n* **djangorestframework** - 3.8.2\n\n\n# API documentation\n\nThis API works with 3 simple endpoints:\n\n## Call Start Endpoint\nThis endpoint works at the **/call/** , the parameters needed to send to create a Call Start is 'call_id', 'source', 'destination' and 'timestamp'. The 'id' and 'record_type' fields are automatically generated.\nBesides that the source and destination number will only accept 10 or 11 numbers.\n\nPost data:\n```\n{\n    \"call_id\": 1,\n    \"source\": \"99778855443\",\n    \"destination\": \"9988221132\",\n    \"timestamp\": \"2018-02-28T21:57:13Z\"\n}\n```\nResponse data:\n```\n{\n    \"id\": 1,\n    \"call_id\": 1,\n    \"record_type\": \"start\",\n    \"source\": \"99778855443\",\n    \"destination\": \"9988221132\",\n    \"timestamp\": \"2018-02-28T21:57:13Z\"\n}\n```\n## Call End Endpoint\nThis endpoint works at the **/callend/** , the parameters needed to send to create a Call End is 'call_id' and 'timestamp'. The 'id' and 'record_type' fields are automatically generated.\n\nPost data:\n```\n{\n    \"call_id\": 1,\n    \"timestamp\": \"2018-02-28T22:57:13Z\"\n}\n```\nResponse data:\n```\n{\n    \"id\": 1,\n    \"record_type\": \"end\",\n    \"call_id\": 1,\n    \"timestamp\": \"2018-02-28T22:57:13Z\"\n}\n```\nThe call records are automatically created after a call_start id matches a call_end id.\n\n## Phone Bill Endpoint\nThis endpoint works at the **/bills/** , the only parameter required is 'subscriber' and you can set 'period' with format 'mm/YYYY' to search for a period of bills for that subscriber. If the period parameter is not sent, the API will return the last closed month bill.\n\n\nPost data:\n```\n{\n    \"subscriber\": \"99988526423\",\n    \"period\": \"02/2016\"\n}\n```\nWorks as - /bills/?subscriber=99988526423\u0026period=02/2016\n\nResponse data:\n```\n{\n    \"subscriber\": \"99988526423\",\n    \"period\": \"2/2016\",\n    \"total\": \"R$ 11,16\",\n    \"bills\": [\n        {\n            \"destination\": \"9993468278\",\n            \"start_date\": \"2016-02-29\",\n            \"start_time\": \"12:00:00\",\n            \"duration\": \"2:00:00\",\n            \"price\": \"R$ 11,16\"\n        }\n    ]\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythonbyte%2Fcall-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpythonbyte%2Fcall-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythonbyte%2Fcall-api/lists"}