File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 13
13
using Modrinth .RestClient ;
14
14
15
15
// You must provide a user-agent, and optionally an authentication token if you wish to access authenticated API endpoints
16
- var client = new ModrinthApi (userAgent : " My_Awesome_Project" , token : " Your_Authentication_Token" );
16
+ var client = new ModrinthClient (userAgent : " My_Awesome_Project" , token : " Your_Authentication_Token" );
17
17
18
18
var project = await client .Project .GetAsync (" sodium" );
19
19
20
20
Console .WriteLine (project .Description );
21
21
```
22
22
23
+ #### How does version 3.0.0 differ from 2.X.X?
24
+ - Dropped use of ` RestEase ` library
25
+ - It's a great library, but it was not really suited for this project
26
+ - Currently using [ Flurl] ( https://flurl.dev/ ) library to create and send requests
27
+ - Not using 1 big API class anymore, but rather multiple smaller ones - for each endpoint
28
+ - To provide more unified experience, there is a ` ModrinthClient ` class, which contains all the smaller API classes
29
+ - It's easier to use, as it will be more similar to the API specification
30
+ - Instead of ` client.GetProjectAsync("sodium") ` you will do ` client.Project.GetAsync("sodium") `
31
+ - It's set up to be easily extendable
32
+ - All methods will be unit tested
33
+ - It has the foundation for authenticated API endpoints, some of them are already implemented
34
+
23
35
### Version 2.X.X
24
36
- All methods are asynchronous
25
37
``` csharp
You can’t perform that action at this time.
0 commit comments