From ebe6769c86f56034665cdc243d1873314d19bd9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20N=C3=B8rgaard?= Date: Fri, 10 May 2024 19:51:27 +0100 Subject: [PATCH] update readme --- README.md | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 44b72e1..9059546 100755 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@
-A small simple wrapper around the [Mystb.in](https://mystb.in/) API. API docs can be found [here](https://api.mystb.in/docs). +A small simple wrapper around the [Mystb.in](https://mystb.in/) API. API docs can be found [here](https://mystb.in/api/documentation). Documentation for this wrapper can be found [here](https://mystbinpy.readthedocs.io/en/stable/). If you want the docs for the `main` branch, those can be found [here](https://mystbinpy.readthedocs.io/en/latest/). @@ -21,12 +21,8 @@ If you want the docs for the `main` branch, those can be found [here](https://my ### Features - [x] - Creating pastes. - - [ ] Supporting attachments. -- [ ] - Editing pastes. - - Pending design work. - [x] - Deleting pastes. - [x] - Getting pastes. -- [ ] - User endpoints. - [ ] - Sync client. - This one will take some time as I have no motivation to do it, but PRs are welcome if others want to do it. @@ -51,8 +47,10 @@ import mystbin client = mystbin.Client() -paste = await client.create_paste(filename="Hello.txt", content="Hello there!") -# we also support passing a mystbin.File directly to the `file=` kwarg! +file = mystbin.File(filename="File1.txt", content="Hello there!") +file2 = mystbin.File(filename="test.py", content="print('hello!')") + +paste = await client.create_paste(files=[file, file2]) str(paste) >>> 'https://mystb.in/' @@ -65,22 +63,6 @@ get_paste.created_at >>> datetime.datetime(2020, 10, 6, 10, 53, 57, 556741) ``` -Or if you want to create a paste with multiple files... -```py -import mystbin - -file = mystbin.File(filename="File1.txt", content="Hello there!") -file2 = mystbin.File(filename="test.py", content="print('hello!')") - -paste = await client.create_paste(files=[file, file2]) - -for file in paste.files: - print(file.content) - ->>> "Hello there!" ->>> "print('hello!')" -``` - If you have any question please feel free to join the Pythonista Discord server: