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

Migration Plans for 2023-10 breaking changes? #115

Open
shanaxel42 opened this issue Sep 20, 2023 · 5 comments
Open

Migration Plans for 2023-10 breaking changes? #115

shanaxel42 opened this issue Sep 20, 2023 · 5 comments

Comments

@shanaxel42
Copy link

Hi all! Wondering if there is a plan to refactor this client to support the new 2023-10 api version with breaking changes?

Thanks!

https://developer.monday.com/api-reference/docs/migrating-to-v-2023-10

@willnaoosmith
Copy link
Contributor

willnaoosmith commented Sep 21, 2023

Was about to create an issue for that.

According to this page, they will end the support for the 2023-07 version on 15/01/2024, which is basically 3 months from now.

image

And looks like this repo does not use the API-Version header on the requests, so this repo will break as soon as Monday .com stop supporting the 2023-07 version.

Since the last update this repo had was 9 months ago, and we have a more updated fork probably we should fork the already forked repo and add support to the new version.
I looked into the newer commits for the fork, and it does not have anything related to 2023-10.

@shanaxel42
Copy link
Author

Agree @willnaoosmith ! I'd also be open to creating a PR into this repo with fixes to the breaking changes but not sure if this repo is actively managed anymore?

@willnaoosmith
Copy link
Contributor

@shanaxel42 the current repository we are talking does not look like it's actively maintained.
But there are plenty of forks out there, The one I linked on my previous answer looks like the most well maintained one, so I would open a PR there instead.
I already forked it too.

@willnaoosmith
Copy link
Contributor

willnaoosmith commented Oct 5, 2023

Hi there!
Just an update about this.

I'm doing some changes on the fork I mentioned before, here's my fork.
I added a functionality to set the headers on every request, so we can change the API version like this:

monday = MondayClient(
    token = "YourTokenHere",
    headers = {'API-Version' : '2023-10'}
)

While changing the requests to match the 2023-10 version, I found out that the items query doesn't accept item ID anymore, so if you want to search data from a specific item, you're going to get every item on the board to find the ID you want (For some unknown reason, that's how they did it).

I opened a discussion on the Monday forum about it.

[Edit]
Nevermind, it works with a different query.

@willnaoosmith
Copy link
Contributor

willnaoosmith commented Oct 5, 2023

By the way, I think I made it!
It should work on the 2023-10 version now!

There's not that much stuff that this module uses that changes with the 2023-10 API.

What changes:

  1. The headers option, that I mentioned before (Will not be required to use the new API version after 17 of January).
monday = MondayClient(
    token = "YourTokenHere",
    headers = {'API-Version' : '2023-10'}
)
  1. The fetch_updates_for_item query doesn't use the board ID parameter anymore, so it should be like this:
monday.updates.fetch_updates_for_item(item_id="ItemIDHere", limit="LimitHere")
  1. the fetch_items_by_column_value uses items_page_by_column_values now instead of the items_by_column_values, but this does not change anything about how it should be used.
monday.items.fetch_items_by_column_value(board_id='BoardIDHere',  column_id="ColumnIDHere", value="ColumnValueHere")

If anyone wants to try it, just install it using pip install git+https://github.com/willnaoosmith/monday.git and change the headers.

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

No branches or pull requests

2 participants