(self, attributes: dict[str, Any])
| 199 | headers, data = self._requester.requestJsonAndCheck("POST", f"{self.url}/pings") |
| 200 | |
| 201 | def _useAttributes(self, attributes: dict[str, Any]) -> None: |
| 202 | if "active" in attributes: # pragma no branch |
| 203 | self._active = self._makeBoolAttribute(attributes["active"]) |
| 204 | if "config" in attributes: # pragma no branch |
| 205 | self._config = self._makeDictAttribute(attributes["config"]) |
| 206 | if "created_at" in attributes: # pragma no branch |
| 207 | self._created_at = self._makeDatetimeAttribute(attributes["created_at"]) |
| 208 | if "deliveries_url" in attributes: # pragma no branch |
| 209 | self._deliveries_url = self._makeStringAttribute(attributes["deliveries_url"]) |
| 210 | if "events" in attributes: # pragma no branch |
| 211 | self._events = self._makeListOfStringsAttribute(attributes["events"]) |
| 212 | if "id" in attributes: # pragma no branch |
| 213 | self._id = self._makeIntAttribute(attributes["id"]) |
| 214 | elif "url" in attributes and attributes["url"]: |
| 215 | id = attributes["url"].split("/")[-1] |
| 216 | if id.isnumeric(): |
| 217 | self._id = self._makeIntAttribute(int(id)) |
| 218 | if "last_response" in attributes: # pragma no branch |
| 219 | self._last_response = self._makeClassAttribute( |
| 220 | github.HookResponse.HookResponse, attributes["last_response"] |
| 221 | ) |
| 222 | if "name" in attributes: # pragma no branch |
| 223 | self._name = self._makeStringAttribute(attributes["name"]) |
| 224 | if "ping_url" in attributes: # pragma no branch |
| 225 | self._ping_url = self._makeStringAttribute(attributes["ping_url"]) |
| 226 | if "test_url" in attributes: # pragma no branch |
| 227 | self._test_url = self._makeStringAttribute(attributes["test_url"]) |
| 228 | if "type" in attributes: # pragma no branch |
| 229 | self._type = self._makeStringAttribute(attributes["type"]) |
| 230 | if "updated_at" in attributes: # pragma no branch |
| 231 | self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"]) |
| 232 | if "url" in attributes: # pragma no branch |
| 233 | self._url = self._makeStringAttribute(attributes["url"]) |
no test coverage detected