Returns all the brands of cameras that Flickr knows about.

This method does not require authentication.


@return List of Brands
@throws FlickrException
431372
public List<Camera> getBrandModels(String strBrand) throws FlickrException {
        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("method", METHOD_GET_BRAND_MODELS);
        parameters.put("brand", strBrand);

        Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
        if (response.isError()) {
            throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
        }

        List<Camera> lst = new ArrayList<Camera>();
        Element mElement = response.getPayload();
        NodeList cameraElements = mElement.getElementsByTagName("camera");
        for (int i = 0; i < cameraElements.getLength(); i++) {
            Element cameraElement = (Element) cameraElements.item(i);
            Camera cam = new Camera();
            cam.setId(cameraElement.getAttribute("id"));
            cam.setName(XMLUtilities.getChildValue(cameraElement, "name"));

            NodeList detailsNodes = cameraElement.getElementsByTagName("details");
            int n = detailsNodes.getLength();
            if (n == 1) {
                Element detailElement = (Element) detailsNodes.item(0);
                Details detail = new Details();
                cam.setDetails(detail);
                detail.setMegapixels(XMLUtilities.getChildValue(detailElement, "megapixels"));
                detail.setZoom(XMLUtilities.getChildValue(detailElement, "zoom"));
                detail.setLcdSize(XMLUtilities.getChildValue(detailElement, "lcd_screen_size"));
                detail.setStorageType(XMLUtilities.getChildValue(detailElement, "memory_type"));
            }

            NodeList imageNodes = cameraElement.getElementsByTagName("images");
            n = imageNodes.getLength();
            if (n == 1) {
                Element imageElement = (Element) imageNodes.item(0);
                cam.setSmallImage(XMLUtilities.getChildValue(imageElement, "small"));
                cam.setLargeImage(XMLUtilities.getChildValue(imageElement, "large"));
            }

            lst.add(cam);
        }

        return lst;
    }
1080672
public java.util.List<ProductCode> getProductCodes() {
        if (productCodes == null) {
            productCodes = new com.amazonaws.internal.SdkInternalList<ProductCode>();
        }
        return productCodes;
    }
1353849
public Gallery lookupGallery(String galleryId) throws FlickrException {

        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("method", METHOD_LOOKUP_GALLERY);
        parameters.put("url", galleryId);

        Response response = transport.get(transport.getPath(), parameters, apiKey, sharedSecret);
        if (response.isError()) {
            throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
        }

        Element galleryElement = response.getPayload();
        Gallery gallery = new Gallery();
        gallery.setId(galleryElement.getAttribute("id"));
        gallery.setUrl(galleryElement.getAttribute("url"));

        User owner = new User();
        owner.setId(galleryElement.getAttribute("owner"));
        gallery.setOwner(owner);
        gallery.setCreateDate(galleryElement.getAttribute("date_create"));
        gallery.setUpdateDate(galleryElement.getAttribute("date_update"));
        gallery.setPrimaryPhotoId(galleryElement.getAttribute("primary_photo_id"));
        gallery.setPrimaryPhotoServer(galleryElement.getAttribute("primary_photo_server"));
        gallery.setVideoCount(galleryElement.getAttribute("count_videos"));
        gallery.setPhotoCount(galleryElement.getAttribute("count_photos"));
        gallery.setPrimaryPhotoFarm(galleryElement.getAttribute("farm"));
        gallery.setPrimaryPhotoSecret(galleryElement.getAttribute("secret"));

        gallery.setTitle(XMLUtilities.getChildValue(galleryElement, "title"));
        gallery.setDesc(XMLUtilities.getChildValue(galleryElement, "description"));
        return gallery;
    }
20478
public PhotoList<Photo> getClusterPhotos(String tag, String clusterId) throws FlickrException {

        PhotoList<Photo> photos = new PhotoList<Photo>();
        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("method", METHOD_GET_CLUSTER_PHOTOS);

        parameters.put("tag", tag);
        parameters.put("cluster_id", clusterId);

        Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
        if (response.isError()) {
            throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
        }

        Element photosElement = response.getPayload();
        NodeList photoNodes = photosElement.getElementsByTagName("photo");
        photos.setPage("1");
        photos.setPages("1");
        photos.setPerPage("" + photoNodes.getLength());
        photos.setTotal("" + photoNodes.getLength());
        for (int i = 0; i < photoNodes.getLength(); i++) {
            Element photoElement = (Element) photoNodes.item(i);
            photos.add(PhotoUtils.createPhoto(photoElement));
        }
        return photos;
    }
765378
@XmlElementWrapper(name="images")
    @XmlElement(name="im", type=Im.class)
    public List<Im> getImages() {
        return images;
    }
