{"id":13480605,"url":"https://github.com/tbruyelle/hipchat-go","last_synced_at":"2025-04-12T20:46:01.876Z","repository":{"id":57484228,"uuid":"24943022","full_name":"tbruyelle/hipchat-go","owner":"tbruyelle","description":"Go client library for the HipChat API v2","archived":false,"fork":false,"pushed_at":"2018-10-24T20:41:14.000Z","size":1885,"stargazers_count":122,"open_issues_count":3,"forks_count":55,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-04T00:10:00.912Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tbruyelle.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}},"created_at":"2014-10-08T13:54:50.000Z","updated_at":"2024-10-05T03:47:27.000Z","dependencies_parsed_at":"2022-08-26T14:20:41.765Z","dependency_job_id":null,"html_url":"https://github.com/tbruyelle/hipchat-go","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbruyelle%2Fhipchat-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbruyelle%2Fhipchat-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbruyelle%2Fhipchat-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbruyelle%2Fhipchat-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tbruyelle","download_url":"https://codeload.github.com/tbruyelle/hipchat-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631696,"owners_count":21136559,"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-07-31T17:00:42.317Z","updated_at":"2025-04-12T20:46:01.841Z","avatar_url":"https://github.com/tbruyelle.png","language":"Go","funding_links":[],"categories":["Frameworks and libraries"],"sub_categories":["HipChat"],"readme":"# hipchat-go\n\nGo client library for the [HipChat API v2](https://www.hipchat.com/docs/apiv2).\n\n[![GoDoc](https://godoc.org/github.com/tbruyelle/hipchat-go/hipchat?status.svg)](https://godoc.org/github.com/tbruyelle/hipchat-go/hipchat)\n[![Build Status](https://travis-ci.org/tbruyelle/hipchat-go.svg??branch=master)](https://travis-ci.org/tbruyelle/hipchat-go)\n\nCurrently only a small part of the API is implemented, so pull requests are welcome.\n\n### Usage\n\n```go\nimport \"github.com/tbruyelle/hipchat-go/hipchat\"\n```\n\nBuild a new client, then use the `client.Room` service to spam all the rooms you have access to (not recommended):\n\n```go\nc := hipchat.NewClient(\"\u003cyour AuthToken here\u003e\")\n\nopt := \u0026hipchat.RoomsListOptions{IncludePrivate:  true, IncludeArchived: true}\nrooms, _, err := c.Room.List(opt)\nif err != nil {\n\tpanic(err)\n}\n\nnotifRq := \u0026hipchat.NotificationRequest{Message: \"Hey there!\"}\n\nfor _, room := range rooms.Items {\n\t_, err := c.Room.Notification(room.Name, notifRq)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n}\n```\n\n### Testing the auth token\n\nHipChat allows to [test the auth token](https://www.hipchat.com/docs/apiv2/auth#auth_test) by adding the `auth_test=true` param, into any API endpoints.\n\nYou can do this with `hipchat-go` by setting the global var `hipchat.AuthTest`. Because the server response will be different from the one defined in the API endpoint, you need to check another global var `AuthTestReponse` to see if the authentication succeeds.\n\n```go\nhipchat.AuthTest = true\n\nclient.Room.Get(42)\n\n_, ok := hipchat.AuthTestResponse[\"success\"]\nfmt.Println(\"Authentification succeed :\", ok)\n// Dont forget to reset the variable, or every other API calls\n// will be impacted.\nhipchat.AuthTest = false\n```\n\n---\nThe code architecture is hugely inspired by [google/go-github](http://github.com/google/go-github).\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbruyelle%2Fhipchat-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftbruyelle%2Fhipchat-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbruyelle%2Fhipchat-go/lists"}