Skip to content

Commit b54163d

Browse files
Update NewsViewModel_GoodAsyncAwaitPractices.cs
1 parent 681d20b commit b54163d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sample/HackerNews/ViewModels/NewsViewModel_GoodAsyncAwaitPractices.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ async Task<List<StoryModel>> GetTopStories(int numberOfStories)
7171
return topStoriesArray.Where(x => x != null).OrderByDescending(x => x.Score).ToList();
7272
}
7373

74-
Task<StoryModel> GetStory(string storyId) => GetDataObjectFromAPI<StoryModel>($"https://hacker-news.firebaseio.com/v0/item/{storyId}.json?print=pretty");
74+
Task<StoryModel> GetStory(string storyId) => GetDataFromAPI<StoryModel>($"https://hacker-news.firebaseio.com/v0/item/{storyId}.json?print=pretty");
7575

7676
async ValueTask<IReadOnlyList<string>> GetTopStoryIDs()
7777
{
@@ -80,7 +80,7 @@ async ValueTask<IReadOnlyList<string>> GetTopStoryIDs()
8080

8181
try
8282
{
83-
return await GetDataObjectFromAPI<List<string>>("https://hacker-news.firebaseio.com/v0/topstories.json?print=pretty").ConfigureAwait(false);
83+
return await GetDataFromAPI<List<string>>("https://hacker-news.firebaseio.com/v0/topstories.json?print=pretty").ConfigureAwait(false);
8484
}
8585
catch (Exception e)
8686
{
@@ -90,4 +90,4 @@ async ValueTask<IReadOnlyList<string>> GetTopStoryIDs()
9090
}
9191

9292
void OnErrorOccurred(string message) => _errorOccurredEventManager.RaiseEvent(this, message, nameof(ErrorOccurred));
93-
}
93+
}

0 commit comments

Comments
 (0)