{"action":"created","comment":{"url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/pulls/comments/210526507","pull_request_review_id":146757745,"id":210526507,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMDUyNjUwNw==","diff_hunk":"@@ -0,0 +1,64 @@\n+﻿using AutoMapper;\n+using Newtonsoft.Json;\n+using RestSharp;\n+using System;\n+using System.Collections.Generic;\n+using System.Linq;\n+using System.Net;\n+using System.Threading.Tasks;\n+using task2WebAPI.Models;\n+\n+namespace task2WebAPI.Services\n+{\n+    public class StarsService : IStarsService\n+    {\n+        private const string url = \"https://swapi.co/api/starships/\";\n+        private readonly IMapper _mapper;\n+        //private readonly RestRequest _restRequest;\n+        private readonly RestClient _restClient;\n+        public StarsService(IMapper mapper)\n+        {\n+            this._mapper = mapper;\n+            //this._restRequest= new RestRequest(Method.GET);\n+            this._restClient = new RestClient(url);\n+        }\n+        public async Task<StarsResult> GetAllStarsAsync()\n+        {\n+            RestRequest restRequest = new RestRequest(Method.GET);\n+            StarsResultWithNext result = new StarsResultWithNext();\n+            while (true)\n+            {\n+                StarsResultWithNext starsOnePage = await _restClient.GetTaskAsync<StarsResultWithNext>(restRequest);\n+                result.Results.AddRange(starsOnePage.Results);\n+                result.Count = result.Results.Count();\n+                if (starsOnePage.Next != null) restRequest = new RestRequest(starsOnePage.Next,Method.GET);\n+                else break;\n+            }\n+            setIndex(_mapper.Map<StarsResultWithNext, StarsResult>(result));","path":"4_ASP.NET_CORE/task2/task2WebAPI/task2WebAPI/Services/StarsService.cs","position":37,"original_position":37,"commit_id":"7687857dba2553fa35b63b4b955a7a9cd0b03eb1","original_commit_id":"7687857dba2553fa35b63b4b955a7a9cd0b03eb1","user":{"login":"Liza123-321","id":22189271,"node_id":"MDQ6VXNlcjIyMTg5Mjcx","avatar_url":"https://avatars2.githubusercontent.com/u/22189271?v=4","gravatar_id":"","url":"https://api.github.com/users/Liza123-321","html_url":"https://github.com/Liza123-321","followers_url":"https://api.github.com/users/Liza123-321/followers","following_url":"https://api.github.com/users/Liza123-321/following{/other_user}","gists_url":"https://api.github.com/users/Liza123-321/gists{/gist_id}","starred_url":"https://api.github.com/users/Liza123-321/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Liza123-321/subscriptions","organizations_url":"https://api.github.com/users/Liza123-321/orgs","repos_url":"https://api.github.com/users/Liza123-321/repos","events_url":"https://api.github.com/users/Liza123-321/events{/privacy}","received_events_url":"https://api.github.com/users/Liza123-321/received_events","type":"User","site_admin":false},"body":"я принимаю объект  StarsResult в метод, а здесь StarsResultWithNext , таким образом я его преобразую. Написать такой же метод, принимающий StarsResultWithNext или наследовать эту модель от StarsResult?\r\n","created_at":"2018-08-16T09:09:10Z","updated_at":"2018-08-16T09:09:10Z","html_url":"https://github.com/Liza123-321/iTechLab18-lizaveta.kaliaha/pull/14#discussion_r210526507","pull_request_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/pulls/14","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/pulls/comments/210526507"},"html":{"href":"https://github.com/Liza123-321/iTechLab18-lizaveta.kaliaha/pull/14#discussion_r210526507"},"pull_request":{"href":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/pulls/14"}},"in_reply_to_id":210522894},"pull_request":{"url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/pulls/14","id":208784058,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4Nzg0MDU4","html_url":"https://github.com/Liza123-321/iTechLab18-lizaveta.kaliaha/pull/14","diff_url":"https://github.com/Liza123-321/iTechLab18-lizaveta.kaliaha/pull/14.diff","patch_url":"https://github.com/Liza123-321/iTechLab18-lizaveta.kaliaha/pull/14.patch","issue_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/issues/14","number":14,"state":"open","locked":false,"title":"Task 1-2 fix 2 last pulls","user":{"login":"Liza123-321","id":22189271,"node_id":"MDQ6VXNlcjIyMTg5Mjcx","avatar_url":"https://avatars2.githubusercontent.com/u/22189271?v=4","gravatar_id":"","url":"https://api.github.com/users/Liza123-321","html_url":"https://github.com/Liza123-321","followers_url":"https://api.github.com/users/Liza123-321/followers","following_url":"https://api.github.com/users/Liza123-321/following{/other_user}","gists_url":"https://api.github.com/users/Liza123-321/gists{/gist_id}","starred_url":"https://api.github.com/users/Liza123-321/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Liza123-321/subscriptions","organizations_url":"https://api.github.com/users/Liza123-321/orgs","repos_url":"https://api.github.com/users/Liza123-321/repos","events_url":"https://api.github.com/users/Liza123-321/events{/privacy}","received_events_url":"https://api.github.com/users/Liza123-321/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-08-16T08:36:40Z","updated_at":"2018-08-16T09:09:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"57cec422fbfebe4eb9a76021d94a551ec0f6a43b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/pulls/14/commits","review_comments_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/pulls/14/comments","review_comment_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/issues/14/comments","statuses_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/statuses/7687857dba2553fa35b63b4b955a7a9cd0b03eb1","head":{"label":"Liza123-321:develop-netcore","ref":"develop-netcore","sha":"7687857dba2553fa35b63b4b955a7a9cd0b03eb1","user":{"login":"Liza123-321","id":22189271,"node_id":"MDQ6VXNlcjIyMTg5Mjcx","avatar_url":"https://avatars2.githubusercontent.com/u/22189271?v=4","gravatar_id":"","url":"https://api.github.com/users/Liza123-321","html_url":"https://github.com/Liza123-321","followers_url":"https://api.github.com/users/Liza123-321/followers","following_url":"https://api.github.com/users/Liza123-321/following{/other_user}","gists_url":"https://api.github.com/users/Liza123-321/gists{/gist_id}","starred_url":"https://api.github.com/users/Liza123-321/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Liza123-321/subscriptions","organizations_url":"https://api.github.com/users/Liza123-321/orgs","repos_url":"https://api.github.com/users/Liza123-321/repos","events_url":"https://api.github.com/users/Liza123-321/events{/privacy}","received_events_url":"https://api.github.com/users/Liza123-321/received_events","type":"User","site_admin":false},"repo":{"id":139841148,"node_id":"MDEwOlJlcG9zaXRvcnkxMzk4NDExNDg=","name":"iTechLab18-lizaveta.kaliaha","full_name":"Liza123-321/iTechLab18-lizaveta.kaliaha","owner":{"login":"Liza123-321","id":22189271,"node_id":"MDQ6VXNlcjIyMTg5Mjcx","avatar_url":"https://avatars2.githubusercontent.com/u/22189271?v=4","gravatar_id":"","url":"https://api.github.com/users/Liza123-321","html_url":"https://github.com/Liza123-321","followers_url":"https://api.github.com/users/Liza123-321/followers","following_url":"https://api.github.com/users/Liza123-321/following{/other_user}","gists_url":"https://api.github.com/users/Liza123-321/gists{/gist_id}","starred_url":"https://api.github.com/users/Liza123-321/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Liza123-321/subscriptions","organizations_url":"https://api.github.com/users/Liza123-321/orgs","repos_url":"https://api.github.com/users/Liza123-321/repos","events_url":"https://api.github.com/users/Liza123-321/events{/privacy}","received_events_url":"https://api.github.com/users/Liza123-321/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Liza123-321/iTechLab18-lizaveta.kaliaha","description":".NET iTechArt Lab 2018","fork":false,"url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha","forks_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/forks","keys_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/teams","hooks_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/hooks","issue_events_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/issues/events{/number}","events_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/events","assignees_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/assignees{/user}","branches_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/branches{/branch}","tags_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/tags","blobs_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/git/refs{/sha}","trees_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/statuses/{sha}","languages_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/languages","stargazers_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/stargazers","contributors_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/contributors","subscribers_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/subscribers","subscription_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/subscription","commits_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/commits{/sha}","git_commits_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/git/commits{/sha}","comments_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/comments{/number}","issue_comment_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/issues/comments{/number}","contents_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/contents/{+path}","compare_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/merges","archive_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/downloads","issues_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/issues{/number}","pulls_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/pulls{/number}","milestones_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/milestones{/number}","notifications_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/labels{/name}","releases_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/releases{/id}","deployments_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/deployments","created_at":"2018-07-05T11:42:12Z","updated_at":"2018-08-09T07:42:36Z","pushed_at":"2018-08-16T09:04:13Z","git_url":"git://github.com/Liza123-321/iTechLab18-lizaveta.kaliaha.git","ssh_url":"git@github.com:Liza123-321/iTechLab18-lizaveta.kaliaha.git","clone_url":"https://github.com/Liza123-321/iTechLab18-lizaveta.kaliaha.git","svn_url":"https://github.com/Liza123-321/iTechLab18-lizaveta.kaliaha","homepage":null,"size":7819,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"Liza123-321:master","ref":"master","sha":"b887e89f86f254614fffb417208de0af4da2cd25","user":{"login":"Liza123-321","id":22189271,"node_id":"MDQ6VXNlcjIyMTg5Mjcx","avatar_url":"https://avatars2.githubusercontent.com/u/22189271?v=4","gravatar_id":"","url":"https://api.github.com/users/Liza123-321","html_url":"https://github.com/Liza123-321","followers_url":"https://api.github.com/users/Liza123-321/followers","following_url":"https://api.github.com/users/Liza123-321/following{/other_user}","gists_url":"https://api.github.com/users/Liza123-321/gists{/gist_id}","starred_url":"https://api.github.com/users/Liza123-321/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Liza123-321/subscriptions","organizations_url":"https://api.github.com/users/Liza123-321/orgs","repos_url":"https://api.github.com/users/Liza123-321/repos","events_url":"https://api.github.com/users/Liza123-321/events{/privacy}","received_events_url":"https://api.github.com/users/Liza123-321/received_events","type":"User","site_admin":false},"repo":{"id":139841148,"node_id":"MDEwOlJlcG9zaXRvcnkxMzk4NDExNDg=","name":"iTechLab18-lizaveta.kaliaha","full_name":"Liza123-321/iTechLab18-lizaveta.kaliaha","owner":{"login":"Liza123-321","id":22189271,"node_id":"MDQ6VXNlcjIyMTg5Mjcx","avatar_url":"https://avatars2.githubusercontent.com/u/22189271?v=4","gravatar_id":"","url":"https://api.github.com/users/Liza123-321","html_url":"https://github.com/Liza123-321","followers_url":"https://api.github.com/users/Liza123-321/followers","following_url":"https://api.github.com/users/Liza123-321/following{/other_user}","gists_url":"https://api.github.com/users/Liza123-321/gists{/gist_id}","starred_url":"https://api.github.com/users/Liza123-321/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Liza123-321/subscriptions","organizations_url":"https://api.github.com/users/Liza123-321/orgs","repos_url":"https://api.github.com/users/Liza123-321/repos","events_url":"https://api.github.com/users/Liza123-321/events{/privacy}","received_events_url":"https://api.github.com/users/Liza123-321/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Liza123-321/iTechLab18-lizaveta.kaliaha","description":".NET iTechArt Lab 2018","fork":false,"url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha","forks_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/forks","keys_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/teams","hooks_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/hooks","issue_events_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/issues/events{/number}","events_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/events","assignees_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/assignees{/user}","branches_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/branches{/branch}","tags_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/tags","blobs_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/git/refs{/sha}","trees_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/statuses/{sha}","languages_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/languages","stargazers_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/stargazers","contributors_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/contributors","subscribers_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/subscribers","subscription_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/subscription","commits_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/commits{/sha}","git_commits_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/git/commits{/sha}","comments_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/comments{/number}","issue_comment_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/issues/comments{/number}","contents_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/contents/{+path}","compare_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/merges","archive_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/downloads","issues_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/issues{/number}","pulls_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/pulls{/number}","milestones_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/milestones{/number}","notifications_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/labels{/name}","releases_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/releases{/id}","deployments_url":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/deployments","created_at":"2018-07-05T11:42:12Z","updated_at":"2018-08-09T07:42:36Z","pushed_at":"2018-08-16T09:04:13Z","git_url":"git://github.com/Liza123-321/iTechLab18-lizaveta.kaliaha.git","ssh_url":"git@github.com:Liza123-321/iTechLab18-lizaveta.kaliaha.git","clone_url":"https://github.com/Liza123-321/iTechLab18-lizaveta.kaliaha.git","svn_url":"https://github.com/Liza123-321/iTechLab18-lizaveta.kaliaha","homepage":null,"size":7819,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/pulls/14"},"html":{"href":"https://github.com/Liza123-321/iTechLab18-lizaveta.kaliaha/pull/14"},"issue":{"href":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/issues/14"},"comments":{"href":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/Liza123-321/iTechLab18-lizaveta.kaliaha/statuses/7687857dba2553fa35b63b4b955a7a9cd0b03eb1"}},"author_association":"OWNER"}}
{"actor":{"display_login":"Liza123-321"}}