783781
public Collection<User> getFavorites(String photoId, int perPage, int page) throws FlickrException {
        Map<String, Object> parameters = new HashMap<String, Object>();

        parameters.put("method", METHOD_GET_FAVORITES);

        parameters.put("photo_id", photoId);

        if (perPage > 0) {
            parameters.put("per_page", Integer.toString(perPage));
        }

        if (page > 0) {
            parameters.put("page", Integer.toString(page));
        }

        Response response = transport.get(transport.getPath(), parameters, apiKey, sharedSecret);
        if (response.isError()) {
            throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
        }
        List<User> users = new ArrayList<User>();

        Element userRoot = response.getPayload();
        NodeList userNodes = userRoot.getElementsByTagName("person");
        for (int i = 0; i < userNodes.getLength(); i++) {
            Element userElement = (Element) userNodes.item(i);
            User user = new User();
            user.setId(userElement.getAttribute("nsid"));
            user.setUsername(userElement.getAttribute("username"));
            user.setFaveDate(userElement.getAttribute("favedate"));
            users.add(user);
        }
        return users;
    }
1234895
public PersonTagList<PersonTag> getList(String photoId) throws FlickrException {

        // Delegating this to photos.people.PeopleInterface - Naming standard would be to use PeopleInterface but having 2 the same name can cause issues
        com.flickr4java.flickr.photos.people.PeopleInterface pi = new com.flickr4java.flickr.photos.people.PeopleInterface(apiKey, sharedSecret, transportAPI);
        return pi.getList(photoId);
    }
1372400
public java.util.List<DBSnapshotAttribute> getDBSnapshotAttributes() {
        if (dBSnapshotAttributes == null) {
            dBSnapshotAttributes = new com.amazonaws.internal.SdkInternalList<DBSnapshotAttribute>();
        }
        return dBSnapshotAttributes;
    }
552391
public Collection<Service> getServices() throws FlickrException {
        List<Service> list = new ArrayList<Service>();
        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("method", METHOD_GET_SERVICES);

        Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret);
        if (response.isError()) {
            throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
        }
        Element servicesElement = response.getPayload();
        NodeList serviceNodes = servicesElement.getElementsByTagName("service");
        for (int i = 0; i < serviceNodes.getLength(); i++) {
            Element serviceElement = (Element) serviceNodes.item(i);
            Service srv = new Service();
            srv.setId(serviceElement.getAttribute("id"));
            srv.setName(XMLUtilities.getValue(serviceElement));
            list.add(srv);
        }
        return list;
    }
334958
public List<TiffObject> getIfdsAndSubIfds() {
    List<TiffObject> all = new ArrayList<TiffObject>();
    all.addAll(getMetadataList("IFD"));
    all.addAll(getMetadataList("SubIFDs"));
    return all;
  }
1253312
public ImageUrlResources imageUrlResources() {
        if (imageUrls.get() == null) {
            imageUrls.compareAndSet(null, new ImageUrlResourcesImpl(this));
        }
        return imageUrls.get();
    }
606320
public java.util.List<String> getSnapshotIdentifierList() {
        if (snapshotIdentifierList == null) {
            snapshotIdentifierList = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return snapshotIdentifierList;
    }
1000466
public PhotoList<Photo> search(SearchParameters params, int perPage, int page) throws FlickrException {
        PhotoList<Photo> photos = new PhotoList<Photo>();

        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("method", METHOD_SEARCH);

        parameters.putAll(params.getAsParameters());

        if (perPage > 0) {
            parameters.put("per_page", "" + perPage);
        }
        if (page > 0) {
            parameters.put("page", "" + page);
        }

        Response response = transport.get(transport.getPath(), parameters, apiKey, sharedSecret);
        if (response.isError()) {
            throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
        }
        Element photosElement = response.getPayload();
        photos.setPage(photosElement.getAttribute("page"));
        photos.setPages(photosElement.getAttribute("pages"));
        photos.setPerPage(photosElement.getAttribute("perpage"));
        photos.setTotal(photosElement.getAttribute("total"));

        NodeList photoNodes = photosElement.getElementsByTagName("photo");
        for (int i = 0; i < photoNodes.getLength(); i++) {
            Element photoElement = (Element) photoNodes.item(i);
            photos.add(PhotoUtils.createPhoto(photoElement));
        }
        return photos;
    }
114805
public java.util.List<String> getTokenNameList() {
        if (tokenNameList == null) {
            tokenNameList = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return tokenNameList;
    }
1104754
public java.util.List<ResourceTag> getResourceTagList() {
        if (resourceTagList == null) {
            resourceTagList = new com.amazonaws.internal.SdkInternalList<ResourceTag>();
        }
        return resourceTagList;
    }
548400
public function getCardTypes()
    {
        $card = new CreditCard();
        $brands = $card->getSupportedBrands();

        foreach ($brands as $brand => $x) {
            $brands[$brand] = _t('CreditCard.'.strtoupper($brand), $brand);
        }

        return $brands;
    }
367350
def get_image_tags(self):
        
        current_images = self.images()
        tags = {tag: i['Id'] for i in current_images for tag in i['RepoTags']}
        return tags