{"id":16785498,"url":"https://github.com/allancapistrano/tangle-hornet-api","last_synced_at":"2025-03-16T23:15:56.136Z","repository":{"id":194584397,"uuid":"689747385","full_name":"AllanCapistrano/tangle-hornet-api","owner":"AllanCapistrano","description":"API written in Go to use Tangle Hornet Network.","archived":false,"fork":false,"pushed_at":"2023-12-03T20:42:54.000Z","size":128,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-23T09:24:16.499Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/AllanCapistrano.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":"2023-09-10T19:20:01.000Z","updated_at":"2023-09-20T15:11:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"49a70709-b420-49b1-889c-f194194f5911","html_url":"https://github.com/AllanCapistrano/tangle-hornet-api","commit_stats":null,"previous_names":["allancapistrano/tangle-hornet-api"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllanCapistrano%2Ftangle-hornet-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllanCapistrano%2Ftangle-hornet-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllanCapistrano%2Ftangle-hornet-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AllanCapistrano%2Ftangle-hornet-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AllanCapistrano","download_url":"https://codeload.github.com/AllanCapistrano/tangle-hornet-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243945613,"owners_count":20372897,"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":"2024-10-13T08:09:31.734Z","updated_at":"2025-03-16T23:15:56.109Z","avatar_url":"https://github.com/AllanCapistrano.png","language":"Go","readme":"# Tangle Hornet API\nAPI written in Go to use Tangle Hornet Network.\n\n## How to use\n\n### Requirements\n\u003e This library was mainly tested with Go version 1.20.x\n\nWe recommend you update Go [to the latest stable version to use the library](https://go.dev/).\n\n### Downloading the API\n\n1. You can get the latest version of the API by [clicking here](https://github.com/AllanCapistrano/tangle-hornet-api/releases/download/v1.5.0/tangle-hornet-api);\n2. Give the permission to execute the API:\n   ```powershell\n   sudo chmod +x tangle-hornet-api\n   ```\n3. If you want to change some parameters, create a file named `tangle-hornet.conf` in the `/etc/` directory;\n   1. Check the [tangle-hornet.conf](https://github.com/AllanCapistrano/tangle-hornet-api/blob/main/config/tangle-hornet.conf) to see all the parameters you can override.\n4. Run the API:\n   ```powershell\n   ./tangle-hornet-api\n   ```\n   \n### Build the project on your own\n\n1. Clone this repository;\n2. Download all the dependencies:\n   ```powershell\n   go mod tidy\n   ```\n3. Execute the project:\n   ```powershell\n   go run main.go\n   ```\n\n## Endpoints\n\n| Method | Enpoint | Description |\n| ------ | ------- | ----------- | \n| GET | `/nodeInfo` | Shows information about Tangle Hornet Network. | \n| GET | `/nodeInfo/all` | Shows all information about Tangle Hornet Network. | \n| GET | `/message/messageId/{messageId}` | Get a message by given message ID. |\n| GET | `/message/{index}` | Get all messages using a specific index. |\n| GET | `/message/{index}/{maxMessages}` | Get a maximum number of messages from the last hour, using a specific index. |\n| POST | `/message` | Create and submit a new message. |\n\nYou also can use the files in the [`apiClientFiles`](./apiClientFiles/) directory to import all routes into your API Client.\n\n### POST Body Examples\n\n#### Routes\n\n- `/message`:\n  ```json\n  {\n\t\t\"index\": \"LB_STATUS\",\n\t\t\"data\": {\"available\": true, \"avgLoad\": 3, \"createdAt\": 1695652263921, \"group\": \"group4\", \"lastLoad\": 4, \"publishedAt\": 1695652267529, \"source\": \"source4\", \"type\": \"LB_STATUS\"}\n\t}\n  ```\n\n## License\nThe MIT license can be found [here](./LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallancapistrano%2Ftangle-hornet-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fallancapistrano%2Ftangle-hornet-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallancapistrano%2Ftangle-hornet-api/lists"}