{"id":21561873,"url":"https://github.com/0x9ef/hotelbeds-go","last_synced_at":"2025-03-18T04:47:36.544Z","repository":{"id":224122085,"uuid":"762476149","full_name":"0x9ef/hotelbeds-go","owner":"0x9ef","description":"Go client library for HotelBeds API","archived":false,"fork":false,"pushed_at":"2024-03-02T23:34:10.000Z","size":77,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-24T11:31:35.508Z","etag":null,"topics":["client","golang","hotelbeds","hotelbeds-sdk","library","sdk"],"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/0x9ef.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":"audit.go","citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-23T21:28:57.000Z","updated_at":"2024-07-31T13:37:49.000Z","dependencies_parsed_at":"2024-02-23T22:41:35.107Z","dependency_job_id":"7203979f-3142-4edb-a049-74de03d3b89d","html_url":"https://github.com/0x9ef/hotelbeds-go","commit_stats":null,"previous_names":["0x9ef/hotelbeds-go"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x9ef%2Fhotelbeds-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x9ef%2Fhotelbeds-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x9ef%2Fhotelbeds-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0x9ef%2Fhotelbeds-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0x9ef","download_url":"https://codeload.github.com/0x9ef/hotelbeds-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244159990,"owners_count":20408019,"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":["client","golang","hotelbeds","hotelbeds-sdk","library","sdk"],"created_at":"2024-11-24T09:29:01.766Z","updated_at":"2025-03-18T04:47:36.525Z","avatar_url":"https://github.com/0x9ef.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HotelBeds client written in Go\n[![Go Tests](https://github.com/0x9ef/hotelbeds-go/actions/workflows/ci.yaml/badge.svg)](https://github.com/0x9ef/hotelbeds-go/actions/workflows/ci.yaml)\n\nGo client written for [HotelBeds](https://hotelbeds.com/). It's unofficial client, currently supported only by my [0x9ef](https://github.com/0x9ef). I will tack version changes and changelogs as soon as possible.\n\n## Installation\n\u003e NOTE: Requires at least Go 1.18 since we use generics\n\nTo get latest version use:\n```\ngo get github.com/0x9ef/hotelbeds-go@latest\n```\n\nTo specify version use:\n```\ngo get github.com/0x9ef/clientx@1.24.4 # version\n```\n\n## Usage Examples\nSee [examples/](https://github.com/0x9ef/hotelbeds-go/tree/master/examples) folder or `_test.go` files.\n\n## Getting Started\nThe client is built on [ClientX](https://github.com/0x9ef/clientx) library, so if there is no way to implement some functionality through because of ClientX, please submit [issue](https://github.com/0x9ef/clientx/issues) or create [pull request](https://github.com/0x9ef/clientx/pulls) in ClientX repository.\n\n\n## Initialization\nThe client automatically builds authorization headers and calculates X-Signature from current timestamp, so you don't need to do it manually.\n\n```go\napi := hotelbeds.New(os.Getenv(\"HOTELBEDS_API_KEY\"), os.Getenv(\"HOTELBEDS_API_SECRET\"))\n```\n\n## Useful information\nUseful articles to stay tuned:\n- [Booking API](https://developer.hotelbeds.com/documentation/hotels/booking-api/workflow/)\n- [Content API](https://developer.hotelbeds.com/documentation/hotels/content-api/how-use-content-api/) \n- [Cache API](https://developer.hotelbeds.com/documentation/hotels/cache-api/workflows/)\n\n## Get Availability\n```go\nfunc main() {\n\tapi := hotelbeds.New(os.Getenv(\"HOTELBEDS_API_KEY\"), os.Getenv(\"HOTELBEDS_API_SECRET\"))\n\n\tctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)\n\tdefer cancel()\n\n\tresp, err := api.ListAvailableHotels(ctx, \u0026hotelbeds.ListAvailableHotelsInput{\n\t\tStay: hotelbeds.Stay{\n\t\t\tCheckIn:  \"2024-04-02\",\n\t\t\tCheckOut: \"2024-04-03\",\n\t\t},\n\t\tOccupancies: []hotelbeds.Occupancy{\n\t\t\t{\n\t\t\t\tRooms:  1,\n\t\t\t\tAdults: 1,\n\t\t\t},\n\t\t},\n\t\tHotels: hotelbeds.FilterHotel{\n\t\t\tHotelCodes: []int{6619, 6613},\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t... // do something with resp\n}\n```\n\n## Implementation status\n\nInternal:\n- [x] API Client\n- [x] Rate Limiting\n- [x] Retry Mechanism\n- [x] Error Handling\n\nHotel APIs:\n- [x] Availability\n- [x] Check rates\n- [x] Booking Confirmation\n- [x] Booking List\n- [x] Booking Detail\n- [x] Booking Change\n- [x] Booking Cancellation\n- [ ] Booking Reconfirmation\n\nContent APIs:\n- [x] Hotels List\n- [x] Hotel Details\n- [x] Countries\n- [x] Destinations\n- [x] Acommodations\n- [x] Boards\n- [x] BoardGroups\n- [x] Categories\n- [x] Chains\n- [x] Classifications\n- [x] Currencies\n- [x] Facilities\n- [x] Facility Groups\n- [x] Facility Typologies\n- [x] Image Types\n- [x] Issues\n- [x] Languages\n- [x] Promotions\n- [x] Rate Comments\n- [ ] Rate Comment Details\n- [x] Rooms\n- [x] Segments\n\n## License\n\nThis source code is licensed under the MIT license found\nin the LICENSE file in the root directory of this source tree.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0x9ef%2Fhotelbeds-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0x9ef%2Fhotelbeds-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0x9ef%2Fhotelbeds-go/lists"}