cloudflare / cloudflare/cloudflare-python

client.rules.lists.items.delete - unexpected keyword argument 'items'

Đang mở
#2,681 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
506
Fork
148
Merge trung bình
3 giờ 15 phút
Pull request đã merge (30 ngày)
1

Mô tả

### Confirm this is a Python library issue and not an underlying Cloudflare API issue.

- [x] This is an issue with the Python library

### Describe the bug

Calling the client.rules.lists.items.delete endpoint reutrns an "unexpected keyword argument 'items'" error. There is no way to pass a list of items to delete.

### To Reproduce

1. Call
```
client = Cloudflare(
api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),
)
item = client.rules.lists.items.delete(
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
items=[{"id": "1234567890"}]
)
```
2. Return is `TypeError: ItemsResource.delete() got an unexpected keyword argument 'items'`
3. Try
```
client = Cloudflare(
api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),
)
item = client.rules.lists.items.delete(
list_id="2c0fc9fa937b11eaa1b71c4d701ab86e",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
extra_body=json.dumps({"items":[{"id": "1234567890"}]})
)
```
4. Return is `cloudflare.BadRequestError: Error code: 400 - {'result': None, 'success': False, 'errors': [{'code': 10026, 'message': 'filters.api.invalid_json'}], 'messages': []}`

### Code snippets

```Python

```

### OS

Ubuntu

### Python version

3.12.3

### Library version

4.3.1

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.