Skip to content

Commit 0eb0fe1

Browse files
committed
Pydantic: update README.md
1 parent 8c6d56b commit 0eb0fe1

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,26 @@ from JSON dataset.
3939
* [Contributing](#contributing)
4040
* [License](#license)
4141

42-
## Example
42+
## Examples
43+
44+
### Part of Path of Exile public items API
45+
46+
```python
47+
from pydantic import BaseModel, Field
48+
from typing import List, Optional
49+
from typing_extensions import Literal
50+
51+
52+
class Tab(BaseModel):
53+
id_: str = Field(..., alias="id")
54+
public: bool
55+
stash_type: Literal["CurrencyStash", "NormalStash", "PremiumStash"] = Field(..., alias="stashType")
56+
items: List['Item']
57+
account_name: Optional[str] = Field(None, alias="accountName")
58+
last_character_name: Optional[str] = Field(None, alias="lastCharacterName")
59+
stash: Optional[str] = None
60+
league: Optional[Literal["Hardcore", "Standard"]] = None
61+
```
4362

4463
### F1 Season Results
4564

0 commit comments

Comments
 (0)