File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ public static class SharedGlobal
62
62
false ;
63
63
#endif
64
64
65
- private static RestClient RestClient { get ; } = new (
65
+ public static RestClient RestClient { get ; } = new (
66
66
new RestClientOptions
67
67
{
68
68
UserAgent = $ "{ APP_NAME } /{ VERSION } "
Original file line number Diff line number Diff line change 5
5
using System . Threading . Tasks ;
6
6
7
7
using RestSharp ;
8
- using RestSharp . Serializers . NewtonsoftJson ;
9
8
10
9
using vj0 . Framework ;
11
10
using vj0 . Models . API ;
11
+ using vj0 . Shared ;
12
12
using vj0 . Shared . Models . API ;
13
13
14
14
namespace vj0 . Services ;
@@ -18,15 +18,10 @@ public class RestAPIService : IService
18
18
public readonly CentralAPI Central ;
19
19
public readonly EpicGamesAPI EpicGames ;
20
20
public readonly GitHubAPI GitHub ;
21
- private readonly RestClient _client ;
21
+ private RestClient _client => SharedGlobal . RestClient ;
22
22
23
23
public RestAPIService ( )
24
24
{
25
- _client = new RestClient ( new RestClientOptions
26
- {
27
- UserAgent = $ "{ APP_NAME } /{ VERSION } "
28
- } , configureSerialization : s => s . UseSerializer < JsonNetSerializer > ( ) ) ;
29
-
30
25
Central = new CentralAPI ( _client ) ;
31
26
EpicGames = new EpicGamesAPI ( _client ) ;
32
27
GitHub = new GitHubAPI ( _client ) ;
You can’t perform that action at this time.
0 commit comments