summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Framework/Clients
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-08-04 03:28:34 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-09-14 19:00:41 -0400
commit3ba567eaddeaa0bb2bdd749b56e0601d1cf65a25 (patch)
tree61d5bc41560246da5ce727f47287b6730b525fad /src/SMAPI.Web/Framework/Clients
parentc86db64880d52630c372aa24f7aadf0036fb3fcf (diff)
downloadSMAPI-3ba567eaddeaa0bb2bdd749b56e0601d1cf65a25.tar.gz
SMAPI-3ba567eaddeaa0bb2bdd749b56e0601d1cf65a25.tar.bz2
SMAPI-3ba567eaddeaa0bb2bdd749b56e0601d1cf65a25.zip
add JSON validator with initial support for manifest format (#654)
Diffstat (limited to 'src/SMAPI.Web/Framework/Clients')
-rw-r--r--src/SMAPI.Web/Framework/Clients/Pastebin/IPastebinClient.cs3
-rw-r--r--src/SMAPI.Web/Framework/Clients/Pastebin/PastebinClient.cs5
2 files changed, 5 insertions, 3 deletions
diff --git a/src/SMAPI.Web/Framework/Clients/Pastebin/IPastebinClient.cs b/src/SMAPI.Web/Framework/Clients/Pastebin/IPastebinClient.cs
index 630dfb76..a635abe3 100644
--- a/src/SMAPI.Web/Framework/Clients/Pastebin/IPastebinClient.cs
+++ b/src/SMAPI.Web/Framework/Clients/Pastebin/IPastebinClient.cs
@@ -11,7 +11,8 @@ namespace StardewModdingAPI.Web.Framework.Clients.Pastebin
Task<PasteInfo> GetAsync(string id);
/// <summary>Save a paste to Pastebin.</summary>
+ /// <param name="name">The paste name.</param>
/// <param name="content">The paste content.</param>
- Task<SavePasteResult> PostAsync(string content);
+ Task<SavePasteResult> PostAsync(string name, string content);
}
}
diff --git a/src/SMAPI.Web/Framework/Clients/Pastebin/PastebinClient.cs b/src/SMAPI.Web/Framework/Clients/Pastebin/PastebinClient.cs
index 1e46f2dc..2e8a8c68 100644
--- a/src/SMAPI.Web/Framework/Clients/Pastebin/PastebinClient.cs
+++ b/src/SMAPI.Web/Framework/Clients/Pastebin/PastebinClient.cs
@@ -67,8 +67,9 @@ namespace StardewModdingAPI.Web.Framework.Clients.Pastebin
}
/// <summary>Save a paste to Pastebin.</summary>
+ /// <param name="name">The paste name.</param>
/// <param name="content">The paste content.</param>
- public async Task<SavePasteResult> PostAsync(string content)
+ public async Task<SavePasteResult> PostAsync(string name, string content)
{
try
{
@@ -85,7 +86,7 @@ namespace StardewModdingAPI.Web.Framework.Clients.Pastebin
api_user_key = this.UserKey,
api_dev_key = this.DevKey,
api_paste_private = 1, // unlisted
- api_paste_name = $"SMAPI log {DateTime.UtcNow:s}",
+ api_paste_name = name,
api_paste_expire_date = "N", // never expire
api_paste_code = content
}))