def get_data(self, doi_id, idx):
        """
        Resolve DOI and compile all attributes into one dictionary
        :param str doi_id:
        :param int idx: Publication index
        :return dict: Updated publication dictionary
        """

        tmp_dict = self.root_dict['pub'][0].copy()
        try:
            # Send request to grab metadata at URL
            url = "http://dx.doi.org/" + doi_id
            headers = {"accept": "application/rdf+xml;q=0.5, application/citeproc+json;q=1.0"}
            r = requests.get(url, headers=headers)

            # DOI 404. Data not retrieved. Log and return original pub
            if r.status_code == 400:
                logger_doi_resolver.warn("doi.org STATUS: 404, {}".format(doi_id))

            # Ignore other status codes. Run when status is 200 (good response)
            elif r.status_code == 200:
                logger_doi_resolver.info("doi.org STATUS: 200")
                # Load data from http response
                raw = json.loads(r.text)

                # Create a new pub dictionary with metadata received
                fetch_dict = self.compile_fetch(raw, doi_id)

                # Compare the two pubs. Overwrite old data with new data where applicable
                tmp_dict = self.compare_replace(tmp_dict, fetch_dict)
                tmp_dict['pubDataUrl'] = 'doi.org'
                self.root_dict['pub'][idx] = tmp_dict

        except urllib.error.URLError as e:
            logger_doi_resolver.warn("get_data: URLError: malformed doi: {}, {}".format(doi_id, e))
        except ValueError as e:
            logger_doi_resolver.warn("get_data: ValueError: cannot resolve dois from this publisher: {}, {}".format(doi_id, e))
        return