{"action":"opened","issue":{"url":"https://api.github.com/repos/brandonseydel/MailChimp.Net/issues/49","repository_url":"https://api.github.com/repos/brandonseydel/MailChimp.Net","labels_url":"https://api.github.com/repos/brandonseydel/MailChimp.Net/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/brandonseydel/MailChimp.Net/issues/49/comments","events_url":"https://api.github.com/repos/brandonseydel/MailChimp.Net/issues/49/events","html_url":"https://github.com/brandonseydel/MailChimp.Net/issues/49","id":161334115,"number":49,"title":"Add Interest is not available","user":{"login":"wassimn","id":7613649,"avatar_url":"https://avatars.githubusercontent.com/u/7613649?v=3","gravatar_id":"","url":"https://api.github.com/users/wassimn","html_url":"https://github.com/wassimn","followers_url":"https://api.github.com/users/wassimn/followers","following_url":"https://api.github.com/users/wassimn/following{/other_user}","gists_url":"https://api.github.com/users/wassimn/gists{/gist_id}","starred_url":"https://api.github.com/users/wassimn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wassimn/subscriptions","organizations_url":"https://api.github.com/users/wassimn/orgs","repos_url":"https://api.github.com/users/wassimn/repos","events_url":"https://api.github.com/users/wassimn/events{/privacy}","received_events_url":"https://api.github.com/users/wassimn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-21T01:59:49Z","updated_at":"2016-06-21T01:59:49Z","closed_at":null,"body":"Thank you for the work you've done.\r\n\r\nI cloned your repo and noticed that add interest is not added, there is minor iterations that should be added to make this work, find below code snippet if you would like to add it to your branch.\r\n\r\n```\r\n        public async Task<Interest> AddOrUpdateAsync(Interest list)\r\n        {\r\n            using (var client = this.CreateMailClient(\"lists/\"))\r\n            {\r\n                System.Net.Http.HttpResponseMessage response;\r\n                if (string.IsNullOrWhiteSpace(list.Id))\r\n                {\r\n                     response = await client.PostAsJsonAsync(\r\n                                          $\"{list.ListId}/interest-categories/{list.InterestCategoryId}/interests\",\r\n                                          list).ConfigureAwait(false);\r\n                }\r\n                else\r\n                {\r\n                     response = await client.PatchAsJsonAsync(\r\n                                         $\"{list.ListId}/interest-categories/{list.InterestCategoryId}/interests/{list.Id}\",\r\n                                         list).ConfigureAwait(false);\r\n                }\r\n\r\n                await response.EnsureSuccessMailChimpAsync().ConfigureAwait(false);\r\n                return await response.Content.ReadAsAsync<Interest>().ConfigureAwait(false);\r\n            }\r\n        }\r\n```\r\n"}}
{"actor":{"display_login":"wassimn"}}