tbruyelle / hipchat-go Goto Github PK
View Code? Open in Web Editor NEWGo client library for the HipChat API v2
License: Apache License 2.0
Go client library for the HipChat API v2
License: Apache License 2.0
Hi Dev team this is not really an issue but a request. Are you able to provide a working example of notification with Card object. When I add card object in my notification, I get HTTP 400 error. Not sure why. My goal is to post a notification with link where when the user click the link it will open a dialog displaying some text. Thank you!
cf: https://developer.atlassian.com/hipchat/guide/hipchat-rest-api/api-title-expansion
reduces impact of API rate limiting
pull request to come, unless it's already in queue
For consistency I renamed GetAllWebhooks
to ListWebhooks
, sorry for the annoyance.
You can rename the method call in your code, or you can change the import to http://gopkg.in/tbruyelle/hipchat-go.v1/hipchat
, where the method is still named GetAllWebhooks
.
I think the project could be improved adding convenience methods to the objects instead of passing id's through the relevant services.
Examples would be:
func (r *Room) History(opt *HistoryOptions)
func (r *Room) Message(msgReq *RoomMessageRequest) (*http.Response, error)
With a flow like:
room := client.Room.get("123")
room.History(&hipchat.HistoryOptions{})
This could be achieved by adding the service to the struct and then create some wrapper methods.
type Room struct {
...
GuestAccessURL string `json:"guest_access_url"`
roomService *RoomService
}
func (r *Room) History(opt *HistoryOptions) (*History, *http.Response, error) {
return r.roomService.History(strconv.Itoa(r.ID), opt)
}
If I use this library to send a message it currently throws away the HTTP status code. It's not possible to know from the error if the error is temporary or permanent. For example, on network errors and 5xx I want to try again. Possible solutions is always returning the http client even on errors or alternatively creating an error type that can be interrogated for temporariness.
I tried the following and none of them work
notifyHipchat("/code This \n is \n a \n message")
notifyHipchat("This \n is \n a \n message")
notifyHipchat("This \\n is \\n a \\n message")
notifyHipchat(`This
is
a
message`)
notifyHipchat(`This \nis \na \nmessage`)
Hi Dev team,
This is not an issue, I just need you expert advise on how to configure my bot developed with this package. The bot I developed is deployed in a company owned dev env. The bot is running on port 443 and was able to send notification to HipChat rooms. Unfortunately, the bot is not receiving any request coming from HipChat.
When I test in my local machine using ngrok to expose my bot, it works fine w\o issue. But when I deploy to our dev env w\o ngrok, the issue occurs.
What could be the requirement in order for HipChat to send request to my bot?
Do I need certificates? Should the HipChat server have network access to the bot server?
I lack knowledge in this area and appreciate any advise.
Many thanks.
Update your code or use the v1.1 tag by changing your import path to http://gopkg.in/tbruyelle/hipchat-go.v1/hipchat
Hello!
This package can't work other insecure connections. In some cases (like proxy) it's necessary.
Implement this feature please.
cf: https://developer.atlassian.com/hipchat/guide/hipchat-rest-api/api-rate-limits
implement automatic retry when API rate limited
pull request to come, unless it's already in queue
Hi,
I'm considering using this library on a Google App Engine module, so I want to use hipchat.Client
with an HTTP client returned by urlfetch.Client function. But, as of now, hipchat.Client
always uses http.DefaultClient and there's no way to replace it.
I believe it would be really useful if an HTTP client can be specified to hipchat.NewClient
like go-github.NewClient. I understand this could be a breaking change, however, following it is very easy and it is just to replace hipchat.NewClient(token)
with hipchat.NewClient(nil, token)
. Just adding a method like SetHTTPClient(*http.Client)
to hipchat.Client
might be enough if such breaking change is not acceptable
Does anyone have any thoughts on this?
If one of the above suggestions is acceptable, I can work on a PR to make changes accordingly.
https://www.hipchat.com/docs/api/auth#auth_test
would probably be something like c.Room.Test(room/id) for example (all api endpoints support this apparently)
cf: https://www.hipchat.com/docs/apiv2/method/view_room_history
Adding support for include_deleted
and end_date
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.