{"action":"created","issue":{"url":"https://api.github.com/repos/Ecwid/ecwid-mailchimp/issues/24","repository_url":"https://api.github.com/repos/Ecwid/ecwid-mailchimp","labels_url":"https://api.github.com/repos/Ecwid/ecwid-mailchimp/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/Ecwid/ecwid-mailchimp/issues/24/comments","events_url":"https://api.github.com/repos/Ecwid/ecwid-mailchimp/issues/24/events","html_url":"https://github.com/Ecwid/ecwid-mailchimp/issues/24","id":37229058,"number":24,"title":"Example of setting or updating the grouping information on a subscriber","user":{"login":"ghost","id":10137,"avatar_url":"https://avatars.githubusercontent.com/u/10137?v=3","gravatar_id":"","url":"https://api.github.com/users/ghost","html_url":"https://github.com/ghost","followers_url":"https://api.github.com/users/ghost/followers","following_url":"https://api.github.com/users/ghost/following{/other_user}","gists_url":"https://api.github.com/users/ghost/gists{/gist_id}","starred_url":"https://api.github.com/users/ghost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghost/subscriptions","organizations_url":"https://api.github.com/users/ghost/orgs","repos_url":"https://api.github.com/users/ghost/repos","events_url":"https://api.github.com/users/ghost/events{/privacy}","received_events_url":"https://api.github.com/users/ghost/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-07-06T21:52:31Z","updated_at":"2016-04-04T22:13:50Z","closed_at":null,"body":"\r\nHi,\r\n\r\nFirst, thanks for the library — I’d be dead in the water without it.\r\n\r\nSecond, I’d like to reopen the very first issue/question raised [#1 Updating grouping for existing or new subscriber]: \r\n\tIt would be great if you could include an example (e.g. in the unit tests) of \r\n\tsetting or updating the grouping information on a subscriber, for instance when \r\n\tadding a new subscriber via listSubscribe using GROUPINGS in merge_vars.\r\n\r\nThe problem is that the link in the response to that question is broken:\r\n\r\nhttps://github.com/Ecwid/ecwid-mailchimp/blob/master/src/test/java/com/ecwid/mailchimp/method/list/InterestGroupingMethodsTest.java\r\n\r\nAnd in the current download, there are no tests, only a folder containing logging.properties.  \r\n\r\nI’ve gotten the basic ‘subscribe a person to a list’ working following your wiki code.  But I can’t work out how to utilize/combine the various [List]InterestGroup[ings]Method objects with SubscribeMethod or UpdateMemberMethod.  \r\n\r\nRegards,\r\nKen"},"comment":{"url":"https://api.github.com/repos/Ecwid/ecwid-mailchimp/issues/comments/205518771","html_url":"https://github.com/Ecwid/ecwid-mailchimp/issues/24#issuecomment-205518771","issue_url":"https://api.github.com/repos/Ecwid/ecwid-mailchimp/issues/24","id":205518771,"user":{"login":"jogrimst","id":1451036,"avatar_url":"https://avatars.githubusercontent.com/u/1451036?v=3","gravatar_id":"","url":"https://api.github.com/users/jogrimst","html_url":"https://github.com/jogrimst","followers_url":"https://api.github.com/users/jogrimst/followers","following_url":"https://api.github.com/users/jogrimst/following{/other_user}","gists_url":"https://api.github.com/users/jogrimst/gists{/gist_id}","starred_url":"https://api.github.com/users/jogrimst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jogrimst/subscriptions","organizations_url":"https://api.github.com/users/jogrimst/orgs","repos_url":"https://api.github.com/users/jogrimst/repos","events_url":"https://api.github.com/users/jogrimst/events{/privacy}","received_events_url":"https://api.github.com/users/jogrimst/received_events","type":"User","site_admin":false},"created_at":"2016-04-04T22:13:50Z","updated_at":"2016-04-04T22:13:50Z","body":"Hi, I'm struggling with the same thing. I'm iterating to the relevant MemberInfoGroups, update them, and execute the request, but the changes are not reflected on the MailChimp server...\r\n\r\n        UpdateMemberMethod updateMemberMethod = new UpdateMemberMethod();\r\n        updateMemberMethod.apikey = API_KEY;\r\n        updateMemberMethod.id = LIST_ID;\r\n        updateMemberMethod.email = new Email();\r\n        updateMemberMethod.email.email = email;\r\n        \r\n        MemberInfoData memberInfoData = new MailChimpSubscriptionHelper().getMemberInfoData(email);\r\n        List<MemberInfoGrouping> memberInfoGroupings = (List<MemberInfoGrouping>) memberInfoData.merges.get(\"GROUPINGS\");\r\n        for (MemberInfoGrouping memberInfoGrouping : memberInfoGroupings) {\r\n            // Update relevant MemberInfoGroups (set attribute \"interested\" = true)\r\n        }\r\n        logger.info(\"memberInfoGroupings: \" + memberInfoGroupings);\r\n        MailChimpObject mergeVars = new MailChimpObject();\r\n        mergeVars.put(\"GROUPINGS\", memberInfoGroupings.toString());\r\n        updateMemberMethod.merge_vars = mergeVars;\r\n        \r\n        updateMemberMethod.replace_interests = true;\r\n        \r\n        MailChimpClient mailChimpClient = new MailChimpClient();\r\n        try {\r\n            mailChimpClient.execute(updateMemberMethod);\r\n        } catch (IOException | MailChimpException ex) {\r\n            logger.error(null, ex);\r\n        }"}}