Download the PHP package imagin/fotolia-api without Composer

On this page you can find all versions of the php package imagin/fotolia-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package fotolia-api

Fotolia API Kits

Olivier Sirven [email protected] Fotolia.com

Introduction

Fotolia's industry-leading API allows developers and businesses to quickly integrate a vast database of images in their workflows and business models.

Whether you're developing an application with millions of photos, or integrating a stock photography library into your business to increase customer satisfaction, Fotolia's powerful APIs are key. But technical excellence is only part of the formula – our business development team will work with you to determine the best way to maximize results.

Fotolia's API line-up

Partner API

Our Partner API allows you to embed royalty-free image search into your website.

Learn more

Business API

Our Business API is for on-demand businesses producing custom merchandise and products, including web site templates and printed materials.

Learn more

Reseller API

Our Reseller API allows you to sell Fotolia's images under your brand name to your customers.

Learn more

Content of this package

This package contains a full implementation of the API for PHP, python and java. Each provides an example file to show how to use it.

PHP

Requirements:

.Example usage

#!/usr/bin/env php

// loggin in and retrieving user data
$api->loginUser('your_login', 'your_password');
print_r($api->getUserData());

// purchasing and downloading a file
$dl_data = $api->getMedia(35957426, 'XS');
$api->downloadMedia($dl_data['url'], '/tmp/' . $dl_data['name']);

Python

Requirements:

.Example usage

#!/usr/bin/env python

import fotolia_api

api = fotolia_api.FotoliaApi('your_api_key')

# searching for files
results = api.get_search_results({'words': 'car', 'language_id': fotolia_api.LANGUAGE_ID_EN_US, 'limit': 1})
print "Found %d results" % results['nb_results']

for key, value in results.items():
    try:
        int(key)
        print "matching media ID: %d" % value['id']
    except ValueError:
        # iterating only over numeric keys and silently skip other keys
        pass

# loggin in and retrieving user data
api.login_user('your_login', 'your_password')
print api.get_user_data()

# purchasing and downloading a file
dl_data = api.get_media(35957426, 'XS')
api.download_media(dl_data['url'], '/tmp/' + str(dl_data['name']))

Java

Requirements:

A simple Makefile is provided to help using it. It supports following commands:

build:: Build the entire package

jar:: Create a JAR file for easy inclusion

clean:: Clean the build files

example:: Build the example program

.Example usage

import org.webservice.fotolia.*;
import org.json.simple.JSONObject;

public class example
{
    public static void main(String[] args)
    {
        FotoliaApi client = new FotoliaApi("your_api_key");

        // fetching a media data
        System.out.println(client.getMediaData(18136053));

        // searching files
        FotoliaSearchQuery query = new FotoliaSearchQuery();
        query.setWords("car").setLanguageId(FotoliaApi.LANGUAGE_ID_EN_US).setLimit(1);
        System.out.println(client.getSearchResults(query));

        // buying and downloading a file
        try {
            client.loginUser("your_login", "your_password");
            JSONObject res = client.getMedia(35957426, "XS");
            client.downloadMedia((String) res.get("url"), "/tmp/" + (String) res.get("name"));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

Informations

Email: [email protected]

Google Groups

Online Documentation


All versions of fotolia-api with dependencies

PHP Build Version
Package Version
Requires php Version >=5.2.0
ext-curl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package imagin/fotolia-api contains the following files

Loading the files please wait ....