{"id":18973341,"url":"https://github.com/cyangle/twilio","last_synced_at":"2025-04-19T16:37:37.870Z","repository":{"id":44801828,"uuid":"430928433","full_name":"cyangle/twilio","owner":"cyangle","description":"Twilio crystal lang client SDK generated by OpenAPI Generator.","archived":false,"fork":false,"pushed_at":"2024-09-07T20:25:51.000Z","size":1722,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-16T11:04:13.756Z","etag":null,"topics":["crystal","crystal-lang","openapi-generator","twilio","twilio-api"],"latest_commit_sha":null,"homepage":"","language":"Crystal","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/cyangle.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-23T02:06:40.000Z","updated_at":"2024-09-07T20:25:55.000Z","dependencies_parsed_at":"2024-11-08T15:12:02.731Z","dependency_job_id":"7b0f80c7-28e4-4f29-8c5a-767e5ef11601","html_url":"https://github.com/cyangle/twilio","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyangle%2Ftwilio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyangle%2Ftwilio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyangle%2Ftwilio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyangle%2Ftwilio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cyangle","download_url":"https://codeload.github.com/cyangle/twilio/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249739239,"owners_count":21318536,"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":["crystal","crystal-lang","openapi-generator","twilio","twilio-api"],"created_at":"2024-11-08T15:11:48.954Z","updated_at":"2025-04-19T16:37:37.850Z","avatar_url":"https://github.com/cyangle.png","language":"Crystal","readme":"# twilio\n\nThe Crystal module for the Twilio - Api\n\nThis is the public Twilio REST API.\n\nThis SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project with CUSTOM templates:\n\n- API version: 1.38.0\n- Package version: 2.0.1\n- Build package: org.openapitools.codegen.languages.CrystalClientCodegen\n- Custom templates: [crystal_client_generator](https://github.com/cyangle/crystal_client_generator)\n\nFor more information, please visit [https://support.twilio.com](https://support.twilio.com)\n\n## Installation\n\n### Install from Git\n\nAdd the following to shard.yaml\n\n```yaml\ndependencies:\n  twilio:\n    github: cyangle/twilio\n    version: ~\u003e 2.0.1\n```\n\n## Usage\n\nCheck [here](https://www.twilio.com/docs/all) for more information about how to use twilio APIs.\n\nBelow lists only a few examples of the most interesting APIs, the client should support APIs provided by the twilio OpenAPI specification file as it's generated from the OpenAPI v3 specification `./twilio_api_v2010_fixed.json`.\n\n### Require this shard in your project\n\nFirst you need to require it.\n\n```crystal\nrequire \"twilio\"\n```\n\nOr require only specific api file.\n\n```crystal\nrequire \"twilio/api/calls_api\"\n```\n\n### Configure client with twilio credentials\n\n```crystal\nTwilio.configure do |config|\n  config.username = \"TWILIO_ACCOUNT_SID\"\n  config.password = \"TWILIO_AUTH_TOKEN\"\nend\n```\n\n### Create an instance of Twilio::CallsApi\n\n```crystal\napi = Twilio::CallsApi.new\n```\n\n#### List phone calls\n\nList all phone calls\n```crystal\napi = Twilio::CallsApi.new\n\npage : Twilio::ListCallResponse = api.list_call\n\n# Get next page of results\nnext_page : Twilio::ListCallResponse? = Twilio.next_page(page)\n\npp page\npp next_page\n```\n\nList phone calls with filters\n```crystal\napi = Twilio::CallsApi.new\n\npage : Twilio::ListCallResponse = api.list_call(\n  to: \"+12345678901\",\n  from: \"+19876543210\",\n  start_time_before: 2.days.ago,\n  end_time_after: 50.days.ago,\n  page_size: 50\n)\n\n# Get next page of results\nnext_page : Twilio::ListCallResponse? = Twilio.next_page(page)\n\npp page\npp next_page\n```\n\n#### List text messages\n\nRequire the messages api first:\n\n```crystal\nrequire \"twilio/api/messages_api\"\n\napi = Twilio::MessagesApi.new\n```\n\nList all messages\n```crystal\napi = Twilio::MessagesApi.new\n\napi.list_message\npage : Twilio::ListMessageResponse = api.list_message\n\n# Get next page of results\nnext_page : Twilio::ListMessageResponse? = Twilio.next_page(page)\n\npp page\npp next_page\n```\n\nList messages with filters\n```crystal\napi = Twilio::MessagesApi.new\n\npage : Twilio::ListMessageResponse = api.list_message(\n  to: \"+12345678901\",\n  from: \"+19876543210\",\n  date_sent_before: 2.days.ago\n  date_sent_after: 15.days.ago,\n  page_size: 50\n)\n\n# Get next page of results\nnext_page : Twilio::ListMessageResponse? = Twilio.next_page(page)\n\npp page\npp next_page\n```\n\n#### Send text messages\n\n```crystal\napi = Twilio::MessagesApi.new\n\napi.create_message(\n  to: \"+12345678901\",\n  from: \"+19876543210\",\n  body: \"Hello from Twilio!\",\n  status_callback: \"https://myapp.example/message/status_update\"\n)\n```\n\n#### Make outbound phone calls\n\n```crystal\napi = Twilio::CallsApi.new\n\napi.create_call(\n  to: \"+12345678901\",\n  from: \"+19876543210\",\n  status_callback: \"https://myapp.example/phone_call/status_update\",\n  status_callback_method: \"GET\",\n  status_callback_event: [\"initiated\", \"ringing\", \"completed\", \"answered\"],\n  twiml: \"\u003cResponse\u003e\u003cSay\u003eHello from Twilio!\u003c/Say\u003e\u003c/Response\u003e\"\n)\n```\n\n## Development\n\nInstall dependencies\n\n```shell\nshards\n```\n\nRun the tests:\n\n```shell\ncrystal spec\n```\n\nRun lints\n\n```shell\n./bin/ameba\ncrystal tool format --check\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyangle%2Ftwilio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyangle%2Ftwilio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyangle%2Ftwilio/lists"}