{"id":22576616,"url":"https://github.com/ndolestudio/httpsms-go","last_synced_at":"2025-04-10T17:13:09.878Z","repository":{"id":48790749,"uuid":"517024489","full_name":"NdoleStudio/httpsms-go","owner":"NdoleStudio","description":"Go Client for the httpSMS API https://api.httpsms.com","archived":false,"fork":false,"pushed_at":"2024-07-18T04:57:25.000Z","size":37,"stargazers_count":6,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-24T14:51:25.381Z","etag":null,"topics":["httpsms","httpsms-api","httpsms-go","sms","sms-gateway"],"latest_commit_sha":null,"homepage":"https://docs.httpsms.com","language":"Go","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/NdoleStudio.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":"2022-07-23T10:19:00.000Z","updated_at":"2025-01-07T23:53:54.000Z","dependencies_parsed_at":"2022-08-31T13:00:44.605Z","dependency_job_id":"21087114-f4ba-46ca-813b-da7ba830536f","html_url":"https://github.com/NdoleStudio/httpsms-go","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":"NdoleStudio/go-http-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NdoleStudio%2Fhttpsms-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NdoleStudio%2Fhttpsms-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NdoleStudio%2Fhttpsms-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NdoleStudio%2Fhttpsms-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NdoleStudio","download_url":"https://codeload.github.com/NdoleStudio/httpsms-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248261909,"owners_count":21074225,"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":["httpsms","httpsms-api","httpsms-go","sms","sms-gateway"],"created_at":"2024-12-08T04:07:22.130Z","updated_at":"2025-04-10T17:13:09.818Z","avatar_url":"https://github.com/NdoleStudio.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# httpsms-go\n\n[![Build](https://github.com/NdoleStudio/httpsms-go/actions/workflows/main.yml/badge.svg)](https://github.com/NdoleStudio/httpsms-go/actions/workflows/main.yml)\n[![codecov](https://codecov.io/gh/NdoleStudio/httpsms-go/branch/main/graph/badge.svg)](https://codecov.io/gh/NdoleStudio/httpsms-go)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/NdoleStudio/httpsms-go/badges/quality-score.png?b=main)](https://scrutinizer-ci.com/g/NdoleStudio/httpsms-go/?branch=main)\n[![Go Report Card](https://goreportcard.com/badge/github.com/NdoleStudio/httpsms-go)](https://goreportcard.com/report/github.com/NdoleStudio/httpsms-go)\n[![GitHub contributors](https://img.shields.io/github/contributors/NdoleStudio/httpsms-go)](https://github.com/NdoleStudio/httpsms-go/graphs/contributors)\n[![GitHub license](https://img.shields.io/github/license/NdoleStudio/httpsms-go?color=brightgreen)](https://github.com/NdoleStudio/httpsms-go/blob/master/LICENSE)\n[![PkgGoDev](https://pkg.go.dev/badge/github.com/NdoleStudio/httpsms-go)](https://pkg.go.dev/github.com/NdoleStudio/httpsms-go)\n\n\nThis package provides a generic `go` client template for the Http SMS Api\n\n## Installation\n\n`httpsms-go` is compatible with modern Go releases in module mode, with Go installed:\n\n```bash\ngo get github.com/NdoleStudio/httpsms-go\n```\n\nAlternatively the same can be achieved if you use `import` in a package:\n\n```go\nimport \"github.com/NdoleStudio/httpsms-go\"\n```\n\n\n## Implemented\n\n- [x] **[Messages](#messages)**\n  - [x] `POST /v1/messages/send`: Send a new SMS\n  - [x] `GET /v1/messages`: Get list of messages which are exchanged between 2 phone numbers.\n- [x] **Heartbeats**\n  - [x] `GET /v1/heartbeats`: Get the heartbeats of an Android Phone\n- [x] **Message Threads**\n  - [x] `GET /v1/message-threads`: Get the message threads of a phone number\n  - [x] `DELETE v1/message-threads/:messageThreadID`: Delete a message thread\n- [x] **Cipher**\n  - [x] `Encrypt`: Encrypt the content of a message to cipher text\n  - [x] `Decrypt`: Decrypt an encrypted message content to plain text\n\n\n## Usage\n\n### Initializing the Client\n\nAn instance of the client can be created using `httpsms.New()`.\n\n```go\npackage main\n\nimport (\n    \"github.com/NdoleStudio/httpsms-go\"\n)\n\nfunc main()  {\n    client := htpsms.New(htpsms.WithAPIKey(/* API Key from https://httpsms.com/settings */))\n}\n```\n\n### Error handling\n\nAll API calls return an `error` as the last return object. All successful calls will return a `nil` error.\n\n```go\n_, response, err := client.Messages.Send(context.Background())\nif err != nil {\n    //handle error\n}\n```\n\n### Messages\n\n#### `POST /v1/messages/send`: Send a new SMS Message\n\n```go\nmessage, response, err := client.Messages.Send(context.Background(), \u0026MessageSendParams{\n    Content: \"This is a sample text message\",\n    From:    \"+18005550199\",\n    To:      \"+18005550100\",\n})\n\nif err != nil {\n    log.Fatal(err)\n}\n\nlog.Println(message.Code) // 202\n```\n\n## Testing\n\nYou can run the unit tests for this client from the root directory using the command below:\n\n```bash\ngo test -v\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndolestudio%2Fhttpsms-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fndolestudio%2Fhttpsms-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndolestudio%2Fhttpsms-go/lists"}