Refetch instance data from the API.

def refresh(self):
      '''Refetch instance data from the API.
      '''
      response = requests.get('%s/categories/%s' % (API_BASE_URL, self.name))
      attributes = response.json()
      
      self.ancestors = [Category(name) for name in attributes['ancestors']]
      self.contents = WikiText(attributes['contents_raw'],
                               attributes['contents_rendered'])
      self.description = attributes['description']
      self.guides = []
      for guide in attributes['guides']:
         self.guides.append(Guide(guide['guideid']))
      # Unlike guides, categories return flags as a dict, keyed by flagid.
      # *Except* when it's empty, in which case we get an empty list due to
      # PHP's json_encode() not knowing the difference between an empty array
      # and an empty dict.
      flags = dict(attributes['flags']).values()
      self.flags = [Flag.from_id(flag['flagid']) for flag in flags]
      self.image = Image(attributes['image']['id']) if attributes['image'] else None
      self.locale = attributes['locale']
      #self.parts = attributes['parts']
      #self.solutions = attributes['solutions']
      self.title = attributes['display_title']