GET /v1/images/(image_id)/json
492550
def get_image_layer(self, image_id):
        """"""
        return self._http_call(self.IMAGE_JSON, get, image_id=image_id)
432823
def image_url(self) -> Optional[str]:
        

        """
        images = self.attributes.get('imageinfo', [])
        if images and isinstance(images, collections.abc.Sequence):
            return images[0]['url']
        return None
1357699
def get_image(self, image_id, **kwargs):
        
        if 'mask' not in kwargs:
            kwargs['mask'] = IMAGE_MASK

        return self.vgbdtg.getObject(id=image_id, **kwargs)
1151890
def fetch(self):
        
        api = self.doapi_manager
        return api._image(api.request(self.url)["image"])
1051761
def _get_content_json(ident_hash=None):
    """"""
    request = get_current_request()
    routing_args = request and request.matchdict or {}
    if not ident_hash:
        ident_hash = routing_args['ident_hash']

    as_collated = asbool(request.GET.get('as_collated', True))
    page_ident_hash = routing_args.get('page_ident_hash', '')
    p_id, p_version = (None, None)
    if page_ident_hash:
        try:
            p_id, p_version = split_ident_hash(page_ident_hash)
        except IdentHashShortId as e:
            p_id = get_uuid(e.id)
            p_version = e.version
        except IdentHashMissingVersion as e:
            # page ident hash doesn't need a version
            p_id = e.id
            p_version = None

    id, version = split_ident_hash(ident_hash, containing=p_id)

    with db_connect() as db_connection:
        with db_connection.cursor() as cursor:
            result = get_content_metadata(id, version, cursor)
            # Build url for canonical link header
            result['canon_url'] = get_canonical_url(result, request)

            if result['mediaType'] == COLLECTION_MIMETYPE:
                # Grab the collection tree.
                result['tree'] = get_tree(ident_hash, cursor,
                                          as_collated=as_collated)
                result['collated'] = as_collated
                if not result['tree']:
                    # If collated tree is not available, get the uncollated
                    # tree.
                    result['tree'] = get_tree(ident_hash, cursor)
                    result['collated'] = False

                if page_ident_hash:
                    for id_ in flatten_tree_to_ident_hashes(result['tree']):
                        id, version = split_ident_hash(id_)
                        if id == p_id and (
                           version == p_version or not p_version):
                            content = None
                            if as_collated:
                                content = get_collated_content(
                                    id_, ident_hash, cursor)
                            if content:
                                result = get_content_metadata(
                                    id, version, cursor)
                                # Build url for canonical link header
                                result['canon_url'] = (
                                        get_canonical_url(result, request))
                                result['content'] = content[:]
                                return result
                            # 302 'cause lack of baked content may be temporary
                            raise httpexceptions.HTTPFound(request.route_path(
                                request.matched_route.name,
                                _query=request.params,
                                ident_hash=join_ident_hash(id, version),
                                ext=routing_args['ext']),
                                headers=[("Cache-Control",
                                          "max-age=60, public")])
                    raise httpexceptions.HTTPNotFound()
            else:
                result = get_content_metadata(id, version, cursor)
                # Build url for canonical link header
                result['canon_url'] = get_canonical_url(result, request)
                # Grab the html content.
                args = dict(id=id, version=result['version'],
                            filename='index.cnxml.html')
                cursor.execute(SQL['get-resource-by-filename'], args)
                try:
                    content = cursor.fetchone()[0]
                except (TypeError, IndexError,):  # None returned
                    logger.debug("module found, but "
                                 "'index.cnxml.html' is missing.")
                    raise httpexceptions.HTTPNotFound()
                result['content'] = content[:]

    return result
1117505
def get(self, id):
        
        id = self.key_name(id)
        session_json = self.redis.get(id) or '{}'
        return json_loads(session_json)
356548
def get_bibl_uuid(image_id)
      url = "#{@server_url}/items/local_image_id/#{image_id}.json"   
      json = self.get_json(url)
      bibl_uuid = nil
      if json["nyplAPI"]["response"]["numResults"].to_i > 0
        bibl_uuid = json["nyplAPI"]["response"]["uuid"]
      end
     
      return bibl_uuid
    end
98925
def get_image(vm_):
    '''
    
    '''
    vm_image = config.get_cloud_config_value('image', vm_, __opts__).encode(
        'ascii', 'salt-cloud-force-ascii'
    )

    images = avail_images()
    for key, value in six.iteritems(images):
        if vm_image and vm_image in (images[key]['id'], images[key]['name']):
            return images[key]

    raise SaltCloudNotFound(
        'The specified image, \'{0}\', could not be found.'.format(vm_image)
    )
309130
def as_json(options={})
      self.attributes.merge({
        :images => if self.product_images.any?
          self.product_images
        else
          [self.product.product_images.first]
        end
      })
    end
980494
def get_image(self, digest, blob, mime_type, index, size=500):
        """"""
        # Special case, for now (XXX).
        if mime_type.startswith("image/"):
            return ""

        cache_key = f"img:{index}:{size}:{digest}"
        return self.cache.get(cache_key)
1120011
def get_image(self, path):
        """"""
        image = ''
        name = os.path.basename(path)
        if not StockImage.is_registered(name):
            ipath = self.__find_image(path)
            if ipath is not None:
                StockImage.register(name, ipath)
            else:
                msg = "Image '{0}' not found in resource paths.".format(name)
                logger.warning(msg)
        try:
            image = StockImage.get(name)
        except StockImageException:
            # TODO: notify something here.
            pass
        return image
1183602
def get_image(verbose=False):
  """"""
  base_data = tf.constant(image_data(verbose=verbose))
  base_image = tf.image.decode_image(base_data, channels=3)
  base_image.set_shape((IMAGE_HEIGHT, IMAGE_WIDTH, 3))
  parsed_image = tf.Variable(base_image, name='image', dtype=tf.uint8)
  return parsed_image
66421
def get_album(self, id):
        """"""
        url = self._base_url + "/3/album/{0}".format(id)
        json = self._send_request(url)
        return Album(json, self)
563936
def get_photos_info(photoset_id):
    
    args = _get_request_args(
        'flickr.photosets.getPhotos',
        photoset_id=photoset_id
    )
    resp = requests.post(API_URL, data=args)
    resp_json = json.loads(resp.text.encode('utf-8'))
    logger.debug(resp_json)
    photos = resp_json['photoset']['photo']
    return photos
1338739
def update_image(self, image_id, user_name, desc=None):
        """"""
        desc = desc if desc else ''
        data = {"username": user_name,
                "description": desc}

        return self._post('/images/%s' % image_id, data)
480095
def _get(self, key, identity='image'):
        
        value = self._get_raw(add_prefix(key, identity))

        if not value:
            return None

        if identity == 'image':
            return deserialize_image_file(value)

        return deserialize(value)
1005709
public static function getImages($id)
    {
        global $config;
        $events=self::getEvents($id);
        $img=new archiImage();
        foreach ($events as $event) {
            $params = array("select"=>"hi1.idImage, hi1.dateUpload, hi1.idHistoriqueImage", "idEvenement"=>$event["idEvenementAssocie"]);
            $res=$config->connexionBdd->requete($img->getImagesFromEvenement($params));
            while ($image=mysql_fetch_object($res)) {
                $return[] =$image;
            }
        }
        return $return;
    }