Skip to content

Commit

Permalink
fix: renamed ReadwiseClient to Readwise
Browse files Browse the repository at this point in the history
  • Loading branch information
rwxd committed Mar 6, 2023
1 parent 6c97472 commit 6d88252
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ pip install -U readwise
### Readwise API

```python
from readwise import ReadwiseClient
from readwise import Readwise

client = ReadwiseClient('token')
client = Readwise('token')

books = client.get_books(category='articles')

Expand All @@ -32,9 +32,9 @@ for book in books:
### Readwise Readwise API

```python
from readwise import ReadwiseReaderClient
from readwise import ReadwiseReader

client = ReadwiseReaderClient('token')
client = ReadwiseReader('token')

response = client.create_document('https://www.example.com')
response.raise_for_status()
Expand Down
6 changes: 3 additions & 3 deletions readwise/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from readwise.api import ReadwiseClient, ReadwiseReaderClient
from readwise.api import Readwise, ReadwiseReader

__all__ = [
'ReadwiseClient',
'ReadwiseReaderClient',
'Readwise',
'ReadwiseReader',
]
10 changes: 5 additions & 5 deletions readwise/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ class ReadwiseRateLimitException(Exception):
pass


class ReadwiseClient:
class Readwise:
def __init__(
self,
token: str,
):
'''
Initialize a ReadwiseClient.
Initialize a Readwise API client.
Documentation for the Readwise API can be found here:
https://readwise.io/api_deets
Expand Down Expand Up @@ -323,13 +323,13 @@ def delete_tag(self, book_id: str, tag_id: str):
self.delete(f'/books/{book_id}/tags/{tag_id}')


class ReadwiseReaderClient:
class ReadwiseReader:
def __init__(
self,
token: str,
):
'''
Readwise Reader Connector.
Readwise Reader API client.
Documentation for the Readwise Reader API can be found here:
https://readwise.io/reader_api
Expand Down Expand Up @@ -387,7 +387,7 @@ def _request(

def get(self, endpoint: str, params: dict = {}) -> requests.Response:
'''
Make a GET request to the Readwise Reader API.
Make a GET request to the Readwise Reader API client.
Args:
endpoint: API endpoints
Expand Down

0 comments on commit 6d88252

Please sign in to comment.