-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Documentation updates. * Fix broken classifier. * Set license in pyproject.toml for better pypi * Handle 400 exception * Better usage example * Fix broken project links * Add federated share link
- Loading branch information
1 parent
162a684
commit c145046
Showing
4 changed files
with
64 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,58 @@ | ||
## Nextcloud Asynchronous Client | ||
###### | ||
# nextcloud-async | ||
## Asynchronous Nextcloud Client | ||
|
||
This project is not endorsed or recognized in any way by the NextCloud | ||
project. | ||
This module provides an asyncio-friendly interface to public NextCloud APIs. | ||
|
||
### Covered APIs | ||
* File Management API | ||
* User Management API | ||
* Group Management API | ||
* App Management API | ||
* LDAP Configuration API | ||
* Status API | ||
* Share API (except Federated shares) | ||
* Talk/spreed API | ||
* Notifications API | ||
* Login Flow v2 API | ||
* Remote Wipe API | ||
* Maps API | ||
|
||
### APIs To Do | ||
* Sharee API | ||
* Reaction API | ||
* User Preferences API | ||
* Federated Shares API | ||
* Cookbook API | ||
* Passwords API | ||
* Notes API | ||
* Deck API | ||
|
||
If you know of any APIs missing from this list, please open an issue at | ||
https://github.com/aaronsegura/nextcloud-async/issues with a link to | ||
the API documentation so it can be added. This project aims to eventually | ||
cover any API provided by NextCloud and commonly used NextCloud apps. | ||
|
||
### Example Usage | ||
import httpx | ||
import asyncio | ||
from nextcloud_async import NextCloudAsync | ||
|
||
nca = NextCloudAsync( | ||
client=httpx.AsyncClient(), | ||
endpoint='http://localhost:8181', | ||
user='user', | ||
password='password') | ||
|
||
async def main(): | ||
users = await nca.get_users() | ||
tasks = [nca.get_user(user) for user in users] | ||
results = await asyncio.gather(*tasks) | ||
for user_info in results: | ||
print(user_info) | ||
|
||
if __name__ == "__main__": | ||
asyncio.run(main()) | ||
|
||
---- | ||
### Example usage: | ||
|
||
> from nextcloud_async import NextCloudAsync | ||
> import httpx, asyncio | ||
|
||
> u = 'user' | ||
> p = 'password' | ||
> e = 'https://cloud.example.com' | ||
> c = httpx.AsyncClient() | ||
> nca = NextCloudAsync(client=c, user=u, password=p, endpoint=e) | ||
> users = asyncio.run(nca.get_users()) | ||
> print(users) | ||
['admin', 'slippinjimmy', 'chunks', 'flipper', 'squishface'] | ||
---- | ||
This project is not endorsed or recognized in any way by the NextCloud | ||
project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters