My Note

自己理解のためのブログ

OSSの go-datadog-api にPullRequestを送った

この記事がはてブロの100本目の記事になります!!ついに!という気持ちです。 今回は、Datadogに触れる機会が増えてきてDatadogのAPIレファレンスを見ていて何かAPIを実装したいと思って以下のGitHubリポジトリにPRを送りました。

github.com

このリポジトリは DatadogのGitHubがForkしていて、コントリビューション先が↑のリポジトリになっていました。

github.com

There are certainly some, but presently no known major bugs. If you do find something that doesn't work as expected, please file an issue on Github: https://github.com/zorkian/go-datadog-api/issues Thanks in advance! And, as always, patches welcome!

今回実装したのIは Organizations を GetするAPIです。

docs.datadoghq.com

OSSにPRを送るときにはリポジトリをForkしてPRを出していきますが、詳しい方法については、以前に書いた記事を参考にしています。

yhidetoshi.hatenablog.com

今回は OrganizationのGet APIを実装するために、以下のコードを作成しました。

  • datadog-accessors.go
  • organizations.go
  • organizations_test.go
  • tests/fixtures/organizations_response.json

https://github.com/zorkian/go-datadog-api/pull/327

f:id:yhidetoshi:20200815124122p:plain

Hey 👋 this client library has pretty much stopped active development. I suggest you check out the new datadog-api-client-go library [1] if you need this functionality. Despite datadog-api-client-go is still in beta, it's already fairly stable and we don't expect large changes to land at this point and it does support the functionality you're looking for - the Go code examples at the API docs page you referenced will show you the basic usage of this new library. [1] https://github.com/DataDog/datadog-api-client-go/

Google翻訳すると。

こんにちは👋このクライアントライブラリは、アクティブな開発をほぼ停止しています。この機能が必要な場合は、新しいdatadog-api-client-goライブラリ[1]をチェックすることをお勧めします。 datadog-api-client-goはまだベータ版ですが、すでにかなり安定しており、現時点で大きな変更が行われることはないと予想されており、探している機能をサポートしています-APIドキュメントのGoコード例参照したページには、この新しいライブラリの基本的な使用法が表示されます。 [1] https://github.com/DataDog/datadog-api-client-go/

もうこのリポジトリでは新規の追加実装はやっていないという事なので、これからは https://github.com/DataDog/datadog-api-client-go/ を利用してほしいと。 残念ですが・・。 とうい事で今回送ったPRは取り込まれることはありませんでした。