Skip to content

Commit 3ae92e8

Browse files
committed
Updated Readme
1 parent 7542055 commit 3ae92e8

File tree

1 file changed

+211
-25
lines changed

1 file changed

+211
-25
lines changed

README.md

Lines changed: 211 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,225 @@
1-
<!--
2-
This README describes the package. If you publish this package to pub.dev,
3-
this README's contents appear on the landing page for your package.
1+
# discord_api
2+
_____
43

5-
For information about how to write a good package README, see the guide for
6-
[writing package pages](https://dart.dev/guides/libraries/writing-package-pages).
4+
[![Dart](https://github.com/MeixDev/discord_api_flutter/actions/workflows/dart.yml/badge.svg)](https://github.com/MeixDev/discord_api_flutter/actions/workflows/dart.yml)
5+
[![Pub](https://img.shields.io/pub/v/discord_api?color=blue&logo=dart)](https://pub.dev/packages/discord_api)
6+
[![style: lint](https://img.shields.io/badge/style-lint-4BC0F5.svg)](https://pub.dev/packages/lint)
77

8-
For general information about developing packages, see the Dart guide for
9-
[creating packages](https://dart.dev/guides/libraries/create-library-packages)
10-
and the Flutter guide for
11-
[developing packages and plugins](https://flutter.dev/developing-packages).
12-
-->
8+
A wrapper in pure Dart to connect to Discord using OAuth2.
139

14-
TODO: Put a short description of the package here that helps potential users
15-
know whether this package might be useful for them.
10+
All the endpoints and objects are implemented as defined in the [Discord API Reference](https://discord.com/developers/docs/reference)
1611

17-
## Features
12+
## Getting Started
1813

19-
TODO: List what your package can do. Maybe include images, gifs, or videos.
14+
_____
2015

21-
## Getting started
16+
**NOTE: This package is still in its early stage. While all models are supposedly implemented, they're not fully tested and all endpoints aren't implemented. Please do not hesitate to open a merge request if you added support for a specific endpoint !**
2217

23-
TODO: List prerequisites and provide or point to information on how to
24-
start using the package.
18+
**This release isn't fully tested yet. Future releases will only happen once the currently available endpoints are fully-tested. Feel free to [open an issue](https://github.com/TesteurManiak/discord_api_flutter/issues) to make suggestions regarding which endpoints should be added in priority, depending on your needs.**
2519

26-
## Usage
20+
To use this package, you will need to register an application on the [Discord developer console](https://discord.com/developers/applications) to get a client ID and a client Secret.
2721

28-
TODO: Include short and useful examples for package users. Add longer examples
29-
to `/example` folder.
22+
After registering your application, you will need to instantiate the `DiscordClient` class from the package, with your `clientId`, `clientSecret` and your `redirectUri`.
23+
24+
You will also need to pass a `DiscordHttpClient` to it. You can either implement your own, or use the provided `DiscordDioProvider`. (Do note that this class will later be moved to its own package in order to remove the `dio` dependency on this package)
3025

3126
```dart
32-
const like = 'sample';
27+
final _discordClient = DiscordClient(
28+
clientId: clientId,
29+
clientSecret: clientSecret,
30+
redirectUri: redirectUri,
31+
discordHttpClient:
32+
DiscordDioProvider(clientId: clientId, clientSecret: clientSecret),
33+
);
3334
```
3435

35-
## Additional information
36+
Now that you initialized the client, the last step before using the endpoints wrappers will be to manage the first connection with your Discord application, and initialize the Tokens you'll receive. You can find a complete example of this in the [example](https://github.com/MeixDev/discord_api_flutter/blob/main/example/lib/main.dart), using the package [flutter_webview_plugin](https://pub.dev/packages/flutter_webview_plugin). You can also use url_launcher with deep linking, use an external window in web as described in [this article](https://itnext.io/flutter-web-oauth-authentication-through-external-window-d890a7ff6463) by my friend [TesteurManiak](https://github.com/TesteurManiak), or any other method that you fancy depending on your targeted systems.
37+
38+
## Supported Endpoints
39+
40+
**Note**: While theorically functional (and proven to be in human tests for most), those endpoints haven't yet been unitary tested.
41+
_____
42+
43+
### User
44+
45+
[x] Get Current User
46+
[x] Get User
47+
[x] Modify Current User
48+
[x] Get Current User Guilds
49+
[x] Get Current User Guild Member
50+
[x] Leave Guild
51+
[x] Create DM
52+
[ ] Create Group DM
53+
[x] Get Current User Connections
54+
55+
### Guild
56+
57+
[x] Get Guild
58+
[x] Get Guild Preview
59+
[ ] Modify Guild
60+
[ ] Delete Guild
61+
[ ] Create Guild Channel
62+
[ ] Modify Guild Channel Positions
63+
[ ] List Active Threads
64+
[ ] Get Guild Member
65+
[ ] List Guild Members
66+
[ ] Search Guild Members
67+
[ ] Add Guild Member
68+
[ ] List Guild Members
69+
[ ] Search Guild Members
70+
[ ] Add Guild Member
71+
[ ] Modify Guild Member
72+
[ ] Modify Current Member
73+
[ ] Modify Current User Nick
74+
[ ] Add Guild Member Role
75+
[ ] Remove Guild Member Role
76+
[ ] Remove Guild Member
77+
[ ] Get Guild Bans
78+
[ ] Get Guild Ban
79+
[ ] Create Guild Ban
80+
[ ] Remove Guild Ban
81+
[ ] Get Guild Roles
82+
[ ] Create Guild Role
83+
[ ] Modify Guild Role Positions
84+
[ ] Modify Guild Role
85+
[ ] Delete Guild Role
86+
[ ] Get Guild Prune Count
87+
[ ] Begin Guild Prune
88+
[ ] Get Guild Voice Regions
89+
[ ] Get Guild Invites
90+
[ ] Get Guild Integrations
91+
[ ] Delete Guild Integration
92+
[ ] Get Guild Widget Settings
93+
[ ] Modify Guild Widget
94+
[ ] Get Guild Widget
95+
[ ] Get Guild Vanity URL
96+
[ ] Get Guild Widget Image
97+
[ ] Get Guild Welcome Screen
98+
[ ] Modify Guild Welcome Screen
99+
[ ] Modify Current User Voice State
100+
[ ] Modify User Voice State
101+
102+
### Emoji
103+
104+
[ ] List Guild Emojis
105+
[ ] Get Guild Emoji
106+
[ ] Create Guild Emoji
107+
[ ] Modify Guild Emoji
108+
[ ] Delete Guild Emoji
109+
110+
### Channel
111+
112+
[ ] Get Channel
113+
[ ] Modify Channel
114+
[ ] Delete/Close Channel
115+
[ ] Get Channel Messages
116+
[ ] Get Channel Message
117+
[ ] Create Message
118+
[ ] Crosspost Message
119+
[ ] Create Reaction
120+
[ ] Delete Own Reaction
121+
[ ] Delete User Reaction
122+
[ ] Get Reactions
123+
[ ] Delete All Reactions
124+
[ ] Delete All Reactions for Emoji
125+
[ ] Edit Message
126+
[ ] Delete Message
127+
[ ] Bulk Delete Messages
128+
[ ] Edit Channel Permissions
129+
[ ] Get Channel Invites
130+
[ ] Create Channel Invite
131+
[ ] Delete Channel Permission
132+
[ ] Follow News Channel
133+
[ ] Trigger Typing Indicator
134+
[ ] Get Pinned Messages
135+
[ ] Pin Message
136+
[ ] Unpin Message
137+
[ ] Group DM Add Recipient
138+
[ ] Group DM Remove Recipient
139+
[ ] Start Thread with Message
140+
[ ] Start Thread without Message
141+
[ ] Join Thread
142+
[ ] Add Thread Member
143+
[ ] Leave Thread
144+
[ ] Remove Thread Member
145+
[ ] Get Thread Member
146+
[ ] List Thread Members
147+
[ ] List Active Threads
148+
[ ] List Public Archived Threads
149+
[ ] List Private Archived Threads
150+
[ ] List Joined Private Archive Threads
151+
152+
### Audit Logs
153+
154+
[ ] Get Guild Audit Log
155+
156+
### Guild Scheduled Event
157+
158+
[ ] List Scheduled Events for Guild
159+
[ ] Create Guild Scheduled Event
160+
[ ] Get Guild Scheduled Event
161+
[ ] Modify Guild Scheduled Event
162+
[ ] Delete Guild Scheduled Event
163+
[ ] Get Guild Scheduled Event Users
164+
[ ] Guild Scheduled Event Status Update Automation
165+
[ ] Guild Scheduled Event Permissions Requirements
166+
167+
### Guild Template
168+
169+
[ ] Get Guild Template
170+
[ ] Create Guild from Guild Template
171+
[ ] Get Guild Templates
172+
[ ] Create Guild Template
173+
[ ] Sync Guild Template
174+
[ ] Modify Guild Template
175+
[ ] Delete Guild Template
176+
177+
### Invite
178+
179+
[ ] Get Invite
180+
[ ] Delete Invite
181+
182+
### Stage Instance
183+
184+
[ ] Create Stage Instance
185+
[ ] Get Stage Instance
186+
[ ] Modify Stage Instance
187+
[ ] Delete Stage Instance
188+
189+
### Sticker
190+
191+
[ ] Get Sticker
192+
[ ] List Nitro Sticker Packs
193+
[ ] List Guild Stickers
194+
[ ] Get Guild Sticker
195+
[ ] Create Guild Sticker
196+
[ ] Modify Guild Sticker
197+
[ ] Delete Guild Sticker
198+
199+
### Voice
200+
201+
[ ] List Voice Regions
202+
203+
### Webhook
204+
205+
[ ] Create Webhook
206+
[ ] Get Channel Webhooks
207+
[ ] Get Guild Webhooks
208+
[ ] Get Webhook
209+
[ ] Get Webhook with Token
210+
[ ] Modify Webhook
211+
[ ] Modify Webhook with Token
212+
[ ] Delete Webhook
213+
[ ] Delete Webhook with Token
214+
[ ] Execute Webhook
215+
[ ] Execute Slack-Compatible Webhook
216+
[ ] Execute GitHub-Compatible Webhook
217+
[ ] Get Webhook Message
218+
[ ] Edit Webhook Message
219+
[ ] Delete Webhook Message
220+
221+
### OAuth2
222+
223+
[ ] Get Current Bot Application Information
224+
[ ] Get Current Authorization Information
36225

37-
TODO: Tell users more about the package: where to find more information, how to
38-
contribute to the package, how to file issues, what response they can expect
39-
from the package authors, and more.

0 commit comments

Comments
 (0)