Gallery

There’s nothing like a beautiful photo gallery!

Create an image or video gallery for your mobile apps, website or web apps easily.

  • User submit photos or videos for moderation.

  • Admins can upload photos directly.

  • Once approved by you, the gallery can be published live in real-time.

  • Embed Gallery for Mobile Apps, Website, TV’s, POS or large screens

This module not only helps you create a photo gallery but also enables users to submit their own photographs and videos. Our Gallery module has several API’s from uploading the images, organising the images into albums, change the status of the images from pending, approve and reject. It also gives you an ability to group images into a particular Album also also add tags to images.

Our gallery API accepts both images and video files. We do have a soft limit of 5MB as file size. This can be easily modified. However the ability to modify this using an API is blocked.

Image APIs:

Our image API’s allow us to upload, retrieval and update the image files that are references from our Gallery API’s

Upload image

Upload the raw data of the image to the platform. This API supports both image and video formats.

UPLOAD https://live.mobiddiction.com/api/media/uploadImage
Content-Type: "multipart/form-data"
Payload:
{
  "name": "image name"
  "file": image data
}

Update image

When you upload am image to the platform, you get imageid in the response. We can update this image object with other information using our update API’s

PUT https://live.aotomot.com/api/image/{imageid}
Content-Type: "application/json"
Payload:
{
   &quot;id&quot;:<imageid>,
   &quot;name&quot;:&quot;Sample image 1.&quot;,
   &quot;state&quot;:PENDING,
   &quot;favourite&quot;:false,
   &quot;deleted&quot;:false,
   &quot;note&quot;:&quot;small description of the image&quot;,
   &quot;tags&quot;:[ &quot;Bathroom&quot;, &quot;Bedroom&quot;]
}

Retrieve image

These API’s can be used to get the images base on a multiple criteria. This will let you get the entire image object with the help of a specific attribute.

/******* when resposne is a single image object **********/
GET https://live.mobiddiction.com/api/image/byURL?url={image_url}
GET https://live.aotomot.com/api/image/get/{id}

Content-Type: &quot;application/json&quot;

Response: 
{
   &quot;createdBy&quot;:&quot;user email&quot;,
   &quot;createdDate&quot;:1592860980000,
   &quot;lastModifiedBy&quot;:&quot;mobidied user email&quot;,
   &quot;lastModifiedDate&quot;:1592860981000,
   &quot;id&quot;:<imageid>,
   &quot;name&quot;:&quot;Test photo&quot;,
   &quot;state&quot;:null,
   &quot;url&quot;:&quot;https://testdomain.com/testimage.jpg&quot;,
   &quot;favourite&quot;:true,
   &quot;deleted&quot;:false,
   &quot;note&quot;:null,
   &quot;expiry&quot;:null,
   &quot;tags&quot;:[

   ],
   &quot;listOrder&quot;:null,
   &quot;profile&quot;:false
}

/******* when resposne is an array of image objects **********/
GET https://live.mobiddiction.com/api/image 
GET https://live.mobiddiction.com/api/image/listByUserId?Id={userid}
GET https://live.mobiddiction.com/api/image/listByGalleryId?Id={galleryId}

Content-Type: &quot;application/json&quot;

Response: 
[{
   &quot;createdBy&quot;:&quot;user email&quot;,
   &quot;createdDate&quot;:1592860980000,
   &quot;lastModifiedBy&quot;:&quot;mobidied user email&quot;,
   &quot;lastModifiedDate&quot;:1592860981000,
   &quot;id&quot;:<imageid>,
   &quot;name&quot;:&quot;Test photo&quot;,
   &quot;state&quot;:null,
   &quot;url&quot;:&quot;https://testdomain.com/testimage.jpg&quot;,
   &quot;favourite&quot;:true,
   &quot;deleted&quot;:false,
   &quot;note&quot;:null,
   &quot;expiry&quot;:null,
   &quot;tags&quot;:[

   ],
   &quot;listOrder&quot;:null,
   &quot;profile&quot;:false
},
{
   &quot;createdBy&quot;:&quot;user email&quot;,
   &quot;createdDate&quot;:1592860980000,
   &quot;lastModifiedBy&quot;:&quot;mobidied user email&quot;,
   &quot;lastModifiedDate&quot;:1592860981000,
   &quot;id&quot;:<imageid>,
   &quot;name&quot;:&quot;Test photo&quot;,
   &quot;state&quot;:null,
   &quot;url&quot;:&quot;https://testdomain.com/testimage.jpg&quot;,
   &quot;favourite&quot;:true,
   &quot;deleted&quot;:false,
   &quot;note&quot;:null,
   &quot;expiry&quot;:null,
   &quot;tags&quot;:[

   ],
   &quot;listOrder&quot;:null,
   &quot;profile&quot;:false
}]

Create an Album:

After the image/video file has been uploaded to the platform use our gallery api’s to create and modify the gallery. The platform has the ability to create multiple galleries and also has the ability to create nested galleries. The parentId takes the gallery id. This is used if we want to create a nested gallery. parentId will remain null otherwise. You can make this gallery available for everyone by setting the public filed to true. If you wish to keep this gallery to be shared with select few people then add their userId under sharedUserId.

POST https://live.mobiddiction.com/api/gallery
Content-Type: &quot;application/json&quot;
Payload:
{
   &quot;createdBy&quot;:&quot;user email&quot;,
   &quot;createdDate&quot;:1592453499000,
   &quot;lastModifiedBy&quot;:&quot;user email&quot;,
   &quot;lastModifiedDate&quot;:1592453499000,
   &quot;parentId&quot;:null,
   &quot;name&quot;:&quot;Test Gallery&quot;,
   &quot;defaultGallery&quot;:false,
   &quot;sharedUserId&quot;:[
      <userid1>,
      <userid2>
   ],
   &quot;sendNotificationsToUser&quot;:false,
   &quot;public&quot;:false
}

Adding images to your Album:

After you have uploaded the files and created your albums/bucket, its time to organise your images into your albums. Our platform makes this very easy to do so. We GalleryImage object lets you do the same. create a gallery item with any file that you have uploaded and assign that the album you have created. This gives the admin user the ability to monitor what images can be made public and should be rejected.

POST https://live.mobiddiction.com/api/galleryImage
Content-Type: &quot;application/json&quot;
Payload:
{
   &quot;name&quot;:&quot;Travel photography&quot;,
   &quot;galleryId&quot;:1,
   &quot;description&quot;:&quot;&quot;,
   &quot;note&quot;:&quot;&quot;,
   &quot;adminNote&quot;:&quot;&quot;,
   &quot;imageId&quot;:<imageId>,
   &quot;approvalStatus&quot;:&quot;APPROVED&quot;,
   &quot;tags&quot;:[
   &quot;tag1&quot;,
   &quot;tag2&quot;
   ]
}

See the Gallery in Action: Sydney ThundAR at the BBL for HomeWorld on the app, IPTV and large format screen and at the Sydney Royal EasterShow social wall on the apps, web and digital screens.