Skip to content

Commit ed80f7a

Browse files
committed
Changed "HostName" property to "Domain" to follow TwentyThree's own naming
1 parent e42c4d4 commit ed80f7a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/Skybrud.Social.TwentyThree/Endpoints/TwentyThreeOEmbedRawEndpoint.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ internal TwentyThreeOEmbedRawEndpoint(TwentyThreeOAuthClient client) {
4747
public IHttpResponse GetOEmbedFromId(string videoId) {
4848

4949
if (string.IsNullOrWhiteSpace(videoId)) throw new ArgumentNullException(nameof(videoId));
50-
if (string.IsNullOrWhiteSpace(Client.HostName)) throw new PropertyNotSetException(nameof(Client.HostName));
50+
if (string.IsNullOrWhiteSpace(Client.Domain)) throw new PropertyNotSetException(nameof(Client.Domain));
5151

52-
string url = $"https://{Client.HostName}/manage/video/{videoId}";
52+
string url = $"https://{Client.Domain}/manage/video/{videoId}";
5353

5454
return GetOEmbed(new TwentyThreeOEmbedOptions(url));
5555

src/Skybrud.Social.TwentyThree/OAuth/TwentyThreeOAuthClient.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ public class TwentyThreeOAuthClient : OAuthClient {
1111
#region Properties
1212

1313
/// <summary>
14-
/// Gets or sets the name to be used for all API requests - eg. <c>videos.skybrud.dk</c>.
14+
/// Gets or sets the domain to be used for all API requests - eg. <c>videos.skybrud.dk</c>.
1515
/// </summary>
16-
public string HostName { get; set; }
16+
public string Domain { get; set; }
1717

1818
/// <summary>
1919
/// Gets a reference to the raw <strong>Albums</strong> endpoint.
@@ -88,15 +88,15 @@ protected override void PrepareHttpRequest(IHttpRequest request) {
8888

8989
// Handle /oembed requests specifically
9090
if (request.Url == "/oembed") {
91-
if (string.IsNullOrWhiteSpace(HostName)) throw new PropertyNotSetException(nameof(HostName));
92-
request.Url = "https://" + HostName + request.Url;
91+
if (string.IsNullOrWhiteSpace(Domain)) throw new PropertyNotSetException(nameof(Domain));
92+
request.Url = "https://" + Domain + request.Url;
9393
return;
9494
}
9595

9696
// Should we append the domain and schema to the URL?
9797
if (request.Url.StartsWith("/api/")) {
98-
if (string.IsNullOrWhiteSpace(HostName)) throw new PropertyNotSetException(nameof(HostName));
99-
request.Url = "https://" + HostName + request.Url;
98+
if (string.IsNullOrWhiteSpace(Domain)) throw new PropertyNotSetException(nameof(Domain));
99+
request.Url = "https://" + Domain + request.Url;
100100
}
101101

102102
// Append "raw" to the query string so we can get a proper JSON response

0 commit comments

Comments
 (0)