zorkian / go-datadog-api

A Go implementation of the Datadog API.
BSD 3-Clause "New" or "Revised" License
183 stars 156 forks source link

Add v2 of the dashboard_list_item API #262

Closed nmuesch closed 5 years ago

nmuesch commented 5 years ago

Adds the v2 version of the dashboard list item API - https://docs.datadoghq.com/api/?lang=python#get-items-of-a-dashboard-list

Makes new methods for each CRUD operation (same names as the V1 version but appended with V2)

Only the individual items API has a V2, so this doesn't duplicate the V1 dashboard_list API. Mostly the same, but the Item struct ID field is now all capitalized, and returns a string instead of an integer.

nmuesch commented 5 years ago

@jbenais Thanks for the review. Added a set of tests (its pretty much identical to the tests for v1, but updated to use the new structs/methods) Let me know what you think.

I also don't have a strong preference but found myself referring to these as DashboardListV2Items vs having the V2 after the word items. Let me know if you think one is preferential to the other. (The API methods are consistent)

bkabrda commented 5 years ago

LGTM, merging 👍 Thanks for doing this!