MailChimp Email Marketing

API Overview

The Pictaculous API is quite a simple one that simply allows you to make a HTTP POST request to our webservice and have the generated color palettes returned as a serialized JSON encoded object.

API Endpoint: http://pictaculous.com/api/1.0/

Currently there is only one function for this API, so nothing is required except the one parameter.

Parameter: image

The image parameter should be the binary file data for the image you would like analyzed - PNG, GIF, JPG only. Files cannot be larger than 500k.

Returned data:

  • info - basic info about the image submitted
    • colors - an array containing the 6 suggested color codes (hex) to use with the image
    • url - a url to the image we received and stored
  • kuler_themes - an array containing palette information from Adobe Kuler based on the suggested color palette. Each entry contains:
    • id - the Kuler theme id
    • title - the theme title
    • colors - an array containing the 6 color codes (hex) in the theme
    • author - the theme's author
    • rating - the theme's rating
    • url - the url for the theme
    • thumb - the url to a thumbnail image for the theme
  • cl_themes - an array containing palette information from Colour Lovers based on the suggested color palette. Each entry contains:
    • id - the Colour Lovers theme id
    • title - the theme title
    • description - a description of the theme
    • colors - an array containing the 6 color codes (hex) in the theme
    • author - the theme's author
    • userName - the theme's author's username
    • dateCreated - the date the theme was created (YYYY-mm-dd HH:ii:ss)
    • rating - the theme's rating
    • rank - the theme's overall rank
    • numVotes - the number of votes the theme's received
    • numViews - the number of views the theme's received
    • numHearts - the number of users who have "hearted" the theme
    • numComments - the number of comments the theme's received
    • url - the url for the theme
    • imageUrl - the url for an image representing the theme
    • badge - the url for a badge image representing the theme
    • badgeUrl - the url for a badge image representing the theme
    • apiUrl - the API url for the theme
    • thumb - the url to a thumbnail image for the theme

Example PHP Code for calling the API:

  1.  
  2. <?php
  3. $ch = curl_init();
  4. $url = 'http://pictaculous.com/api/1.0/';
  5.  
  6. $fields = array('image'=>file_get_contents('picttest.jpg'));
  7.  
  8. # Set some default CURL options
  9. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  10. curl_setopt($ch, CURLOPT_HEADER, false);
  11. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
  12. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  13. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  14. curl_setopt($ch, CURLOPT_POST, true);
  15. curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
  16. curl_setopt($ch, CURLOPT_URL, $url);
  17.  
  18. $json = curl_exec($ch);
  19. echo "\n".$json."\n";
  20.  

Need Support?

Subscribe to MailChimp API Discuss
Email:

Search MailChimp API Discuss
Terms:

Visit this group