Skip to content
x1s edited this page Jul 22, 2012 · 7 revisions

Photos

Method Auth? URL
GET true /photo?token=:token[&idProduct=idProduct]
all photos from the token or idProduct an array with the photos
[] - none photo
[
   {
      "name":"500c815af35ab3.jpg",
      "size":268814,
      "type":"image\/jpeg",
      "url":"\/images\/u\/token\/500c815af35ab3.jpg",
      "thumbnail_url":"\/images\/u\/token\/tn1-500c815af35ab3.jpg",
      "thumbGallery_url":"\/images\/u\/token\/tn2-500c815af35ab3.jpg",
      "tinyThumb_url":"\/images\/u\/token\/tn3-500c815af35ab3.jpg",
      "delete_url":"http:\/\/gsapi.local\/photo\/500c815af35ab3.jpg?token=token",
      "delete_type":"DELETE"
   },
   {
      "name":"500c815af35ab3.jpg",
      "size":268814,
      "type":"image\/jpeg",
      "url":"\/images\/u\/token\/500c815af35ab3.jpg",
      "thumbnail_url":"\/images\/u\/token\/tn1-500c815af35ab3.jpg",
      "thumbGallery_url":"\/images\/u\/token\/tn2-500c815af35ab3.jpg",
      "tinyThumb_url":"\/images\/u\/token\/tn3-500c815af35ab3.jpg",
      "delete_url":"http:\/\/gsapi.local\/photo\/500c815af35ab3.jpg?token=token",
      "delete_type":"DELETE"
   },
   {},...
]
GET true /photo/:photo?token=:token&photo=:photo
the photo in a array
[
   {
      "name":"500c815af35ab3.jpg",
      "size":268814,
      "type":"image\/jpeg",
      "url":"\/images\/u\/token\/500c815af35ab3.jpg",
      "thumbnail_url":"\/images\/u\/token\/tn1-500c815af35ab3.jpg",
      "thumbGallery_url":"\/images\/u\/token\/tn2-500c815af35ab3.jpg",
      "tinyThumb_url":"\/images\/u\/token\/tn3-500c815af35ab3.jpg",
      "delete_url":"http:\/\/gsapi.local\/photo\/500c815af35ab3.jpg?token=token",
      "delete_type":"DELETE"
   }
]
POST true /photo/token=:token

upload without product (session scope) array of files

files = [file1.jpg, file2.jpg]
Content-Disposition: form-data; name="files[]"; filename="foto1.jpg, foto2.jpg,..."
Content-Type: image/jpeg

photo to a product idProduct=:idProduct files=[file1.jpg, file2.jpg]

return

</td>
DELETE true /photo/:photo/token=:token&idProduct=:idProduct
return
</td>

Clone this wiki locally