{"id":301333,"date":"2020-04-06T03:00:13","date_gmt":"2020-04-06T03:00:13","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=301333"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=301333","title":{"rendered":"Blazor Client Side \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u041c\u0430\u0433\u0430\u0437\u0438\u043d: \u0427\u0430\u0441\u0442\u044c 5 \u2014 \u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u043a\u043e\u0440\u0437\u0438\u043d\u044b \u0438 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 Stateful"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/495812\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/km\/-h\/-8\/km-h-8uhkt_703mteb8fgtaqmmi.png\"><\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e \u0434\u0435\u043b\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043c\u0430\u0433\u0430\u0437\u0438\u043d \u043d\u0430 Blazor. \u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0442\u043e\u043c \u043a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0432 \u043d\u0435\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u043a\u043e\u0440\u0437\u0438\u043d\u044b \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0438 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043b \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c. \u0417\u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442. <br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/463197\/\">Blazor + MVVM = Silverlight \u043d\u0430\u043d\u043e\u0441\u0438\u0442 \u043e\u0442\u0432\u0435\u0442\u043d\u044b\u0439 \u0443\u0434\u0430\u0440, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0434\u0440\u0435\u0432\u043d\u0435\u0435 \u0437\u043b\u043e \u043d\u0435\u043f\u043e\u0431\u0435\u0434\u0438\u043c\u043e<\/a>  <\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/484596\/\">Blazor Client Side \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u041c\u0430\u0433\u0430\u0437\u0438\u043d: \u0427\u0430\u0441\u0442\u044c 1 \u2014 \u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f oidc (oauth2) + Identity Server4<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/484782\/\">Blazor Client Side \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u041c\u0430\u0433\u0430\u0437\u0438\u043d: \u0427\u0430\u0441\u0442\u044c 2 \u2014 CI\/CD<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/494612\/\">Blazor Client Side \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u041c\u0430\u0433\u0430\u0437\u0438\u043d: \u0427\u0430\u0441\u0442\u044c 3 \u2014 \u0412\u0438\u0442\u0440\u0438\u043d\u0430 \u0442\u043e\u0432\u0430\u0440\u043e\u0432<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/495418\/\">Blazor Client Side \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u041c\u0430\u0433\u0430\u0437\u0438\u043d: \u0427\u0430\u0441\u0442\u044c 4 \u2014 \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u043e\u0432\u0430\u0440\u0430 \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443<\/a><\/li>\n<li>Blazor Client Side \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u041c\u0430\u0433\u0430\u0437\u0438\u043d: \u0427\u0430\u0441\u0442\u044c 5 \u2014 \u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u043a\u043e\u0440\u0437\u0438\u043d\u044b \u0438 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 Stateful<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u0421\u0441\u044b\u043b\u043a\u0438<\/h2>\n<p>  \u2192\u00a0<a href=\"https:\/\/gitlab.com\/VictorWinbringer\/blazoreshop\" rel=\"nofollow\">\u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438<\/a><br \/>  \u2192 <a href=\"https:\/\/hub.docker.com\/u\/victorcallidus\" rel=\"nofollow\">\u041e\u0431\u0440\u0430\u0437\u044b \u043d\u0430 Docker Registry<\/a><\/p>\n<h2>Stateful<\/h2>\n<p>  \u041c\u043d\u0435 \u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u043e\u0441\u044c \u0447\u0442\u043e \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u043c\u0435\u0436\u0434\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u043c\u0438 \u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0435 \u043f\u043e\u043b\u044f \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044f \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u043b \u0442\u043e\u0432\u0430\u0440\u044b. \u0427\u0442\u043e\u0431\u044b \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u044f \u043f\u0435\u0440\u0435\u0448\u0435\u043b \u043a stateful \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c-\u0441\u0438\u043d\u0433\u043b\u0442\u043e\u043d\u0430\u043c \u0438 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043b ViewModel \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0432 DI \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u043a\u0430\u043a \u0441\u0438\u043d\u0433\u043b\u0442\u043e\u043d. \u041f\u043e \u0441\u0443\u0442\u0438 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b DI \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043a\u0430\u043a \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u0430 ViewModel \u043d\u0430\u0447\u0430\u043b \u0438\u043d\u0436\u0435\u043a\u0442\u0438\u0442\u044c \u0432 View \u043a\u0430\u043a \u0441\u0435\u0440\u0432\u0438\u0441.<\/p>\n<h2>\u041a\u043e\u0434<\/h2>\n<p>  <\/p>\n<h3>1) Models<\/h3>\n<p>  <\/p>\n<pre><code class=\"cs\">    public sealed class ProductModel     {         public Guid Id { get; set; }         public string Version { get; set; }         public string Title { get; set; }         public decimal Price { get; set; }     } <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"cs\">    public class BasketLineModel     {         public uint Quantity { get; set; }         public ProductModel Product { get; set; }     } <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"cs\">    public class BasketModel     {         public List&lt;BasketLineModel&gt; Lines { get; set; } = new List&lt;BasketLineModel&gt;();     } <\/code><\/pre>\n<p>  <\/p>\n<h3>2) Services<\/h3>\n<p>  <\/p>\n<pre><code class=\"cs\">    public class BasketService : IBasketService     {         private readonly IApiRepository _repository;         private BasketModel _basket;          public BasketService(IApiRepository repository)         {             _repository = repository;             _basket = new BasketModel();         }          public string Error { get; private set; }         public IReadOnlyList&lt;BasketLineModel&gt; Model =&gt; _basket.Lines.AsReadOnly();         public event EventHandler OnBasketItemsCountChanged;         public long ItemsCount =&gt; _basket?.Lines?.Sum(l =&gt; l.Quantity) ?? 0;          public async Task Load()         {             var count = ItemsCount;             var (r, e) = await _repository.GetBasket();             _basket = r;             Error = e;             if (string.IsNullOrWhiteSpace(Error) &amp;&amp; count != ItemsCount)                 OnBasketItemsCountChanged?.Invoke(null, null);         }          public async Task Add(ProductModel product)         {             var (_, e) = await _repository.AddToBasket(product);             Error = e;             if (!string.IsNullOrWhiteSpace(e))                 return;             await Load();         }          public async Task Remove(ProductModel product)         {             var (_, e) = await _repository.Remove(product.Id);             Error = e;             if (!string.IsNullOrWhiteSpace(e))                 return;             await Load();         }     } <\/code><\/pre>\n<p>  \u0422\u0443\u0442 \u043d\u0430\u0434\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0440\u043e <\/p>\n<pre><code class=\"cs\">public event EventHandler OnBasketItemsCountChanged; <\/code><\/pre>\n<p>  \u042f \u0445\u043e\u0442\u0435\u043b \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0435. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c \u0447\u0442\u043e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u043f\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043a \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043a\u043e\u0440\u0437\u0438\u043d\u044b \u043f\u043e\u043a\u0443\u043f\u043e\u043a \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0435\u0435 \u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043e\u043d \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u0442. \u0427\u0442\u043e\u0431\u044b \u043e\u043d \u043f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u043b\u0441\u044f \u044f \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u044d\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435, \u0430 \u0432 \u043d\u0435\u043c \u043f\u043e\u0432\u0435\u0441\u0438\u043b \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a:<\/p>\n<pre><code class=\"cs\">@using BlazorEShop.Spa.BlazorWasm.Client.Core.Services @using Microsoft.AspNetCore.Components.Authorization @using Microsoft.AspNetCore.Components.WebAssembly.Authentication  @inject NavigationManager Navigation @inject SignOutSessionStateManager SignOutManager @inject IBasketService Basket  @implements IDisposable  &lt;AuthorizeView&gt;     &lt;Authorized&gt;         &lt;span class=&quot;text-success&quot;&gt;Total Items In Basket: @TotalItemsCount &lt;\/span&gt;&nbsp;&nbsp;         Hello, @context?.User?.Identity?.Name!         &lt;button class=&quot;nav-link btn btn-link&quot; @onclick=&quot;BeginSignOut&quot;&gt;Log out&lt;\/button&gt;     &lt;\/Authorized&gt;     &lt;NotAuthorized&gt;         &lt;a href=&quot;authentication\/login&quot;&gt;Log in&lt;\/a&gt;     &lt;\/NotAuthorized&gt; &lt;\/AuthorizeView&gt;  @code {     public long TotalItemsCount { get; set; }      protected override void OnInitialized()     {         Basket.OnBasketItemsCountChanged += Bind;         TotalItemsCount = Basket.ItemsCount;         base.OnInitialized();     }      public void Dispose()     {         Basket.OnBasketItemsCountChanged -= Bind;     }      public void Bind(object s, EventArgs e)     {         if (TotalItemsCount == Basket.ItemsCount)             return;         TotalItemsCount = Basket.ItemsCount;         this.StateHasChanged();     }      private async Task BeginSignOut(MouseEventArgs args)     {         await SignOutManager.SetSignOutState();         Navigation.NavigateTo(&quot;authentication\/logout&quot;);     } } <\/code><\/pre>\n<p>  <\/p>\n<h3>3) ViewModel<\/h3>\n<p>  <\/p>\n<pre><code class=\"cs\">    public class BasketViewModel     {         private bool _isInitialized;         private readonly IBasketService _service;          public BasketViewModel(IBasketService service)         {             _service = service;         }          public string Error =&gt; _service.Error;         public IReadOnlyList&lt;BasketLineModel&gt; Model =&gt; _service.Model;          public async Task OnInitializedAsync()         {             if (_isInitialized)                 return;             Console.WriteLine(&quot;BASKET INIT!&quot;);             await _service.Load();             _isInitialized = true;         }          public Task Add(ProductModel product) =&gt; _service.Add(product);          public Task Remove(ProductModel product) =&gt; _service.Remove(product);     } <\/code><\/pre>\n<p>  <\/p>\n<h3>4) View<\/h3>\n<p>  <\/p>\n<pre><code class=\"cs\">@page &quot;\/basket&quot; @attribute [Authorize] @inject BasketViewModel ViewModel  &lt;h3&gt;Basket&lt;\/h3&gt; &lt;Error Model=&quot;@ViewModel.Error&quot; \/&gt; &lt;input type=&quot;button&quot; class=&quot;btn btn-primary my-3&quot; value=&quot;Create Order&quot; \/&gt; &lt;!--TODO: \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0437\u0430\u043a\u0430\u0437\u0430--&gt; &lt;div class=&quot;table-responsive&quot;&gt;     &lt;table class=&quot;table&quot;&gt;         &lt;thead&gt;             &lt;tr&gt;                 &lt;th&gt;Title&lt;\/th&gt;                 &lt;th&gt;Price&lt;\/th&gt;                 &lt;th&gt;Quantity&lt;\/th&gt;                 &lt;th&gt;&lt;\/th&gt;             &lt;\/tr&gt;         &lt;\/thead&gt;         &lt;tbody&gt;              @if (ViewModel.Model == null)             {                 &lt;tr&gt;                     &lt;td&gt;                         &lt;em&gt;Loading...&lt;\/em&gt;                     &lt;\/td&gt;                 &lt;\/tr&gt;             }             else             {                 foreach (var line in ViewModel.Model)                 {                      &lt;tr&gt;                         &lt;td&gt;@line.Product.Title&lt;\/td&gt;                         &lt;td&gt;@line.Product.Price&lt;\/td&gt;                         &lt;td&gt;@line.Quantity&lt;\/td&gt;                         &lt;td&gt;                             &lt;input type=&quot;button&quot;                                    class=&quot;btn btn-success&quot;                                    @onclick=&quot;@(async x=&gt;await ViewModel.Add(line.Product))&quot;                                    value=&quot;+&quot; \/&gt;                             &lt;input class=&quot;btn btn-warning&quot;                                    value=&quot;-&quot;                                    type=&quot;button&quot;                                    @onclick=&quot;@(async x=&gt;await ViewModel.Remove(line.Product))&quot; \/&gt;                         &lt;\/td&gt;                     &lt;\/tr&gt;                 }             }         &lt;\/tbody&gt;     &lt;\/table&gt; &lt;\/div&gt;  @code {     protected override async Task OnInitializedAsync()     {         await ViewModel.OnInitializedAsync();     } } <\/code><\/pre>\n<p>  <\/p>\n<h3>5) \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0432 DI \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435<\/h3>\n<p>  <\/p>\n<pre><code class=\"cs\">services.AddTransient&lt;IApiRepository, ApiRepository&gt;(); services.AddSingleton&lt;IBasketService, BasketService&gt;(); services.AddSingleton&lt;BasketViewModel&gt;(); <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0412\u0430\u0440\u0438\u0430\u043d\u0442 \u043d\u0430 Angular 9<\/h2>\n<p>  \u041f\u043e\u043a\u0430 \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043d\u0430 Blazor \u043c\u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u044f \u043f\u0440\u0438\u043d\u043e\u0441\u0438\u0442 \u0447\u0435\u043c \u0410\u043d\u0433\u0443\u043b\u044f\u0440.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/dz\/o5\/8p\/dzo58p4dxjhaz9nmku07drblxfq.png\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/495812\/\"> https:\/\/habr.com\/ru\/post\/495812\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/495812\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/km\/-h\/-8\/km-h-8uhkt_703mteb8fgtaqmmi.png\"><\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e \u0434\u0435\u043b\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043c\u0430\u0433\u0430\u0437\u0438\u043d \u043d\u0430 Blazor. \u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0442\u043e\u043c \u043a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0432 \u043d\u0435\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u043a\u043e\u0440\u0437\u0438\u043d\u044b \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0438 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043b \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c. \u0417\u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442.   <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-301333","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/301333","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=301333"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/301333\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=301333"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=301333"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=301333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}