Skip to content

Commit fd3445f

Browse files
committed
Update example usage
1 parent 742d31e commit fd3445f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from pdap_access_manager.models.auth import AuthInfo
2+
13
# Access-Manager
24

35
This is a small package that makes it easy to access the PDAP API.
@@ -10,12 +12,17 @@ It is utilized in several other PDAP repositories
1012
Utilizes an `aiohttp` client session, which can either be passed into the constructor, or automatically generated when using the AccessManager as a context manager.
1113

1214
```python
13-
from pdap_access_manager import AccessManager
15+
from pdap_access_manager.access_manager.async_ import AccessManagerAsync
1416
from pdap_access_manager.models.request import RequestInfo
17+
from pdap_access_manager.models.auth import AuthInfo
1518
from pdap_access_manager.enums import DataSourcesNamespaces, RequestType
1619

1720
async def main():
18-
async with AccessManager("email", "password") as am:
21+
auth_info = AuthInfo(
22+
email="email",
23+
password="password"
24+
)
25+
async with AccessManagerAsync(auth_info) as am:
1926
url = am.build_url(
2027
namespace=DataSourcesNamespaces.SEARCH,
2128
subdomains=['follow'],

0 commit comments

Comments
 (0)