Skip to content

Commit b3f9ac5

Browse files
authored
proxy_id support (#3)
Adds proxy_id support to the client & fixes a few dependency versions & setters that should be `init`
1 parent 93cef43 commit b3f9ac5

6 files changed

Lines changed: 33 additions & 15 deletions

File tree

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22

33
<PropertyGroup>
4-
<Version>0.1.0</Version>
4+
<Version>0.2.0</Version>
55
<Company>Code Happy, LLC</Company>
66
<Authors>Code Happy, LLC</Authors>
77
<Product>HTML/CSS To Image API</Product>

src/HtmlCssToImage.Blazor/HtmlCssToImage.Blazor.csproj

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,19 @@
1515
<SupportedPlatform Include="browser"/>
1616
</ItemGroup>
1717

18-
<ItemGroup>
19-
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.0.4"/>
18+
<!-- .NET 9 specific dependencies -->
19+
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
20+
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.0.14"/>
2021
</ItemGroup>
21-
22-
2322

23+
<!-- .NET 10 specific dependencies -->
24+
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
25+
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="10.0.5"/>
26+
</ItemGroup>
2427

2528
<ItemGroup>
26-
<ProjectReference Include="..\HtmlCssToImage.DependencyInjection\HtmlCssToImage.DependencyInjection.csproj" />
27-
<ProjectReference Include="..\HtmlCssToImage\HtmlCssToImage.csproj" />
29+
<ProjectReference Include="..\HtmlCssToImage.DependencyInjection\HtmlCssToImage.DependencyInjection.csproj"/>
30+
<ProjectReference Include="..\HtmlCssToImage\HtmlCssToImage.csproj"/>
2831
</ItemGroup>
2932

3033
</Project>

src/HtmlCssToImage.DependencyInjection/HtmlCssToImage.DependencyInjection.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121

2222
<!-- .NET 9 specific dependencies -->
2323
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
24-
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.11" />
25-
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.11" />
24+
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.14" />
25+
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.14" />
2626
</ItemGroup>
2727

2828
<!-- .NET 10 specific dependencies -->
2929
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
30-
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.1" />
31-
<PackageReference Include="Microsoft.Extensions.Http" Version="10.0.1" />
30+
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.5" />
31+
<PackageReference Include="Microsoft.Extensions.Http" Version="10.0.5" />
3232
</ItemGroup>
3333

3434
</Project>

src/HtmlCssToImage/Models/Requests/CreateImageCommonOptions.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,9 @@ public abstract class CreateImageCommonOptions
9090
/// </summary>
9191
public MediaType? MediaType { get; set; }
9292

93+
/// <summary>
94+
/// Gets or sets the proxy ID to use for rendering.
95+
/// </summary>
96+
public string? ProxyId { get; set; }
97+
9398
}

src/HtmlCssToImage/Models/Requests/CreateTemplateRequest.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,9 @@ public class CreateTemplateRequest
112112
/// Gets or sets the media type to use for rendering.
113113
/// </summary>
114114
public MediaType? MediaType { get; set; }
115+
116+
/// <summary>
117+
/// Gets or sets the proxy_id to use for rendering.
118+
/// </summary>
119+
public string? ProxyId { get; set; }
115120
}

src/HtmlCssToImage/Models/Template.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,21 +129,26 @@ public class Template
129129
/// <summary>
130130
/// Gets or sets a value indicating whether the viewport should be rendered as if it's being viewed from a mobile device.
131131
/// </summary>
132-
public bool? ViewportMobile { get; set; }
132+
public bool? ViewportMobile { get; init; }
133133

134134
/// <summary>
135135
/// Gets or sets a value indicating whether the viewport should be in landscape orientation.
136136
/// </summary>
137-
public bool? ViewportLandscape { get; set; }
137+
public bool? ViewportLandscape { get; init; }
138138

139139
/// <summary>
140140
/// Gets or sets a value indicating whether touch interactions are enabled within the viewport.
141141
/// </summary>
142-
public bool? ViewportTouch { get; set; }
142+
public bool? ViewportTouch { get; init; }
143143
/// <summary>
144144
/// Gets or sets the media type to use for rendering.
145145
/// </summary>
146-
public MediaType? MediaType { get; set; }
146+
public MediaType? MediaType { get; init; }
147+
148+
/// <summary>
149+
/// Gets or sets the proxy_id to use for rendering.
150+
/// </summary>
151+
public string? ProxyId { get; init; }
147152

148153

149154
}

0 commit comments

Comments
 (0)