Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dashboards] Add support for dashboard list API v2 #374

Merged
merged 2 commits into from
May 22, 2019

Conversation

jbenais
Copy link
Contributor

@jbenais jbenais commented May 7, 2019

  • Add DashboardList.v2.get_items, DashboardList.v2.add_items, DashboardList.v2.update_items and DashboardList.v2.delete_items API calls

@jbenais jbenais changed the title [dashboardsAdd support for dashboard list API v2 [dashboards] Add support for dashboard list API v2 May 7, 2019
@jbenais jbenais force-pushed the julia.benais/dashboard-lists-v2 branch 3 times, most recently from c1d23c3 to d1e7727 Compare May 7, 2019 21:33
datadog/api/resources.py Outdated Show resolved Hide resolved
datadog/api/api_client.py Outdated Show resolved Hide resolved
@jbenais jbenais force-pushed the julia.benais/dashboard-lists-v2 branch from fbdad16 to 7d54b7b Compare May 15, 2019 19:34
Copy link
Contributor

@gzussa gzussa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did we choose to have v2 as a sub variable within DashboardList? Would it be better to have a DashboardListV2 such a way we can do api.DashboardListV2 directly? Also, did we consider having something like api.v2.DashboardList?

@jbenais
Copy link
Contributor Author

jbenais commented May 17, 2019

Why did we choose to have v2 as a sub variable within DashboardList? Would it be better to have a DashboardListV2 such a way we can do api.DashboardListV2 directly?

Adding a DashboardListV2 class means that we would have to do the same for all other classes that would need to be versioned and it can become very messy at some point. We also wanted to keep the name DashboardList because we want users to use the latest version of our API at the end. Having DashboardListV2 could let users think that they can use either DashboardList or DashboardListV2, which we don't want. This is why we wanted to implement a solution that would allow, in the future, to manage API updates in a simple way. With this approach, you can specify your endpoint version easily.

Also, did we consider having something like api.v2.DashboardList?

In general, when it comes to versioning, adding the prefix 'v2' after 'api' means that the whole api has been updated to another version, which is not the case here since only 4 endpoints have been updated. We have therefore chosen to place 'v2' after DashboardList to avoid any confusion and also because it seems clear enough for the users.

@jbenais jbenais merged commit e38bda9 into master May 22, 2019
@jbenais jbenais deleted the julia.benais/dashboard-lists-v2 branch May 22, 2019 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants