File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
src/Skybrud.Social.TwentyThree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -47,9 +47,9 @@ internal TwentyThreeOEmbedRawEndpoint(TwentyThreeOAuthClient client) {
47
47
public IHttpResponse GetOEmbedFromId ( string videoId ) {
48
48
49
49
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 ) ) ;
51
51
52
- string url = $ "https://{ Client . HostName } /manage/video/{ videoId } ";
52
+ string url = $ "https://{ Client . Domain } /manage/video/{ videoId } ";
53
53
54
54
return GetOEmbed ( new TwentyThreeOEmbedOptions ( url ) ) ;
55
55
Original file line number Diff line number Diff line change @@ -11,9 +11,9 @@ public class TwentyThreeOAuthClient : OAuthClient {
11
11
#region Properties
12
12
13
13
/// <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>.
15
15
/// </summary>
16
- public string HostName { get ; set ; }
16
+ public string Domain { get ; set ; }
17
17
18
18
/// <summary>
19
19
/// Gets a reference to the raw <strong>Albums</strong> endpoint.
@@ -88,15 +88,15 @@ protected override void PrepareHttpRequest(IHttpRequest request) {
88
88
89
89
// Handle /oembed requests specifically
90
90
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 ;
93
93
return ;
94
94
}
95
95
96
96
// Should we append the domain and schema to the URL?
97
97
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 ;
100
100
}
101
101
102
102
// Append "raw" to the query string so we can get a proper JSON response
You can’t perform that action at this time.
0 commit comments