def __init__(self, package_json, subprocess_runner, working_copy,
               config_path):
    self.package_json = package_json
    self.dependencies = []
    self.name = '[unknown]'
    self.path = ''
    self.git_remote_upstream = ''
    self.git_remote_local = ''
    self.subprocess_runner = subprocess_runner
    self.working_copy = working_copy
    self.prebuilts = self.package_json.get('prebuilts', 0)
    self.revision = self.package_json.get('revision', '')
    self.fetch_dependencies = self.package_json.get('fetch_dependencies', 0)
    self.config_path = self.package_json.get('config_path', config_path)
    try:
      self.name = self.package_json['name']
      self.url = self.package_json['url']
      self.branch = self.package_json['branch']
      self.is_library = self.package_json['is_library']
      self.third_party = self.package_json['third_party']
      self.push = self.package_json['push']
    except KeyError as e:
      raise ConfigJsonError('Package %s: Unable to find value (%s)' % (
          self.name, str(e)))
Helper to make API calls, parse the json and return the result.
dataset/ETHPy150Open google/fplutil/disttools/push_package.py/Package.__init__--crossover with--dataset/ETHPy150Open mozilla/kitsune/kitsune/kpi/tests/test_api.py/KpiApiTests._get_api_result