Skip to content

Commit

Permalink
Add deprecation caution to docs 📖
Browse files Browse the repository at this point in the history
  • Loading branch information
somespecialone committed Sep 30, 2024
1 parent 2a9af23 commit 1da9faa
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 14 deletions.
33 changes: 21 additions & 12 deletions docs/client.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
!!! danger "Deprecated documentation"
This and next parts of the documentation are not completed yet and contains information for old version.
Be careful!


### Init & login

To prevent additional requests to `steam` when logging in we can pass all known data to init method.

[//]: # (TODO identity_secret is optinal now)
[//]: # (TODO write anywhere about App and AppContext)

```python
from aiosteampy import SteamClient, Currency

Expand All @@ -21,26 +29,25 @@ client = SteamClient(
await client.login()
```

???+ note "Api key registration"
If steam account does obtain `api key`, it will be automatically registered on
`https://github.com/somespecialone/aiosteampy` during data initialization.
!!! note "`Steam Web Api Key` registration"
Obtaining `api key` will be automatically registered on
`https://github.com/somespecialone/aiosteampy` domain during data initialization.
It is highly recommended to register `api key` on _domain of your choice_.

??? info "`client.login` args and data fetching"
You can bypass this if pass `init_data=False`. But keep in mind - methods which requires missed data will throw errors.

Addition to args above, there is:

* `lang` - language of requests data. Do not recommend to change this until you know what you're doing.
* `tz_offset` - just time zone offset that will be set to cookie.
* `tz_offset` - string of time zone offset that will be set as cookie value.
* `session` - [aiohttp.ClientSession](https://docs.aiohttp.org/en/stable/client_advanced.html#client-session).


!!! warning "Session"
If you create `session` by yourself - `raise_for_status` must be `True`,
`ClientSession(..., raise_for_status=True)`. If not, errors will be not handled right and this will cause strange
behavior.


### Public methods client

Have methods that doesn't require authentication.
Expand All @@ -51,11 +58,11 @@ from aiosteampy import SteamPublicClient

client = SteamPublicClient()

histogram = await client.fetch_item_orders_histogram(12345687)
histogram = await client.get_item_orders_histogram(12345687)
...
```

### Proxies
### Proxies 🌐

Read more about proxy support on the [dedicated page](./proxies.md)

Expand All @@ -64,18 +71,20 @@ Read more about proxy support on the [dedicated page](./proxies.md)
In case you need to use multiple inheritance and `__slots__`, you can subclass `SteamCommunityMixin`:

```python
from aiosteampy.client import SteamCommunityMixin, SteamClient
from aiosteampy.client import SteamClientBase, SteamClient


class MyClient(SteamCommunityMixin, ...):
class MyClient(SteamClientBase, ...):
__slots__ = (
*SteamClient.__slots__,
"attr",
"attr1", # your slots
)

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

...
```

[//]: # (TODO inheritance, mixins)
2 changes: 1 addition & 1 deletion docs/proxies.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ client = SteamClient(..., proxy="http://my-proxy.com")

### Session and proxy

!!! note "Keep in mind"
!!! danger "Bind your session to a proxy"
`session` and `proxy` arguments are mutually exclusive. If you want to pass a `session` created by yourself,
you are responsible for binding `session` to `proxy`

Expand Down
2 changes: 1 addition & 1 deletion docs/scraping.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ We all have a one, but a big and tasty, pie 🥧, called `SteamMarket`. We all w
that's why we're here.
So the general idea is:

!!! warning ""
!!! danger ""
Consume Steam resources **responsibly**.
Bear in mind, we all benefit if `Steam` spends fewer resources fighting aggressive market scraping

Expand Down

0 comments on commit 1da9faa

Please sign in to comment.