You've already forked CC-Framework.BriskGameServer
Add package sync workflow
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
public sealed class BriskAnnouncementsModule
|
||||
: BriskModuleBase
|
||||
{
|
||||
public async Task<IReadOnlyList<BriskAnnouncementItem>> GetListAsync()
|
||||
{
|
||||
return await ExecuteAsync(async context =>
|
||||
{
|
||||
var data = await context.HttpClient.GetRawDataAsync("/announcements", null, true);
|
||||
return (IReadOnlyList<BriskAnnouncementItem>)BriskModelMapper.ToAnnouncementItems(data);
|
||||
});
|
||||
}
|
||||
|
||||
public async Task MarkReadAsync(long id)
|
||||
{
|
||||
RequirePositive(id, nameof(id), "Announcement id must be greater than 0.");
|
||||
|
||||
await ExecuteAsync(async context =>
|
||||
{
|
||||
await context.HttpClient.PostJsonRawAsync($"/announcements/{id}/read", new Dictionary<string, object>(), true);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 76c65634a3440dd46b2ac6d5b88dcf1d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user