diff --git a/Trello/Trello_Create_Card.ipynb b/Trello/Trello_Create_Card.ipynb index 0e56a7f7f4..0d1f31f2cb 100644 --- a/Trello/Trello_Create_Card.ipynb +++ b/Trello/Trello_Create_Card.ipynb @@ -53,7 +53,7 @@ "tags": [] }, "source": [ - "**Last update:** 2023-07-14 (Created: 2023-07-14)" + "**Last update:** 2023-10-16 (Created: 2023-07-14)" ] }, { @@ -103,9 +103,16 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "id": "e313ed44-19d7-4ea2-97f4-decbc0809508", "metadata": { + "execution": { + "iopub.execute_input": "2023-10-16T07:33:06.764389Z", + "iopub.status.busy": "2023-10-16T07:33:06.764161Z", + "iopub.status.idle": "2023-10-16T07:33:06.768954Z", + "shell.execute_reply": "2023-10-16T07:33:06.768366Z", + "shell.execute_reply.started": "2023-10-16T07:33:06.764366Z" + }, "papermill": {}, "tags": [] }, @@ -126,16 +133,23 @@ "### Setup Variables\n", "- `api_key`: Your Trello API key. [Get your API key here](https://github.com/Benjifilly/My_notebooks/wiki/How-to-obtain-an-API-key-for-Trello)\n", "- `force_update`: Parameters to enforce the token update\n", - "- `board_id`: The ID of the board you want to create the card in.\n", - "- `list_id`: The ID of the list you want to create the card in, Use this template to find the ID:
\"Trello - Retrieve list id\"
\n", + "- `board_id`: The ID of the board where you want to create the card. Use this template to find the ID: \"Trello/Trello_List_Boards.ipynb\"\n", + "- `list_id`: The ID of the list where you want to create the card. Use this template to find the ID: \"Trello/Trello_Get_Lists_on_a_Board.ipynb\"\n", "- `card_details`: is a list that contains dictionaries representing the name and description of cards to be created on the Trello board." ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 7, "id": "ef678151-5b31-4645-8d92-e8f624472ca6", "metadata": { + "execution": { + "iopub.execute_input": "2023-10-16T07:33:07.559742Z", + "iopub.status.busy": "2023-10-16T07:33:07.559511Z", + "iopub.status.idle": "2023-10-16T07:33:07.696857Z", + "shell.execute_reply": "2023-10-16T07:33:07.696153Z", + "shell.execute_reply.started": "2023-10-16T07:33:07.559717Z" + }, "papermill": {}, "tags": [] }, @@ -143,8 +157,8 @@ "source": [ "api_key = naas.secret.get(\"TRELLO_API_KEY\") or \"YOUR_TRELLO_API_KEY\"\n", "force_update = False\n", - "board_id = \"ogBhOe9a\" #Example: \"https://trello.com/b/ogBhOe9a/ultimate-to-do-list\"\n", - "list_id = \"649d8b3c9f796ee9d57a765d\" #Example: \"649d8b3c9f796ee9d57a765d\"\n", + "board_id = \"64a19089d2740e7042011f55\"\n", + "list_id = \"64a1908a014235fd7b94aafe\"\n", "\n", "#Example with several cards\n", "card_details = [\n", @@ -179,9 +193,16 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 8, "id": "98147739-b010-4936-8205-552412504d39", "metadata": { + "execution": { + "iopub.execute_input": "2023-10-16T07:33:08.788184Z", + "iopub.status.busy": "2023-10-16T07:33:08.787946Z", + "iopub.status.idle": "2023-10-16T07:33:08.929960Z", + "shell.execute_reply": "2023-10-16T07:33:08.929304Z", + "shell.execute_reply.started": "2023-10-16T07:33:08.788159Z" + }, "papermill": {}, "tags": [] }, @@ -225,9 +246,16 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 9, "id": "56d84ea9-48e7-4642-96d2-9999eaf33f02", "metadata": { + "execution": { + "iopub.execute_input": "2023-10-16T07:33:09.780469Z", + "iopub.status.busy": "2023-10-16T07:33:09.780162Z", + "iopub.status.idle": "2023-10-16T07:33:09.789629Z", + "shell.execute_reply": "2023-10-16T07:33:09.788965Z", + "shell.execute_reply.started": "2023-10-16T07:33:09.780434Z" + }, "papermill": {}, "tags": [] }, @@ -274,13 +302,42 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 10, "id": "79ca43a4-b149-4b21-b73e-384f383e0955", "metadata": { + "execution": { + "iopub.execute_input": "2023-10-16T07:33:12.398606Z", + "iopub.status.busy": "2023-10-16T07:33:12.398353Z", + "iopub.status.idle": "2023-10-16T07:33:13.484942Z", + "shell.execute_reply": "2023-10-16T07:33:13.484203Z", + "shell.execute_reply.started": "2023-10-16T07:33:12.398569Z" + }, "papermill": {}, "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "β Card Created:\n", + "π ID: 652ce73895823f12c4c8d699\n", + "- Name: Call at 9:00 PM this Monday\n", + "- Description: Don't forget to do this call, it's very important\n", + "--------------------\n", + "β Card Created:\n", + "π ID: 652ce738cfae8bbb75818cf2\n", + "- Name: Meeting with the team\n", + "- Description: Discuss project updates and action items\n", + "--------------------\n", + "β Card Created:\n", + "π ID: 652ce7398a9cf85a98e68af5\n", + "- Name: Send report to the client\n", + "- Description: Include sales figures and recommendations\n", + "--------------------\n" + ] + } + ], "source": [ "for card_info in card_details:\n", " card = create_card(api_key, token, board_id, list_id, card_info[\"name\"], card_info[\"desc\"])\n", @@ -294,6 +351,14 @@ " print(\"β Failed to create card.\")\n", " print(\"--------------------\")" ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0b026e17-0465-4f97-a078-80227582b604", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { @@ -334,4 +399,4 @@ }, "nbformat": 4, "nbformat_minor": 5 -} \ No newline at end of file +} diff --git a/Trello/Trello_Get_Lists_on_a_Board.ipynb b/Trello/Trello_Get_Lists_on_a_Board.ipynb index 79e7dfbaeb..9bc69bb018 100644 --- a/Trello/Trello_Get_Lists_on_a_Board.ipynb +++ b/Trello/Trello_Get_Lists_on_a_Board.ipynb @@ -55,7 +55,7 @@ "tags": [] }, "source": [ - "**Last update:** 2023-07-14 (Created: 2023-07-14)" + "**Last update:** 2023-10-16 (Created: 2023-07-14)" ] }, { @@ -107,9 +107,16 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 6, "id": "supreme-westminster", "metadata": { + "execution": { + "iopub.execute_input": "2023-10-16T07:32:16.931492Z", + "iopub.status.busy": "2023-10-16T07:32:16.931253Z", + "iopub.status.idle": "2023-10-16T07:32:16.934355Z", + "shell.execute_reply": "2023-10-16T07:32:16.933711Z", + "shell.execute_reply.started": "2023-10-16T07:32:16.931466Z" + }, "papermill": {}, "tags": [] }, @@ -140,14 +147,21 @@ "source": [ "- `api_key`: Your Trello API key. [Get your API key here](https://github.com/Benjifilly/My_notebooks/wiki/How-to-obtain-an-API-key-for-Trello)\n", "- `force_update`: Parameters to enforce the token update\n", - "- `board_id`: The unique identifier of the Trello board you want to work with." + "- `board_id`: The unique identifier of the Trello board you want to work with. Use this template to find the ID: \"Trello/Trello_List_Boards.ipynb\"" ] }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 7, "id": "tender-albany", "metadata": { + "execution": { + "iopub.execute_input": "2023-10-16T07:32:17.840428Z", + "iopub.status.busy": "2023-10-16T07:32:17.840203Z", + "iopub.status.idle": "2023-10-16T07:32:17.962957Z", + "shell.execute_reply": "2023-10-16T07:32:17.962240Z", + "shell.execute_reply.started": "2023-10-16T07:32:17.840404Z" + }, "papermill": {}, "tags": [] }, @@ -155,7 +169,7 @@ "source": [ "api_key = naas.secret.get(\"TRELLO_API_KEY\") or \"YOUR_TRELLO_API_KEY\"\n", "force_update = False\n", - "board_id = \"ogBhOe9a\" #example: \"https://trello.com/b/ogBhOe9a/ultimate-to-do-list\" " + "board_id = \"64a19089d2740e7042011f55\"" ] }, { @@ -183,9 +197,16 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 8, "id": "96e73242-c286-4413-8d69-825ad7391584", "metadata": { + "execution": { + "iopub.execute_input": "2023-10-16T07:32:19.197135Z", + "iopub.status.busy": "2023-10-16T07:32:19.196728Z", + "iopub.status.idle": "2023-10-16T07:32:19.321838Z", + "shell.execute_reply": "2023-10-16T07:32:19.320934Z", + "shell.execute_reply.started": "2023-10-16T07:32:19.197097Z" + }, "papermill": {}, "tags": [] }, @@ -219,9 +240,16 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 9, "id": "6ad17a5c-689b-4c43-9630-3765e3d0e239", "metadata": { + "execution": { + "iopub.execute_input": "2023-10-16T07:32:20.300182Z", + "iopub.status.busy": "2023-10-16T07:32:20.299955Z", + "iopub.status.idle": "2023-10-16T07:32:20.520727Z", + "shell.execute_reply": "2023-10-16T07:32:20.520139Z", + "shell.execute_reply.started": "2023-10-16T07:32:20.300158Z" + }, "papermill": {}, "tags": [] }, @@ -255,13 +283,36 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 10, "id": "73bd6ede-4b47-465f-8c71-3d3caa3e7dce", "metadata": { + "execution": { + "iopub.execute_input": "2023-10-16T07:32:21.894538Z", + "iopub.status.busy": "2023-10-16T07:32:21.894203Z", + "iopub.status.idle": "2023-10-16T07:32:21.913306Z", + "shell.execute_reply": "2023-10-16T07:32:21.910751Z", + "shell.execute_reply.started": "2023-10-16T07:32:21.894494Z" + }, "papermill": {}, "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "π \u001b[1mList Title:\u001b[0m Γ faire\n", + "π \u001b[1mList ID:\u001b[0m 64a1908a014235fd7b94aafe\n", + "------------------------\n", + "π \u001b[1mList Title:\u001b[0m En cours\n", + "π \u001b[1mList ID:\u001b[0m 64a1908ab6205111b631b83d\n", + "------------------------\n", + "π \u001b[1mList Title:\u001b[0m TerminΓ©\n", + "π \u001b[1mList ID:\u001b[0m 64a1908a227da437458e2e99\n", + "------------------------\n" + ] + } + ], "source": [ "if response.status_code == 200:\n", " lists = response.json()\n", @@ -272,6 +323,14 @@ "else:\n", " print(\"β Failed to fetch lists.\")" ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "74f65e9e-46b8-4887-89b2-2d1283fc51b1", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { @@ -305,4 +364,4 @@ }, "nbformat": 4, "nbformat_minor": 5 -} \ No newline at end of file +} diff --git a/Trello/Trello_List_Boards.ipynb b/Trello/Trello_List_Boards.ipynb index 8e2f161b92..383e8a937c 100644 --- a/Trello/Trello_List_Boards.ipynb +++ b/Trello/Trello_List_Boards.ipynb @@ -53,7 +53,7 @@ "tags": [] }, "source": [ - "**Last update:** 2023-07-11 (Created: 2023-07-11)" + "**Last update:** 2023-10-16 (Created: 2023-07-11)" ] }, { @@ -247,13 +247,30 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 9, "id": "b5e17a25-dcf7-4e5f-93c9-359ee24c174a", "metadata": { + "execution": { + "iopub.execute_input": "2023-10-16T07:30:22.622220Z", + "iopub.status.busy": "2023-10-16T07:30:22.621911Z", + "iopub.status.idle": "2023-10-16T07:30:22.629653Z", + "shell.execute_reply": "2023-10-16T07:30:22.629012Z", + "shell.execute_reply.started": "2023-10-16T07:30:22.622190Z" + }, "papermill": {}, "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "π You have 1 board(s) in Trello:\n", + "---------------------------------\n", + "π Naas Onboarding (ID: 64a19089d2740e7042011f55)\n" + ] + } + ], "source": [ "# Check if the request was successful\n", "if response.status_code == 200:\n", @@ -268,7 +285,8 @@ " # Iterate over the boards and print their names\n", " for board in boards:\n", " board_name = board['name']\n", - " print(f\"π {board_name}\")\n", + " board_id = board['id']\n", + " print(f\"π {board_name} (ID: {board_id})\")\n", "else:\n", " print(f\"β οΈ Error: {response.status_code} - {response.text}\")" ] @@ -323,4 +341,4 @@ }, "nbformat": 4, "nbformat_minor": 5 -} \ No newline at end of file +} diff --git a/Trello/Trello_Update_Cards.ipynb b/Trello/Trello_Update_Cards.ipynb new file mode 100644 index 0000000000..2f226236a0 --- /dev/null +++ b/Trello/Trello_Update_Cards.ipynb @@ -0,0 +1,315 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "e3f41c66-54b7-4f06-9881-9a9991bf43d1", + "metadata": { + "papermill": {}, + "tags": [] + }, + "source": [ + "" + ] + }, + { + "cell_type": "markdown", + "id": "dbc4cf57-1769-4639-bc72-0377bb682bf5", + "metadata": { + "papermill": {}, + "tags": [] + }, + "source": [ + "# Trello - Update Cards\n", + "