:calls: `POST /projects/columns/{column_id}/cards `_
(
self,
note: Opt[str] = NotSet,
content_id: Opt[int] = NotSet,
content_type: Opt[str] = NotSet,
)
| 138 | ) |
| 139 | |
| 140 | def create_card( |
| 141 | self, |
| 142 | note: Opt[str] = NotSet, |
| 143 | content_id: Opt[int] = NotSet, |
| 144 | content_type: Opt[str] = NotSet, |
| 145 | ) -> github.ProjectCard.ProjectCard: |
| 146 | """ |
| 147 | :calls: `POST /projects/columns/{column_id}/cards <https://docs.github.com/en/rest/reference/projects#create-a-project-card>`_ |
| 148 | """ |
| 149 | if isinstance(note, str): |
| 150 | assert content_id is NotSet, content_id |
| 151 | assert content_type is NotSet, content_type |
| 152 | post_parameters: dict[str, Any] = {"note": note} |
| 153 | else: |
| 154 | assert note is NotSet, note |
| 155 | assert isinstance(content_id, int), content_id |
| 156 | assert isinstance(content_type, str), content_type |
| 157 | post_parameters = {"content_id": content_id, "content_type": content_type} |
| 158 | |
| 159 | import_header = {"Accept": Consts.mediaTypeProjectsPreview} |
| 160 | headers, data = self._requester.requestJsonAndCheck( |
| 161 | "POST", f"{self.url}/cards", headers=import_header, input=post_parameters |
| 162 | ) |
| 163 | return github.ProjectCard.ProjectCard(self._requester, headers, data) |
| 164 | |
| 165 | def move(self, position: str) -> bool: |
| 166 | """ |
no test coverage detected