miro_api.api_extended
1from typing import Annotated, Generator, Optional 2 3from pydantic import Field, StrictBool, StrictStr, validate_call 4from miro_api.api import MiroApiEndpoints 5from miro_api.models.board import Board 6from miro_api.models.board_member import BoardMember 7from miro_api.models.connector_with_links import ConnectorWithLinks 8from miro_api.models.generic_item import GenericItem 9from miro_api.models.organization_member import OrganizationMember 10from miro_api.models.tag import Tag 11from miro_api.models.team import Team 12from miro_api.models.team_member import TeamMember 13 14 15class MiroApiExtended(MiroApiEndpoints): 16 @staticmethod 17 def _has_more_data(offset: Optional[int], data_length: int, total: Optional[int]): 18 total = total or 0 19 offset = offset or 0 20 return total and data_length and offset + data_length < total 21 22 @validate_call 23 def get_all_boards( 24 self, 25 team_id: Optional[StrictStr] = None, 26 project_id: Optional[StrictStr] = None, 27 query: Optional[Annotated[str, Field(strict=True, max_length=500)]] = None, 28 owner: Optional[StrictStr] = None, 29 limit: Optional[Annotated[str, Field(strict=True)]] = None, 30 sort: Optional[StrictStr] = None, 31 ) -> Generator[Board, None, None]: 32 current_offset = 0 33 while True: 34 response = self.get_boards( 35 team_id=team_id, 36 project_id=project_id, 37 query=query, 38 owner=owner, 39 limit=limit, 40 offset=str(current_offset), 41 sort=sort, 42 ) 43 44 for board in response.data or []: 45 yield board 46 47 received_items_len = len(response.data or []) 48 if not self._has_more_data(response.offset, received_items_len, response.total): 49 break 50 51 current_offset += received_items_len 52 53 @validate_call 54 def get_all_tags_from_board( 55 self, 56 board_id: Annotated[ 57 StrictStr, 58 Field(description="Unique identifier (ID) of the board whose tags you want to retrieve."), 59 ], 60 limit: Optional[Annotated[str, Field(strict=True)]] = None, 61 ) -> Generator[Tag, None, None]: 62 current_offset = 0 63 while True: 64 response = self.get_tags_from_board( 65 board_id=board_id, 66 limit=limit, 67 offset=str(current_offset), 68 ) 69 70 for board in response.data or []: 71 yield board 72 73 received_items_len = len(response.data or []) 74 if not self._has_more_data(response.offset, received_items_len, response.total): 75 break 76 77 current_offset += received_items_len 78 79 @validate_call 80 def get_all_board_members( 81 self, 82 board_id: Annotated[ 83 StrictStr, 84 Field(description="Unique identifier (ID) of the board to which the board member belongs."), 85 ], 86 limit: Optional[Annotated[str, Field(strict=True)]] = None, 87 ) -> Generator[BoardMember, None, None]: 88 current_offset = 0 89 while True: 90 response = self.get_board_members( 91 board_id=board_id, 92 limit=limit, 93 offset=str(current_offset), 94 ) 95 96 for member in response.data or []: 97 yield member 98 99 received_items_len = len(response.data or []) 100 if not self._has_more_data(response.offset, received_items_len, response.total): 101 break 102 103 current_offset += received_items_len 104 105 @validate_call 106 def get_all_items( 107 self, 108 board_id: Annotated[ 109 StrictStr, 110 Field( 111 description="Unique identifier (ID) of the board for which you want to retrieve the list of available items." 112 ), 113 ], 114 limit: Optional[Annotated[str, Field(strict=True)]] = None, 115 type: Optional[StrictStr] = None, 116 ) -> Generator[GenericItem, None, None]: 117 cursor = None 118 while True: 119 response = self.get_items( 120 board_id=board_id, 121 limit=limit, 122 cursor=cursor, 123 type=type, 124 ) 125 126 for item in response.data or []: 127 yield item 128 129 cursor = response.cursor 130 131 if not cursor or not len(response.data or []) or not response.total: 132 break 133 134 @validate_call 135 def get_all_items_by_tag( 136 self, 137 board_id_platform_tags: Annotated[ 138 StrictStr, 139 Field(description="Unique identifier (ID) of the board where you want to retrieve a specific tag."), 140 ], 141 tag_id: Annotated[ 142 StrictStr, 143 Field(description="Unique identifier (ID) of the tag that you want to retrieve."), 144 ], 145 limit: Optional[Annotated[str, Field(strict=True)]] = None, 146 ) -> Generator[GenericItem, None, None]: 147 current_offset = 0 148 while True: 149 response = self.get_items_by_tag( 150 board_id_platform_tags=board_id_platform_tags, 151 tag_id=tag_id, 152 limit=limit, 153 offset=str(current_offset), 154 ) 155 156 for item in response.data or []: 157 yield item 158 159 received_items_len = len(response.data or []) 160 if not self._has_more_data(response.offset, received_items_len, response.total): 161 break 162 163 current_offset += received_items_len 164 165 @validate_call 166 def get_all_items_within_frame( 167 self, 168 board_id: Annotated[ 169 StrictStr, 170 Field( 171 description="Unique identifier (ID) of the board that contains the frame for which you want to retrieve the list of available items." 172 ), 173 ], 174 parent_item_id: Annotated[ 175 str, 176 Field( 177 strict=True, 178 description="ID of the frame for which you want to retrieve the list of available items.", 179 ), 180 ], 181 limit: Optional[Annotated[str, Field(strict=True)]] = None, 182 type: Optional[StrictStr] = None, 183 ) -> Generator[GenericItem, None, None]: 184 cursor = None 185 while True: 186 response = self.get_items_within_frame( 187 board_id_platform_containers=board_id, 188 parent_item_id=parent_item_id, 189 limit=limit, 190 type=type, 191 cursor=cursor, 192 ) 193 194 for item in response.data or []: 195 yield item 196 197 cursor = response.cursor 198 199 if not cursor or not len(response.data or []) or not response.total: 200 break 201 202 @validate_call 203 def get_all_connectors( 204 self, 205 board_id: Annotated[ 206 StrictStr, 207 Field( 208 description="Unique identifier (ID) of the board from which you want to retrieve a list of connectors." 209 ), 210 ], 211 limit: Optional[Annotated[str, Field(strict=True)]] = None, 212 ) -> Generator[ConnectorWithLinks, None, None]: 213 cursor = None 214 while True: 215 response = self.get_connectors( 216 board_id=board_id, 217 limit=limit, 218 cursor=cursor, 219 ) 220 221 for connector in response.data or []: 222 yield connector 223 224 cursor = response.cursor 225 226 if not cursor or not len(response.data or []) or not response.total: 227 break 228 229 @validate_call 230 def get_all_enterprise_teams( 231 self, 232 org_id: Annotated[StrictStr, Field(description="The id of the Organization.")], 233 limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, 234 name: Annotated[ 235 Optional[StrictStr], 236 Field( 237 description='Name query. Filters teams by name using case insensitive partial match. A value "dev" will return both "Developer\'s team" and "Team for developers".' 238 ), 239 ] = None, 240 ) -> Generator[Team, None, None]: 241 cursor = None 242 while True: 243 response = self.enterprise_get_teams( 244 org_id=org_id, 245 limit=limit, 246 cursor=cursor, 247 name=name, 248 ) 249 250 for team in response.data or []: 251 yield team 252 253 cursor = response.cursor 254 255 if not cursor or not len(response.data or []): 256 break 257 258 @validate_call 259 def get_all_organization_members( 260 self, 261 org_id: Annotated[StrictStr, Field(description="id of the organization")], 262 emails: Optional[StrictStr] = None, 263 role: Optional[StrictStr] = None, 264 license: Optional[StrictStr] = None, 265 active: Optional[StrictBool] = None, 266 limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, 267 ) -> Generator[OrganizationMember, None, None]: 268 cursor = None 269 while True: 270 response = self.enterprise_get_organization_members( 271 org_id=org_id, 272 limit=limit, 273 cursor=cursor, 274 emails=emails, 275 role=role, 276 license=license, 277 active=active, 278 ) 279 280 response_instance = response.actual_instance 281 282 if not response_instance: 283 return 284 285 if isinstance(response_instance, list): 286 for member in response_instance or []: 287 yield member 288 289 return 290 291 for member in response_instance.data or []: 292 yield member 293 294 cursor = response_instance.cursor 295 296 if not cursor or not len(response_instance.data or []): 297 break 298 299 @validate_call 300 def get_all_enterprise_team_members( 301 self, 302 org_id: Annotated[StrictStr, Field(description="The id of the Organization.")], 303 team_id: Annotated[StrictStr, Field(description="The id of the Team.")], 304 limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, 305 role: Annotated[ 306 Optional[StrictStr], 307 Field( 308 description=' Role query. Filters members by role using full word match. Accepted values are: * "member": Team member with full member permissions. * "admin": Admin of a team. Team member with permission to manage team. * "non_team": External user, non-team user. * "team_guest": Team-guest user, user with access only to a team without access to organization. ' 309 ), 310 ] = None, 311 ) -> Generator[TeamMember, None, None]: 312 cursor = None 313 while True: 314 response = self.enterprise_get_team_members( 315 org_id=org_id, 316 team_id=team_id, 317 limit=limit, 318 cursor=cursor, 319 role=role, 320 ) 321 322 for member in response.data or []: 323 yield member 324 325 cursor = response.cursor 326 327 if not cursor or not len(response.data or []): 328 break
16class MiroApiExtended(MiroApiEndpoints): 17 @staticmethod 18 def _has_more_data(offset: Optional[int], data_length: int, total: Optional[int]): 19 total = total or 0 20 offset = offset or 0 21 return total and data_length and offset + data_length < total 22 23 @validate_call 24 def get_all_boards( 25 self, 26 team_id: Optional[StrictStr] = None, 27 project_id: Optional[StrictStr] = None, 28 query: Optional[Annotated[str, Field(strict=True, max_length=500)]] = None, 29 owner: Optional[StrictStr] = None, 30 limit: Optional[Annotated[str, Field(strict=True)]] = None, 31 sort: Optional[StrictStr] = None, 32 ) -> Generator[Board, None, None]: 33 current_offset = 0 34 while True: 35 response = self.get_boards( 36 team_id=team_id, 37 project_id=project_id, 38 query=query, 39 owner=owner, 40 limit=limit, 41 offset=str(current_offset), 42 sort=sort, 43 ) 44 45 for board in response.data or []: 46 yield board 47 48 received_items_len = len(response.data or []) 49 if not self._has_more_data(response.offset, received_items_len, response.total): 50 break 51 52 current_offset += received_items_len 53 54 @validate_call 55 def get_all_tags_from_board( 56 self, 57 board_id: Annotated[ 58 StrictStr, 59 Field(description="Unique identifier (ID) of the board whose tags you want to retrieve."), 60 ], 61 limit: Optional[Annotated[str, Field(strict=True)]] = None, 62 ) -> Generator[Tag, None, None]: 63 current_offset = 0 64 while True: 65 response = self.get_tags_from_board( 66 board_id=board_id, 67 limit=limit, 68 offset=str(current_offset), 69 ) 70 71 for board in response.data or []: 72 yield board 73 74 received_items_len = len(response.data or []) 75 if not self._has_more_data(response.offset, received_items_len, response.total): 76 break 77 78 current_offset += received_items_len 79 80 @validate_call 81 def get_all_board_members( 82 self, 83 board_id: Annotated[ 84 StrictStr, 85 Field(description="Unique identifier (ID) of the board to which the board member belongs."), 86 ], 87 limit: Optional[Annotated[str, Field(strict=True)]] = None, 88 ) -> Generator[BoardMember, None, None]: 89 current_offset = 0 90 while True: 91 response = self.get_board_members( 92 board_id=board_id, 93 limit=limit, 94 offset=str(current_offset), 95 ) 96 97 for member in response.data or []: 98 yield member 99 100 received_items_len = len(response.data or []) 101 if not self._has_more_data(response.offset, received_items_len, response.total): 102 break 103 104 current_offset += received_items_len 105 106 @validate_call 107 def get_all_items( 108 self, 109 board_id: Annotated[ 110 StrictStr, 111 Field( 112 description="Unique identifier (ID) of the board for which you want to retrieve the list of available items." 113 ), 114 ], 115 limit: Optional[Annotated[str, Field(strict=True)]] = None, 116 type: Optional[StrictStr] = None, 117 ) -> Generator[GenericItem, None, None]: 118 cursor = None 119 while True: 120 response = self.get_items( 121 board_id=board_id, 122 limit=limit, 123 cursor=cursor, 124 type=type, 125 ) 126 127 for item in response.data or []: 128 yield item 129 130 cursor = response.cursor 131 132 if not cursor or not len(response.data or []) or not response.total: 133 break 134 135 @validate_call 136 def get_all_items_by_tag( 137 self, 138 board_id_platform_tags: Annotated[ 139 StrictStr, 140 Field(description="Unique identifier (ID) of the board where you want to retrieve a specific tag."), 141 ], 142 tag_id: Annotated[ 143 StrictStr, 144 Field(description="Unique identifier (ID) of the tag that you want to retrieve."), 145 ], 146 limit: Optional[Annotated[str, Field(strict=True)]] = None, 147 ) -> Generator[GenericItem, None, None]: 148 current_offset = 0 149 while True: 150 response = self.get_items_by_tag( 151 board_id_platform_tags=board_id_platform_tags, 152 tag_id=tag_id, 153 limit=limit, 154 offset=str(current_offset), 155 ) 156 157 for item in response.data or []: 158 yield item 159 160 received_items_len = len(response.data or []) 161 if not self._has_more_data(response.offset, received_items_len, response.total): 162 break 163 164 current_offset += received_items_len 165 166 @validate_call 167 def get_all_items_within_frame( 168 self, 169 board_id: Annotated[ 170 StrictStr, 171 Field( 172 description="Unique identifier (ID) of the board that contains the frame for which you want to retrieve the list of available items." 173 ), 174 ], 175 parent_item_id: Annotated[ 176 str, 177 Field( 178 strict=True, 179 description="ID of the frame for which you want to retrieve the list of available items.", 180 ), 181 ], 182 limit: Optional[Annotated[str, Field(strict=True)]] = None, 183 type: Optional[StrictStr] = None, 184 ) -> Generator[GenericItem, None, None]: 185 cursor = None 186 while True: 187 response = self.get_items_within_frame( 188 board_id_platform_containers=board_id, 189 parent_item_id=parent_item_id, 190 limit=limit, 191 type=type, 192 cursor=cursor, 193 ) 194 195 for item in response.data or []: 196 yield item 197 198 cursor = response.cursor 199 200 if not cursor or not len(response.data or []) or not response.total: 201 break 202 203 @validate_call 204 def get_all_connectors( 205 self, 206 board_id: Annotated[ 207 StrictStr, 208 Field( 209 description="Unique identifier (ID) of the board from which you want to retrieve a list of connectors." 210 ), 211 ], 212 limit: Optional[Annotated[str, Field(strict=True)]] = None, 213 ) -> Generator[ConnectorWithLinks, None, None]: 214 cursor = None 215 while True: 216 response = self.get_connectors( 217 board_id=board_id, 218 limit=limit, 219 cursor=cursor, 220 ) 221 222 for connector in response.data or []: 223 yield connector 224 225 cursor = response.cursor 226 227 if not cursor or not len(response.data or []) or not response.total: 228 break 229 230 @validate_call 231 def get_all_enterprise_teams( 232 self, 233 org_id: Annotated[StrictStr, Field(description="The id of the Organization.")], 234 limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, 235 name: Annotated[ 236 Optional[StrictStr], 237 Field( 238 description='Name query. Filters teams by name using case insensitive partial match. A value "dev" will return both "Developer\'s team" and "Team for developers".' 239 ), 240 ] = None, 241 ) -> Generator[Team, None, None]: 242 cursor = None 243 while True: 244 response = self.enterprise_get_teams( 245 org_id=org_id, 246 limit=limit, 247 cursor=cursor, 248 name=name, 249 ) 250 251 for team in response.data or []: 252 yield team 253 254 cursor = response.cursor 255 256 if not cursor or not len(response.data or []): 257 break 258 259 @validate_call 260 def get_all_organization_members( 261 self, 262 org_id: Annotated[StrictStr, Field(description="id of the organization")], 263 emails: Optional[StrictStr] = None, 264 role: Optional[StrictStr] = None, 265 license: Optional[StrictStr] = None, 266 active: Optional[StrictBool] = None, 267 limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, 268 ) -> Generator[OrganizationMember, None, None]: 269 cursor = None 270 while True: 271 response = self.enterprise_get_organization_members( 272 org_id=org_id, 273 limit=limit, 274 cursor=cursor, 275 emails=emails, 276 role=role, 277 license=license, 278 active=active, 279 ) 280 281 response_instance = response.actual_instance 282 283 if not response_instance: 284 return 285 286 if isinstance(response_instance, list): 287 for member in response_instance or []: 288 yield member 289 290 return 291 292 for member in response_instance.data or []: 293 yield member 294 295 cursor = response_instance.cursor 296 297 if not cursor or not len(response_instance.data or []): 298 break 299 300 @validate_call 301 def get_all_enterprise_team_members( 302 self, 303 org_id: Annotated[StrictStr, Field(description="The id of the Organization.")], 304 team_id: Annotated[StrictStr, Field(description="The id of the Team.")], 305 limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, 306 role: Annotated[ 307 Optional[StrictStr], 308 Field( 309 description=' Role query. Filters members by role using full word match. Accepted values are: * "member": Team member with full member permissions. * "admin": Admin of a team. Team member with permission to manage team. * "non_team": External user, non-team user. * "team_guest": Team-guest user, user with access only to a team without access to organization. ' 310 ), 311 ] = None, 312 ) -> Generator[TeamMember, None, None]: 313 cursor = None 314 while True: 315 response = self.enterprise_get_team_members( 316 org_id=org_id, 317 team_id=team_id, 318 limit=limit, 319 cursor=cursor, 320 role=role, 321 ) 322 323 for member in response.data or []: 324 yield member 325 326 cursor = response.cursor 327 328 if not cursor or not len(response.data or []): 329 break
NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech
Do not edit the class manually.
@validate_call
def
get_all_boards( self, team_id: Optional[Annotated[str, Strict(strict=True)]] = None, project_id: Optional[Annotated[str, Strict(strict=True)]] = None, query: Optional[Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[Strict(strict=True), MaxLen(max_length=500)])]] = None, owner: Optional[Annotated[str, Strict(strict=True)]] = None, limit: Optional[Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[Strict(strict=True)])]] = None, sort: Optional[Annotated[str, Strict(strict=True)]] = None) -> Generator[miro_api.models.board.Board, NoneType, NoneType]:
23 @validate_call 24 def get_all_boards( 25 self, 26 team_id: Optional[StrictStr] = None, 27 project_id: Optional[StrictStr] = None, 28 query: Optional[Annotated[str, Field(strict=True, max_length=500)]] = None, 29 owner: Optional[StrictStr] = None, 30 limit: Optional[Annotated[str, Field(strict=True)]] = None, 31 sort: Optional[StrictStr] = None, 32 ) -> Generator[Board, None, None]: 33 current_offset = 0 34 while True: 35 response = self.get_boards( 36 team_id=team_id, 37 project_id=project_id, 38 query=query, 39 owner=owner, 40 limit=limit, 41 offset=str(current_offset), 42 sort=sort, 43 ) 44 45 for board in response.data or []: 46 yield board 47 48 received_items_len = len(response.data or []) 49 if not self._has_more_data(response.offset, received_items_len, response.total): 50 break 51 52 current_offset += received_items_len
@validate_call
def
get_all_board_members( self, board_id: typing.Annotated[str, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, description='Unique identifier (ID) of the board to which the board member belongs.')], limit: Optional[Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[Strict(strict=True)])]] = None) -> Generator[miro_api.models.board_member.BoardMember, NoneType, NoneType]:
80 @validate_call 81 def get_all_board_members( 82 self, 83 board_id: Annotated[ 84 StrictStr, 85 Field(description="Unique identifier (ID) of the board to which the board member belongs."), 86 ], 87 limit: Optional[Annotated[str, Field(strict=True)]] = None, 88 ) -> Generator[BoardMember, None, None]: 89 current_offset = 0 90 while True: 91 response = self.get_board_members( 92 board_id=board_id, 93 limit=limit, 94 offset=str(current_offset), 95 ) 96 97 for member in response.data or []: 98 yield member 99 100 received_items_len = len(response.data or []) 101 if not self._has_more_data(response.offset, received_items_len, response.total): 102 break 103 104 current_offset += received_items_len
@validate_call
def
get_all_items( self, board_id: typing.Annotated[str, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, description='Unique identifier (ID) of the board for which you want to retrieve the list of available items.')], limit: Optional[Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[Strict(strict=True)])]] = None, type: Optional[Annotated[str, Strict(strict=True)]] = None) -> Generator[miro_api.models.generic_item.GenericItem, NoneType, NoneType]:
106 @validate_call 107 def get_all_items( 108 self, 109 board_id: Annotated[ 110 StrictStr, 111 Field( 112 description="Unique identifier (ID) of the board for which you want to retrieve the list of available items." 113 ), 114 ], 115 limit: Optional[Annotated[str, Field(strict=True)]] = None, 116 type: Optional[StrictStr] = None, 117 ) -> Generator[GenericItem, None, None]: 118 cursor = None 119 while True: 120 response = self.get_items( 121 board_id=board_id, 122 limit=limit, 123 cursor=cursor, 124 type=type, 125 ) 126 127 for item in response.data or []: 128 yield item 129 130 cursor = response.cursor 131 132 if not cursor or not len(response.data or []) or not response.total: 133 break
@validate_call
def
get_all_items_by_tag( self, board_id_platform_tags: typing.Annotated[str, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, description='Unique identifier (ID) of the board where you want to retrieve a specific tag.')], tag_id: typing.Annotated[str, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, description='Unique identifier (ID) of the tag that you want to retrieve.')], limit: Optional[Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[Strict(strict=True)])]] = None) -> Generator[miro_api.models.generic_item.GenericItem, NoneType, NoneType]:
135 @validate_call 136 def get_all_items_by_tag( 137 self, 138 board_id_platform_tags: Annotated[ 139 StrictStr, 140 Field(description="Unique identifier (ID) of the board where you want to retrieve a specific tag."), 141 ], 142 tag_id: Annotated[ 143 StrictStr, 144 Field(description="Unique identifier (ID) of the tag that you want to retrieve."), 145 ], 146 limit: Optional[Annotated[str, Field(strict=True)]] = None, 147 ) -> Generator[GenericItem, None, None]: 148 current_offset = 0 149 while True: 150 response = self.get_items_by_tag( 151 board_id_platform_tags=board_id_platform_tags, 152 tag_id=tag_id, 153 limit=limit, 154 offset=str(current_offset), 155 ) 156 157 for item in response.data or []: 158 yield item 159 160 received_items_len = len(response.data or []) 161 if not self._has_more_data(response.offset, received_items_len, response.total): 162 break 163 164 current_offset += received_items_len
@validate_call
def
get_all_items_within_frame( self, board_id: typing.Annotated[str, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, description='Unique identifier (ID) of the board that contains the frame for which you want to retrieve the list of available items.')], parent_item_id: typing.Annotated[str, FieldInfo(annotation=NoneType, required=True, description='ID of the frame for which you want to retrieve the list of available items.', metadata=[Strict(strict=True)])], limit: Optional[Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[Strict(strict=True)])]] = None, type: Optional[Annotated[str, Strict(strict=True)]] = None) -> Generator[miro_api.models.generic_item.GenericItem, NoneType, NoneType]:
166 @validate_call 167 def get_all_items_within_frame( 168 self, 169 board_id: Annotated[ 170 StrictStr, 171 Field( 172 description="Unique identifier (ID) of the board that contains the frame for which you want to retrieve the list of available items." 173 ), 174 ], 175 parent_item_id: Annotated[ 176 str, 177 Field( 178 strict=True, 179 description="ID of the frame for which you want to retrieve the list of available items.", 180 ), 181 ], 182 limit: Optional[Annotated[str, Field(strict=True)]] = None, 183 type: Optional[StrictStr] = None, 184 ) -> Generator[GenericItem, None, None]: 185 cursor = None 186 while True: 187 response = self.get_items_within_frame( 188 board_id_platform_containers=board_id, 189 parent_item_id=parent_item_id, 190 limit=limit, 191 type=type, 192 cursor=cursor, 193 ) 194 195 for item in response.data or []: 196 yield item 197 198 cursor = response.cursor 199 200 if not cursor or not len(response.data or []) or not response.total: 201 break
@validate_call
def
get_all_connectors( self, board_id: typing.Annotated[str, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, description='Unique identifier (ID) of the board from which you want to retrieve a list of connectors.')], limit: Optional[Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[Strict(strict=True)])]] = None) -> Generator[miro_api.models.connector_with_links.ConnectorWithLinks, NoneType, NoneType]:
203 @validate_call 204 def get_all_connectors( 205 self, 206 board_id: Annotated[ 207 StrictStr, 208 Field( 209 description="Unique identifier (ID) of the board from which you want to retrieve a list of connectors." 210 ), 211 ], 212 limit: Optional[Annotated[str, Field(strict=True)]] = None, 213 ) -> Generator[ConnectorWithLinks, None, None]: 214 cursor = None 215 while True: 216 response = self.get_connectors( 217 board_id=board_id, 218 limit=limit, 219 cursor=cursor, 220 ) 221 222 for connector in response.data or []: 223 yield connector 224 225 cursor = response.cursor 226 227 if not cursor or not len(response.data or []) or not response.total: 228 break
@validate_call
def
get_all_enterprise_teams( self, org_id: typing.Annotated[str, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, description='The id of the Organization.')], limit: Optional[Annotated[int, FieldInfo(annotation=NoneType, required=True, metadata=[Strict(strict=True), Ge(ge=1), Le(le=100)])]] = None, name: Annotated[Optional[Annotated[str, Strict(strict=True)]], FieldInfo(annotation=NoneType, required=True, description='Name query. Filters teams by name using case insensitive partial match. A value "dev" will return both "Developer\'s team" and "Team for developers".')] = None) -> Generator[miro_api.models.team.Team, NoneType, NoneType]:
230 @validate_call 231 def get_all_enterprise_teams( 232 self, 233 org_id: Annotated[StrictStr, Field(description="The id of the Organization.")], 234 limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, 235 name: Annotated[ 236 Optional[StrictStr], 237 Field( 238 description='Name query. Filters teams by name using case insensitive partial match. A value "dev" will return both "Developer\'s team" and "Team for developers".' 239 ), 240 ] = None, 241 ) -> Generator[Team, None, None]: 242 cursor = None 243 while True: 244 response = self.enterprise_get_teams( 245 org_id=org_id, 246 limit=limit, 247 cursor=cursor, 248 name=name, 249 ) 250 251 for team in response.data or []: 252 yield team 253 254 cursor = response.cursor 255 256 if not cursor or not len(response.data or []): 257 break
@validate_call
def
get_all_organization_members( self, org_id: typing.Annotated[str, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, description='id of the organization')], emails: Optional[Annotated[str, Strict(strict=True)]] = None, role: Optional[Annotated[str, Strict(strict=True)]] = None, license: Optional[Annotated[str, Strict(strict=True)]] = None, active: Optional[Annotated[bool, Strict(strict=True)]] = None, limit: Optional[Annotated[int, FieldInfo(annotation=NoneType, required=True, metadata=[Strict(strict=True), Ge(ge=1), Le(le=100)])]] = None) -> Generator[miro_api.models.organization_member.OrganizationMember, NoneType, NoneType]:
259 @validate_call 260 def get_all_organization_members( 261 self, 262 org_id: Annotated[StrictStr, Field(description="id of the organization")], 263 emails: Optional[StrictStr] = None, 264 role: Optional[StrictStr] = None, 265 license: Optional[StrictStr] = None, 266 active: Optional[StrictBool] = None, 267 limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, 268 ) -> Generator[OrganizationMember, None, None]: 269 cursor = None 270 while True: 271 response = self.enterprise_get_organization_members( 272 org_id=org_id, 273 limit=limit, 274 cursor=cursor, 275 emails=emails, 276 role=role, 277 license=license, 278 active=active, 279 ) 280 281 response_instance = response.actual_instance 282 283 if not response_instance: 284 return 285 286 if isinstance(response_instance, list): 287 for member in response_instance or []: 288 yield member 289 290 return 291 292 for member in response_instance.data or []: 293 yield member 294 295 cursor = response_instance.cursor 296 297 if not cursor or not len(response_instance.data or []): 298 break
@validate_call
def
get_all_enterprise_team_members( self, org_id: typing.Annotated[str, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, description='The id of the Organization.')], team_id: typing.Annotated[str, Strict(strict=True), FieldInfo(annotation=NoneType, required=True, description='The id of the Team.')], limit: Optional[Annotated[int, FieldInfo(annotation=NoneType, required=True, metadata=[Strict(strict=True), Ge(ge=1), Le(le=100)])]] = None, role: Annotated[Optional[Annotated[str, Strict(strict=True)]], FieldInfo(annotation=NoneType, required=True, description=' Role query. Filters members by role using full word match. Accepted values are: * "member": Team member with full member permissions. * "admin": Admin of a team. Team member with permission to manage team. * "non_team": External user, non-team user. * "team_guest": Team-guest user, user with access only to a team without access to organization. ')] = None) -> Generator[miro_api.models.team_member.TeamMember, NoneType, NoneType]:
300 @validate_call 301 def get_all_enterprise_team_members( 302 self, 303 org_id: Annotated[StrictStr, Field(description="The id of the Organization.")], 304 team_id: Annotated[StrictStr, Field(description="The id of the Team.")], 305 limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, 306 role: Annotated[ 307 Optional[StrictStr], 308 Field( 309 description=' Role query. Filters members by role using full word match. Accepted values are: * "member": Team member with full member permissions. * "admin": Admin of a team. Team member with permission to manage team. * "non_team": External user, non-team user. * "team_guest": Team-guest user, user with access only to a team without access to organization. ' 310 ), 311 ] = None, 312 ) -> Generator[TeamMember, None, None]: 313 cursor = None 314 while True: 315 response = self.enterprise_get_team_members( 316 org_id=org_id, 317 team_id=team_id, 318 limit=limit, 319 cursor=cursor, 320 role=role, 321 ) 322 323 for member in response.data or []: 324 yield member 325 326 cursor = response.cursor 327 328 if not cursor or not len(response.data or []): 329 break
Inherited Members
- miro_api.api.MiroApiEndpoints
- MiroApiEndpoints
- api_client
- get_metrics
- get_metrics_total
- enterprise_get_audit_logs
- enterprise_board_content_item_logs_fetch
- enterprise_board_export_job_results
- enterprise_board_export_job_status
- enterprise_create_board_export
- enterprise_dataclassification_board_get
- enterprise_dataclassification_board_set
- enterprise_dataclassification_organization_settings_get
- enterprise_dataclassification_team_boards_bulk
- enterprise_dataclassification_team_settings_get
- enterprise_dataclassification_team_settings_set
- create_items
- create_items_in_bulk_using_file_from_device
- create_shape_item_flowchart
- delete_shape_item_flowchart
- get_items_experimental
- get_shape_item_flowchart
- get_specific_item_experimental
- update_shape_item_flowchart
- get_all_cases
- get_all_legal_holds
- get_case
- get_legal_hold
- get_legal_hold_content_items
- create_mindmap_nodes_experimental
- delete_mindmap_node_experimental
- get_mindmap_node_experimental
- get_mindmap_nodes_experimental
- revoke_token_v2
- enterprise_get_organization_member
- enterprise_get_organization_members
- enterprise_get_organization
- enterprise_add_project_member
- enterprise_delete_project_member
- enterprise_get_project_member
- enterprise_get_project_members
- enterprise_update_project_member
- enterprise_get_project_settings
- enterprise_update_project_settings
- enterprise_create_project
- enterprise_delete_project
- enterprise_get_project
- enterprise_get_projects
- enterprise_update_project
- enterprise_post_user_sessions_reset
- enterprise_delete_team_member
- enterprise_get_team_member
- enterprise_get_team_members
- enterprise_invite_team_member
- enterprise_update_team_member
- enterprise_get_default_team_settings
- enterprise_get_team_settings
- enterprise_update_team_settings
- enterprise_create_team
- enterprise_delete_team
- enterprise_get_team
- enterprise_get_teams
- enterprise_update_team
- create_board_subscription
- delete_subscription_by_id
- get_subscription_by_id
- get_user_subscriptions
- update_board_subscription
- create_app_card_item
- delete_app_card_item
- get_app_card_item
- update_app_card_item
- get_board_members
- get_specific_board_member
- remove_board_member
- update_board_member
- copy_board
- create_board
- delete_board
- get_boards
- get_specific_board
- update_board
- create_card_item
- delete_card_item
- get_card_item
- update_card_item
- create_connector
- delete_connector
- get_connector
- get_connectors
- update_connector
- create_document_item_using_file_from_device
- create_document_item_using_url
- delete_document_item
- get_document_item
- update_document_item_using_file_from_device
- update_document_item_using_url
- create_embed_item
- delete_embed_item
- get_embed_item
- update_embed_item
- create_frame_item
- delete_frame_item
- get_frame_item
- update_frame_item
- create_group
- delete_group
- get_all_groups
- get_group_by_id
- get_items_by_group_id
- un_group
- update_group
- create_image_item_using_local_file
- create_image_item_using_url
- delete_image_item
- get_image_item
- update_image_item_using_file_from_device
- update_image_item_using_url
- delete_item
- delete_item_experimental
- get_items
- get_items_within_frame
- get_specific_item
- update_item_position_or_parent
- create_shape_item
- delete_shape_item
- get_shape_item
- update_shape_item
- create_sticky_note_item
- delete_sticky_note_item
- get_sticky_note_item
- update_sticky_note_item
- attach_tag_to_item
- create_tag
- delete_tag
- get_items_by_tag
- get_tag
- remove_tag_from_item
- update_tag
- create_text_item
- delete_text_item
- get_text_item
- update_text_item
- revoke_token
- token_info