This module enables you to create your own photo gallery on the cloud. You can create, retrieve, remove and manage you photo albums on the cloud. This service is very useful for developers who want to integrate Photo Gallery functionality to their Mobile/Device and Web Apps. Gallery API gives a complete Photo Gallery services and reduces the footprint on the device. Developers can focus on other Gallery aspects such as how to render the Photo Gallery thereby reducing development time. Functions available in Gallery API are as listed below:

Initialize

In order to use various functions available in a specific API, a developer has to create an instance of ServiceAPI by passing the apiKey and secretKey which will be created after the app creation from AppHQ dashboard.

Required Parameters

apiKey - The Application key given when the application was created. secretKey - The secret key corresponding to the application key given when the application was created.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
ServiceAPI api = new ServiceAPI("API_KEY","SECRET_KEY");
ServiceAPI api = new ServiceAPI("API_KEY","SECRET_KEY");
ServiceAPI *api = [[ServiceAPI alloc]init];
api.apiKey = @"<API_KEY>";
api.secretKey = @"<SECRET_KEY>"; 
ServiceAPI api = new ServiceAPI("API_KEY","SECRET_KEY");
ServiceAPI api = new ServiceAPI("API_KEY","SECRET_KEY");
Coming Soon
App42.initialize("API_KEY","SECRET_KEY");
ServiceAPI api = new ServiceAPI("API_KEY","SECRET_KEY");
$api = new ServiceAPI("API_KEY","SECRET_KEY"); 
Coming Soon
api = App42::ServiceAPI.new("<API_KEY>","<SECRET_KEY>") 
Coming Soon 
Coming Soon

Build Service

After initialization, developer needs to call the buildXXXService method on ServiceAPI instance to get the instance of the particular API that you wish to build. For example, To build an instance of AlbumService, buildAlbumService() method needs to be called.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
AlbumService albumService = api.buildAlbumService(); 
PhotoService photoService = api.buildPhotoService(); 
AlbumService albumService = api.BuildAlbumService();  
PhotoService photoService = api.BuildPhotoService();  
AlbumService *albumService = [api buildAlbumService]; 
PhotoService *photoService = [api buildPhotoService]; 
AlbumService albumService = api.buildAlbumService();
PhotoService photoService = api.buildPhotoService(); 
AlbumService albumService = api.buildAlbumService(); 
PhotoService photoService = api.buildPhotoService(); 
Coming Soon
var albumService  = new App42Album();
var photoService  = new App42Photo();
AlbumService albumService = api.BuildAlbumService(); 
PhotoService photoService = api.BuildPhotoService(); 
$albumService = $api->buildAlbumService(); 
$photoService = $api->buildPhotoService(); 
Coming Soon
album_service = api.build_album_service() 
Coming Soon 
Coming Soon

Import Statement

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
 
import com.shephertz.app42.paas.sdk.android.ServiceAPI;
import com.shephertz.app42.paas.sdk.android.App42Response;
import com.shephertz.app42.paas.sdk.android.App42Exception;
import com.shephertz.app42.paas.sdk.android.App42BadParameterException;
import com.shephertz.app42.paas.sdk.android.App42NotFoundException;
import com.shephertz.app42.paas.sdk.android.gallery.Album;
import com.shephertz.app42.paas.sdk.android.gallery.AlbumService;
import com.shephertz.app42.paas.sdk.android.gallery.PhotoService;
using com.shephertz.app42.paas.sdk.windows;  
using com.shephertz.app42.paas.sdk.windows.gallery;   
#import "Shephertz_App42_iOS_API/Shephertz_App42_iOS_API.h"   
import com.shephertz.app42.paas.sdk.jme.ServiceAPI;
import com.shephertz.app42.paas.sdk.jme.App42Response;
import com.shephertz.app42.paas.sdk.jme.App42Exception;
import com.shephertz.app42.paas.sdk.jme.App42BadParameterException;
import com.shephertz.app42.paas.sdk.jme.App42NotFoundException;
import com.shephertz.app42.paas.sdk.jme.gallery.Album;
import com.shephertz.app42.paas.sdk.jme.gallery.AlbumService;
import com.shephertz.app42.paas.sdk.jme.gallery.PhotoService;
import com.shephertz.app42.paas.sdk.java.ServiceAPI;
import com.shephertz.app42.paas.sdk.java.App42Response;
import com.shephertz.app42.paas.sdk.java.App42Exception;
import com.shephertz.app42.paas.sdk.java.App42BadParameterException;
import com.shephertz.app42.paas.sdk.java.App42NotFoundException;
import com.shephertz.app42.paas.sdk.java.gallery.Album;
import com.shephertz.app42.paas.sdk.java.gallery.AlbumService;
import com.shephertz.app42.paas.sdk.java.gallery.PhotoService;
Coming Soon
<script type="text/javascript" src="App42-all-x.x.x.min.js">&lt;/script>
using com.shephertz.app42.paas.sdk.csharp;  
using com.shephertz.app42.paas.sdk.csharp.gallery;  
use com\shephertz\app42\paas\sdk\php\App42Response;  
use com\shephertz\app42\paas\sdk\php\App42Exception;  
use com\shephertz\app42\paas\sdk\php\App42BadParameterException;  
use com\shephertz\app42\paas\sdk\php\App42NotFoundException;  
use com\shephertz\app42\paas\sdk\php\gallery\PhotoService;    
use com\shephertz\app42\paas\sdk\php\gallery\AlbumService;  
use com\shephertz\app42\paas\sdk\php\ServiceAPI;  
include_once '../AlbumService.php';   
include_once '../PhotoService.php';  
include_once '../ServiceAPI.php';   
include_once '../App42Response.php';  
include_once '../App42Exception.php';   
include_once '../App42BadParameterException.php';  
include_once '../App42NotFoundException.php';  
Coming Soon
require 'App42_Ruby_API'
Coming Soon 
Coming Soon

Create Albums

Creates Album on the cloud.

Required Parameters

userName - The user to which the album belongs. albumName - Name of the album to be created on the cloud. description - Description of the album to be created.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
String albumName = "MyAlbum";
String description = "Album Description";	
Album album = albumService.createAlbum(userName,albumName,description);   
System.out.println("userName is " + album.getUserName());
System.out.println("albumName is " + album.getName());
String jsonResponse = album.toString();    
public class Callback : App42Callback  
{  
 String userName = "Nick";
 String albumName = "My Album";
 String description = "Album Description";	
 albumService.CreateAlbum(userName,albumName,description,this); 
 void App42Callback.OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
	Album album = (Album) response;     
	jsonResponse = album.ToString();  
	}  
}  
NSString *userName = @"Nick";
NSString *albumName = @"My Album";
NSString *description = @"nick@shephertz.co.in";
Album *album = [albumService createAlbum:userName albumName:albumName description:description]; 
NSLog(@"userName is %@" , album.userName);
NSLog(@"albumName is %@" ,  album.albumName);
NSString *jsonResponse = [album toString]; 
String userName = "Nick";
String albumName = "My Album";
String description = "Album Description";	
Album album = albumService.createAlbum(userName,albumName,description);   
System.out.println("userName is " + album.getUserName());
System.out.println("albumName is " + album.getName());
String jsonResponse = album.toString();    
String userName = "Nick";
String albumName = "My Album";
String description = "Album Description";	
Album album = albumService.createAlbum(userName,albumName,description);   
System.out.println("userName is " + album.getUserName());
System.out.println("albumName is " + album.getName());
String jsonResponse = album.toString();    
Coming Soon
var userName = "Nick";  
var albumName = "My Album";  
var description = "Album Description";  
var result ;  
albumService.createAlbum(userName,albumName,description,{  
success: function(object) {  
  var albumObj = JSON.parse(object);  
  result = albumObj.app42.response.albums.album;
  console.log("userName is " + result.userName)
  console.log("albumName is " + result.albumName)
},  
error: function(error) {  
}  
}); 
String userName = "Nick";
String albumName = "My Album";
String description = "Album Description";	
Album album = albumService.CreateAlbum(userName,albumName,description);   
Console.WriteLine("userName is " + album.GetUserName());
Console.WriteLine("albumName is " + album.GetName());
String jsonResponse = album.ToString();         
$userName = "Nick";
$albumName = "My Album";
$description = "Album Description";
$album = $albumService->CreateAlbum($userName, $albumName, $description); 
print_r("userName is " . $album->getUserName());
print_r("albumName is " . $album->getName());
$jsonResponse = $album->toString(); 
Coming Soon
user_name = "Nick";
album_name = "MyAlbum";
album_description = "Album Description";						
album = album_service.create_album(user_name, album_name, album_description); 
puts "albumName is #{album.album_name}";
puts "userName is #{album.user_name}";
puts "albumDescription is #{album.album_description}";
json_response = album.to_s(); 
Coming Soon 
Coming Soon 

Get Albums

Fetches all the Albums based on the userName.

Required Parameters

userName - Name of the user for which the albums have to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
ArrayList<Album> album = albumService.getAlbums(userName);   
System.out.println("userName is " + album.get(0).getUserName());
System.out.println("albumName is " + album.get(0).getName());
String jsonResponse = album.get(0).toString();    
public class Callback : App42Callback  
{  
String userName = "Nick";
albumService.GetAlbums(userName,this); 
	void App42Callback.OnException(App42Exception exception)  
	{  
	 Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
	 IList<Album> album = (Ilist<Album>) response;     
	 String jsonResponse = album[0].ToString();  
	}  
}  
NSString *userName = @"Nick";
NSArray *album = [albumService getAlbums:userName]; 
NSLog(@"userName is %@" , [[album objectAtIndex:0] userName);
NSLog(@"albumName is %@" ,  [[album objectAtIndex:0] name);
NSString *jsonResponse = [album toString]; 
String userName = "Nick";
Vector album = albumService.getAlbums(userName);   
System.out.println("userName is " + ((Album)album.elementAt(0)).getUserName());
System.out.println("albumName is " + ((Album)album.elementAt(0)).getName());
String jsonResponse = ((Album)album.elementAt(0)).toString();    
  String userName = "Nick";
  ArrayList<Album> album = albumService.getAlbums(userName);   
  System.out.println("userName is " + album.get(0).getUserName());
  System.out.println("albumName is " + album.get(0).getName());
  String jsonResponse = album.get(0).toString();    
Coming Soon
var userName = "Nick",
result ;  
albumService.getAlbums(userName,{  
	success: function(object) {  
	var albumObj = JSON.parse(object);  
	result = albumObj.app42.response.albums.album;
	console.log("userName is " + result[0].userName)
	console.log("albumName is " + result[0].name)
	},  
	error: function(error) {  
	}  
	}); 
String userName = "Nick";
IList<Album> album = albumService.GetAlbums(userName);   
Console.WriteLine("userName is " + album[0].GetUserName());
Console.WriteLine("albumName is " + album[0].GetName());
String jsonResponse = album[0].ToString();         
$userName = "Nick";
$album = $albumService->getAlbums($userName); 
print_r("userName is " . $album[0]->getUserName());
print_r("albumName is " . $album[0]->getName());
$jsonResponse = $album[0]->toString(); 
Coming Soon
user_name = "Nick";						
album_list  = Array.new();
album_list = album_service.get_albums(user_name); 
for album in album_list do
  puts "albumName is #{album.album_name}";
  puts "userName is #{album.user_name}";
  puts "albumDescription is #{album.album_description}";
end
json_response = album_list.to_s();
Coming Soon 
Coming Soon 

Get Albums Count

Fetches the count of all the Albums based on the userName.

userName - The user for which the count of albums have to be fetched

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
App42Response response = albumService.getAlbumsCount(userName); 
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
public class Callback : App42Callback  
{  
String userName = "Nick";
albumService.GetAlbumsCount(userName,this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
	Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
	App42Response user = (App42Response) response;     
	String jsonResponse = user.ToString();  
	}  
}  
NSString *userName = @"Nick";
App42Response *response = [albumService getAlbumsCount:userName]; 
NSString *success = response.isResponseSuccess;
NSString *jsonResponse = [response toString];                             
String userName = "Nick";
App42Response response = albumService.getAlbumsCount(userName); 
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
String userName = "Nick";
App42Response response = albumService.getAlbumsCount(userName); 
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
Coming Soon
Coming Soon
String userName = "Nick";
App42Response response = albumService.GetAlbumsCount(); 
Boolean  success = response.IsResponseSuccess();
String jsonResponse = response.ToString(); 
$userName = "Nick";
$response = $albumService->getAlbumsCount(); 
$success = $respons->isResponseSuccess();
$jsonResponse = $respons->toString(); 
Coming Soon
user_name = "Nick";					
response = album_service.get_albums_count(user_name);
success = response.is_response_success();
total_records = response.total_records();
json_response = response.to_s();
Coming Soon 
Coming Soon 

Get Albums Paging

Fetches all the Albums based on the userName.

Required Parameters

userName - Name of the user for which the albums have to be fetched. max - Maximum number of records to be fetched. offset - From where the records are to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
int max = 1;
int offset = 0 ;
ArrayList<Album> album = albumService.getAlbums(userName,max,offset);   
System.out.println("userName is " + album.get(0).getUserName());
System.out.println("albumName is " + album.get(0).getName());
String jsonResponse = album.get(0).toString();    
public class Callback : App42Callback  
{  
String userName = "Nick";
int max = 1;
int offset = 0 ;
albumService.GetAlbums(userName,max,offset,this); 
	void App42Callback.OnException(App42Exception exception)  
	{  
	 Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
	 IList<Album> album = (Ilist<Album>) response;     
	 String jsonResponse = album[0].ToString();  
	}  
}  
NSString *userName = @"Nick";
int max = 1;
int offset = 0 ;
NSArray *album = [albumService getAlbums:userName max:max offset:offset]; 
NSLog(@"userName is %@" , [[album objectAtIndex:0] userName);
NSLog(@"albumName is %@" ,  [[album objectAtIndex:0] name);
NSString *jsonResponse = [album toString]; 
String userName = "Nick";
Integer max = new Integer(1);
Integer offset = new Integer(0);  
Vector album = albumService.getAlbums(userName,max,offset);   
System.out.println("userName is " + ((Album)album.elementAt(0)).getUserName());
System.out.println("albumName is " + ((Album)album.elementAt(0)).getName());
String jsonResponse = ((Album)album.elementAt(0)).toString();    
String userName = "Nick";
int max = 1;
int offset = 0 ;
ArrayList<Album> album = albumService.getAlbums(userName,max,offset);   
System.out.println("userName is " + album.get(0).getUserName());
System.out.println("albumName is " + album.get(0).getName());
String jsonResponse = album.get(0).toString();    
Coming Soon
var userName = "Nick",
max = 1,
offset = 0 ,
result ;  
albumService.getAlbums(userName,max,offset,{  
	success: function(object) {  
	var albumObj = JSON.parse(object);  
	result = albumObj.app42.response.albums.album;
	console.log("userName is " + result[0].userName)
	console.log("albumName is " + result[0].name)
	},  
	error: function(error) {  
	}  
}); 
String userName = "Nick";
int max = 1;
int offset = 0 ;
IList<Album> album = albumService.GetAlbums(userName,max,offset);   
Console.WriteLine("userName is " + album[0].GetUserName());
Console.WriteLine("albumName is " + album[0].GetName());
String jsonResponse = album[0].ToString();         
$userName = "Nick";
$max = 1;
$offset = 0 ;
$album = $albumService->getAlbums($userName,$max,$offset); 
print_r("userName is " . $album[0]->getUserName());
print_r("albumName is " . $album[0]->getName());
$jsonResponse = $album[0]->toString(); 
Coming Soon
user_name = "Nick";
max = 1;
offset = 0;			
album_list  = Array.new();
album_list = album_service.get_albums_by_paging(user_name, max, offset);
for album in album_list do
  puts "albumName is #{album.album_name}";
  puts "userName is #{album.user_name}";
  puts "albumDescription is #{album.album_description}";
end
json_response = album_list.to_s();
Coming Soon 
Coming Soon 

Get Album By Name

Fetches all the Albums based on the userName.

Required Parameters

userName - Name of the user for which the albums have to be fetched. albumName - Name of the album that has to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
String albumName = "My Album";
Album album = albumService.getAlbumByName(userName,albumName);   
System.out.println("userName is " + album.getUserName());
System.out.println("albumName is " + album.getName());
String jsonResponse = album.toString();    
public class Callback : App42Callback  
{  
String userName = "Nick";
String albumName = "My Album";
albumService.GetAlbumByName(userName,albumName,this); 
	void App42Callback.OnException(App42Exception exception)  
	{  
	 Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
	 Album album = (Album) response;     
	 String jsonResponse = album.ToString();  
	}  
}  
NSString *userName = @"Nick";
NSString *albumName = @"My Album";
Album *album = [albumService getAlbumByName:userName albumName:albumName]; 
NSLog(@"userName is %@" , album.userName);
NSLog(@"albumName is %@" ,  album.name);
NSString *jsonResponse = [album toString]; 
String userName = "Nick";
String albumName = "My Album";
Album album = albumService.getAlbumByName(userName,albumName);   
System.out.println("userName is " + album.getUserName());
System.out.println("albumName is " + album.getName());
String jsonResponse = album.toString();    
String userName = "Nick";
String albumName = "My Album";
Album album = albumService.getAlbumByName(userName,albumName);   
System.out.println("userName is " + album.getUserName());
System.out.println("albumName is " + album.getName());
String jsonResponse = album.toString();    
Coming Soon
var userName = "Nick",
albumName = "My Album",
result ;  
albumService.getAlbumByName(userName,albumName,{  
	success: function(object) {  
	  var albumObj = JSON.parse(object);  
	  result = albumObj.app42.response.albums.album;
	  console.log("userName is " + result.userName)
	  console.log("albumName is " + result.name)
	},  
	error: function(error) {  
	}  
}); 
String userName = "Nick";
String albumName = "My Album";
Album album = albumService.GetAlbumByName(userName,albumName);   
Console.WriteLine("userName is " + album.GetUserName());
Console.WriteLine("albumName is " + album.GetName());
String jsonResponse = album.ToString();         
$userName = "Nick";
$albumName = "My Album";
$album = $albumService->getAlbumByName($userName,$albumName); 
print_r("userName is " . $album->getUserName());
print_r("albumName is " . $album->getName());
$jsonResponse = $album->toString(); 
Coming Soon
user_name = "Nick";
album_name = "MyAlbum";
album = album_service.get_album_by_name(user_name, album_name);   
puts "albumName is #{album.album_name}";
puts "userName is #{album.user_name}";
puts "albumDescription is #{album.album_description}";
json_response = album.to_s();
Coming Soon 
Coming Soon 

Add Photo

Adds Photo for a particular user and album. The Photo is uploaded on the cloud.

Required Parameters

userName - Name of the User whose photo has to be added. albumName - Name of the Album in which photo has to be added. photoName - Name of the Photo that has to be added. description - Description of the Photo that has to be added. filePath - Path from where Photo has to be picked for addition.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";
String description = "Photo Details";
String filePath	= "Your Local file path";					
Album album = photoService.addPhoto(userName,albumName,photoName,description,filePath);   
System.out.println("albumName is " + album.getName());
System.out.println("userName is " + album.getUserName());
String jsonResponse = album.toString();    
public class Callback : App42Callback  
{  
	String userName = "Nick";
	String albumName = "My Album";
	String photoName = "My Photo";
	String description = "Photo Details";
	String filePath	= "Your Local file path";	
	photoService.AddPhoto(userName,albumName,photoName,description,filePath,this); 
	void App42Callback.OnException(App42Exception exception)  
	{  
	 Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
	 Album album = (Album) response;     
	 String jsonResponse = album.ToString();  
	}  
}  
NSString *userName = @"Nick";
NSString *albumName = @"My Album";
NSString *photoName = @"My Photo";
NSString *description = @"Photo Details";
NSString *filePath	= @"Your Local file path";
Album *album = [photoService addPhoto:userName albumName:albumName photoName:photoName description:description filePath:filePath]; 
NSLog(@"userName is %@" , album.userName);
NSLog(@"albumName is %@" ,  album.name);
NSString *jsonResponse = [album toString]; 
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";
String description = "Photo Details";
String filePath	= "Your Local file path";					
Album album = photoService.addPhoto(userName,albumName,photoName,description,filePath);   
System.out.println("albumName is " + album.getName());
System.out.println("userName is " + album.getUserName());
String jsonResponse = album.toString();    
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";
String description = "Photo Details";
String filePath	= "Your Local file path";					
Album album = photoService.addPhoto(userName,albumName,photoName,description,filePath);   
System.out.println("albumName is " + album.getName());
System.out.println("userName is " + album.getUserName());
String jsonResponse = album.toString();    
Coming Soon
var userName = "Nick",
albumName = "My Album",
photoName = "My Photo",
description = "Photo Details",
filePath	= "Your Local file path",
result ;
photoService.addPhoto(userName,albumName,photoName,description,filePath,{  
	success: function(object) {  
	  var albumObj = JSON.parse(object);  
	  result = albumObj.app42.response.albums.album;
	  console.log("userName is " + result.userName)
	  console.log("albumName is " + result.name)
	},  
	error: function(error) {  
	}  
}); 
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";
String description = "Photo Details";
String filePath	= "Your Local file path";					
Album album = photoService.AddPhoto(userName,albumName,photoName,description,filePath);   
Console.WriteLine("userName is " + album.GetUserName());
Console.WriteLine("albumName is " + album.GetName());
String jsonResponse = album.ToString();         
$userName = "Nick";
$albumName = "My Album";
$photoName = "My Photo";
$description = "Photo Details";
$filePath	= "Your Local file path";					
$album = photoService->addPhoto($userName,$albumName,$photoName,$description,$filePath);   
print_r("userName is " . $album->getUserName());
print_r("albumName is " . $album->getName());
$jsonResponse = $album->toString(); 
Coming Soon
user_name = "Nick";
album_name = "MyAlbum";
photo_name = "Photo091";
photo_description = "Photo Details";
path = "Local file path";
album = photo_service.add_photo(user_name, album_name, photo_name, photo_description, path);
puts "albumName is #{album.name}";
puts "userName is #{album.user_name}";
puts "albumDescription is #{album.album_description}";
photo_list  = Array.new();
photo_list = album.photo_list();
for photo in photo_list do
  puts "name is #{photo.name}";
  puts "description is #{photo.description}";
end
json_response = album.to_s();
Coming Soon 
Coming Soon 

Add Tag To Photo

Adds Photo for a particular user and album. The Photo is uploaded on the cloud.

Required Parameters

userName - Name of the User whose photo has to be tagged. albumName - Name of the album whose photo is to be tagged. photoName - Name of the photo to be tagged. tagList - List of tags in Photo.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";
ArrayList<String> tagList = new ArrayList<String>();					
tagList.add("John");	
Album album = photoService.addTagToPhoto(userName,albumName,photoName,taglist);   
System.out.println("albumName is " + album.getName());
System.out.println("userName is " + album.getUserName()); 
String jsonResponse = album.toString(); 
public class Callback : App42Callback  
{  
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";
IList<String> tagList = new List<String>();					
tagList.Add("John");	
photoService.AddTagToPhoto(userName,albumName,photoName,taglist); 
	void App42Callback.OnException(App42Exception exception)  
	{  
	 Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
	 Album album = (Album) response;     
	 String jsonResponse = album.ToString();  
	}  
}  
NSString *userName = @"Nick";
NSString *albumName = @"My Album";
NSString *photoName = @"My Photo";
NSArray *tagList = [NSArray arrayWithObject:@"John"];					
Album *album  = [photoService addTagToPhoto:userName albumName:albumName photoName:photoName taglist:taglist]   
NSLog(@"userName is  %@" , album.userName);
NSLog(@"albumName is   %@" ,  album.name);
String jsonResponse = album.toString();    
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";
Vector tagList = new Vector();					
tagList.addElement("John");	
Album album = photoService.addTagToPhoto(userName,albumName,photoName,taglist);   
System.out.println("albumName is " + album.getName());
System.out.println("userName is " + album.getUserName()); 
String jsonResponse = album.toString(); 
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";
ArrayList<String> tagList = new ArrayList<String>();					
tagList.add("John");	
Album album = photoService.addTagToPhoto(userName,albumName,photoName,taglist);   
System.out.println("albumName is " + album.getName());
System.out.println("userName is " + album.getUserName()); 
String jsonResponse = album.toString(); 
Coming Soon
var userName = "Nick",
albumName = "My Album",
photoName = "My Photo";
var tagList = new Array();
tagList.push("John")
var result ;
photoService.addTagToPhoto(userName,albumName,photoName,tagList,{  
	success: function(object) {  
	var albumObj = JSON.parse(object);  
	result = albumObj.app42.response.albums.album;
	console.log("userName is " + result.userName)
	console.log("albumName is " + result.name)
	},  
	error: function(error) {  
	}  
}); 
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";
IList<String> tagList = new List<String>();					
tagList.Add("John");	
Album album = photoService.AddTagToPhoto(userName,albumName,photoName,taglist);    
Console.WriteLine("userName is " + album.GetUserName());
Console.WriteLine("albumName is " + album.GetName());
String jsonResponse = album.ToString();         
$userName = "Nick";
$albumName = "MyAlbum";
$photoName = "PhotoName_01";
$tagList = array();
array_push($tagList,"John");
$album = $photoService->addTagToPhoto($userName,$albumName,$photoName,$tagList);   
print_r("albumName is " . $album->getName());
print_r("userName is " . $album ->getUserName()); 
$jsonResponse = $album->toString(); 
Coming Soon
user_name = "Nick";
album_name = "MyAlbum";
photo_name = "PhotoName_01";	
tag_list = Array.new();
tag_list.push("John");
album = photoService.add_tag_to_photo(user_name, album_name, photo_name, tag_list);
puts "albumName is #{album.name}";
puts "userName is #{album.user_name}";
puts "albumDescription is #{album.album_description}";
photo_list  = Array.new();
photo_list = album.photo_list();
for photo in photo_list do
  puts "name is #{photo.name}";
  puts "description is #{photo.description}";
  puts "taglist is #{photo.tag_list}";
end
json_response = album.to_s();
Coming Soon 
Coming Soon 

Get Photos

Fetches all the Albums based on the userName.

Required Parameters

userName - Name of the user for which the albums have to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
ArrayList<Album> album = photoService.getPhotos(userName);   
System.out.println("userName is " + album.get(0).getUserName());
System.out.println("albumName is " + album.get(0).getName());
String jsonResponse = album.get(0).toString();    
public class Callback : App42Callback  
{  
String userName = "Nick";
photoService.GetPhotos(userName,this); 
	void App42Callback.OnException(App42Exception exception)  
	{  
	Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
	IList<Album> album = (Ilist<Album>) response;     
	String jsonResponse = album[0].ToString();  
	}  
}  
NSString *userName = @"Nick";
NSArray *album = [photoService getPhotos:userName]; 
NSLog(@"userName is %@" , [[album objectAtIndex:0] userName);
NSLog(@"albumName is %@" ,  [[album objectAtIndex:0] name);
NSString *jsonResponse = [album toString]; 
String userName = "Nick";
Vector album = photoService.getPhotos(userName);   
System.out.println("userName is " + ((Album)album.elementAt(0)).getUserName());
System.out.println("albumName is " + ((Album)album.elementAt(0)).getName());
String jsonResponse = ((Album)album.elementAt(0)).toString();    
String userName = "Nick";
ArrayList<Album> album = photoService.getPhotos(userName);   
System.out.println("userName is " + album.get(0).getUserName());
System.out.println("albumName is " + album.get(0).getName());
String jsonResponse = album.get(0).toString();    
Coming Soon
var userName = "Nick",
result ;  
photoService.getPhotos(userName,{  
	success: function(object) {  
	  var albumObj = JSON.parse(object);  
	  result = albumObj.app42.response.albums.album;
	  console.log("userName is " + result[0].userName)
	  console.log("albumName is " + result[0].name)
	},  
	error: function(error) {  
	}  
}); 
String userName = "Nick";
IList<Album> album = photoService.GetPhotos(userName);   
Console.WriteLine("userName is " + album[0].GetUserName());
Console.WriteLine("albumName is " + album[0].GetName());
String jsonResponse = album[0].ToString();         
$userName = "Nick";
$album = $photoService->getPhotos($userName); 
print_r("userName is " . $album[0]->getUserName());
print_r("albumName is " . $album[0]->getName());
$jsonResponse = $album[0]->toString(); 
Coming Soon
user_name = "Nick";	
album_list  = Array.new();
album_list = photo_service.get_photos(user_name);
for album in album_list do
  puts "albumName is #{album.name}";
  puts "userName is #{album.user_name}";
  puts "albumDescription is #{album.album_description}";
  photo_list  = Array.new();
  photo_list = album.photo_list();
  for photo in photo_list do
    puts "name is #{photo.name}";
    puts "description is #{photo.description}";
  end
end
json_response = album_list.to_s();
Coming Soon 
Coming Soon 

Get Tagged Photos

Fetches all the Photos based on the userName and tag.

Required Parameters

userName - Name of the user for which the albums have to be fetched. tag - Tag on which basis photos have to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
String tag = "John";
ArrayList<Album> album = photoService.getTaggedPhotos(userName,tag);   
System.out.println("userName is " + album.get(0).getUserName());
System.out.println("albumName is " + album.get(0).getName());
String jsonResponse = album.get(0).toString();    
public class Callback : App42Callback  
{  
	 String userName = "Nick";
	 String tag = "John";
	 photoService.GetTaggedPhotos(userName,tag,this); 
	 void App42Callback.OnException(App42Exception exception)  
	  {  
		 Console.WriteLine("Exception Message");  
	  }  
	  void App42Callback.OnSuccess(Object response)  
	  {  
		 IList<Album> album = (Ilist<Album>) response;     
		 String jsonResponse = album[0].ToString();  
	  }  
}  
NSString *userName = @"Nick";
NSString *tag = @"John";
NSArray *album = [photoService getTaggedPhotos:userName tag:tag]; 
NSLog(@"userName is %@" , [[album objectAtIndex:0] userName);
NSLog(@"albumName is %@" ,  [[album objectAtIndex:0] name);
NSString *jsonResponse = [album toString]; 
String userName = "Nick";
String tag = "John";
Vector album = photoService.getTaggedPhotos(userName,tag);   
System.out.println("userName is " + ((Album)album.elementAt(0)).getUserName());
System.out.println("albumName is " + ((Album)album.elementAt(0)).getName());
String jsonResponse = ((Album)album.elementAt(0)).toString();    
String userName = "Nick";
String tag = "John";
ArrayList<Album> album = photoService.getTaggedPhotos(userName,tag);   
System.out.println("userName is " + album.get(0).getUserName());
System.out.println("albumName is " + album.get(0).getName());
String jsonResponse = album.get(0).toString();    
Coming Soon
var userName = "Nick",
tag = "John",
result ;  
photoService.getTaggedPhotos(userName,tag,{  
	success: function(object) {  
	var albumObj = JSON.parse(object);  
	result = albumObj.app42.response.albums.album;
	console.log("userName is " + result[0].userName)
	console.log("albumName is " + result[0].name)
	},  
	error: function(error) {  
	}  
}); 
String userName = "Nick";
String tag = "John";
IList<Album> album = photoService.GetTaggedPhotos(userName,tag);   
Console.WriteLine("userName is " + album[0].GetUserName());
Console.WriteLine("albumName is " + album[0].GetName());
String jsonResponse = album[0].ToString();         
$userName = "Nick";
$tag = "John";
$album = $photoService->getTaggedPhotos($userName,$tag); 
print_r("userName is " . $album[0]->getUserName());
print_r("albumName is " . $album[0]->getName());
$jsonResponse = $album[0]->toString(); 
Coming Soon
user_name = "Nick";
tag = "joy";		
album_list  = Array.new();
album_list = photo_service.get_tagged_photos(user_name, tag);
for album in album_list do
  puts "albumName is #{album.name}";
  puts "userName is #{album.user_name}";
  puts "albumDescription is #{album.album_description}";
  photo_list  = Array.new();
  photo_list = album.photo_list();
  for photo in photo_list do
    puts "name is #{photo.name}";
    puts "description is #{photo.description}";
    tag_list  = Array.new();
    tag_list = photo.tag_list();
  end
end
json_response = album_list.to_s();
Coming Soon 
Coming Soon 

Get Photos By Album Name

Fetches all Photos based on the userName and album name.

Required Parameters

userName - Name of the User whose photos have to be fetched. albumName - Name of the Album from which photos have to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
String albumName = "My Album";
Album album = photoService.getPhotosByAlbumName(userName,albumName);   
System.out.println("userName is " + album.getUserName());
System.out.println("albumName is " + album.getName());
String jsonResponse = album.toString();    
public class Callback : App42Callback  
{  
String userName = "Nick";
String albumName = "My Album";
photoService.GetPhotosByAlbumName(userName,albumName,this); 
	void App42Callback.OnException(App42Exception exception)  
	{  
	 Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
	 Album album = (Album) response;     
	 String jsonResponse = album.ToString();  
	}  
}  
NSString *userName = @"Nick";
NSString *albumName = @"My Album";
Album *album = [photoService getPhotosByAlbumName:userName albumName:albumName]; 
NSLog(@"userName is %@" , album.userName);
NSLog(@"albumName is %@" ,  album.name);
NSString *jsonResponse = [album toString]; 
String userName = "Nick";
String albumName = "My Album";
Album album = photoService.getPhotosByAlbumName(userName,albumName);   
System.out.println("userName is " + album.getUserName());
System.out.println("albumName is " + album.getName());
String jsonResponse = album.toString();    
String userName = "Nick";
String albumName = "My Album";
Album album = photoService.getPhotosByAlbumName(userName,albumName);   
System.out.println("userName is " + album.getUserName());
System.out.println("albumName is " + album.getName());
String jsonResponse = album.toString();    
Coming Soon
var userName = "Nick",
albumName = "My Album",
result ;  
photoService.getPhotosByAlbumName(userName,albumName,{  
	success: function(object) {  
	var albumObj = JSON.parse(object);  
	result = albumObj.app42.response.albums.album;
	console.log("userName is " + result.userName)
	console.log("albumName is " + result.name)
	},  
	error: function(error) {  
	}  
}); 
String userName = "Nick";
String albumName = "My Album";
Album album = photoService.GetPhotosByAlbumName(userName,albumName);   
Console.WriteLine("userName is " + album.GetUserName());
Console.WriteLine("albumName is " + album.GetName());
String jsonResponse = album.ToString();         
$userName = "Nick";
$albumName = "My Album";
$album = $photoService->getPhotosByAlbumName($userName,$albumName); 
print_r("userName is " . $album->getUserName());
print_r("albumName is " . $album->getName());
$jsonResponse = $album->toString(); 
Coming Soon
user_name = "Nick";
album_name = "MyAlbum";	
album = photo_service.get_photos_by_albumName(user_name, album_name);
puts "albumName is #{album.name}";
puts "userName is #{album.user_name}";
puts "albumDescription is #{album.albumDescription}";
photo_list = Array.new();
photo_list = album.photo_list();
for photo in photo_list do
  puts "name is #{photo.name}";
  puts "description is #{photo.description}";
end
json_response = album.to_s();
Coming Soon 
Coming Soon 

Get Photos By Album Name (Paging)

Fetches all Photos based on the userName and album name.

Required Parameters

userName - Name of the User whose photos have to be fetched. albumName - Name of the Album from which photos have to be fetched. max - Maximum number of records to be fetched. offset - From where the records are to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
String albumName = "My Album";
int max = 1;
int offset = 0;
Album album = photoService.getPhotosByAlbumName(userName,albumName,max,offset);   
System.out.println("userName is " + album.getUserName());
System.out.println("albumName is " + album.getName());
String jsonResponse = album.toString();    
public class Callback : App42Callback  
{  
	 String userName = "Nick";
	 String albumName = "My Album";
	 int max = 1;
	 int offset = 0;
	 photoService.GetPhotosByAlbumName(userName,albumName,max,offset,this); 
	 void App42Callback.OnException(App42Exception exception)  
	  {  
		 Console.WriteLine("Exception Message");  
	  }  
	  void App42Callback.OnSuccess(Object response)  
	  {  
		 Album album = (Album) response;     
		 String jsonResponse = album.ToString();  
	  }  
}  
NSString *userName = @"Nick";
NSString *albumName = @"My Album";
int max = 1;
int offset = 0;
Album *album = [photoService getPhotosByAlbumName:userName albumName:albumName max:max offset:offset]; 
NSLog(@"userName is %@" , album.userName);
NSLog(@"albumName is %@" ,  album.name);
NSString *jsonResponse = [album toString]; 
String userName = "Nick";
String albumName = "My Album";
Integer max = new Integer(1);
Integer offset = new Integer(0);  
Album album = photoService.getPhotosByAlbumName(userName,albumName,max,offset);   
System.out.println("userName is " + album.getUserName());
System.out.println("albumName is " + album.getName());
String jsonResponse = album.toString();    
String userName = "Nick";
String albumName = "My Album";
int max = 1;
int offset = 0;
Album album = photoService.getPhotosByAlbumName(userName,albumName,max,offset);   
System.out.println("userName is " + album.getUserName());
System.out.println("albumName is " + album.getName());
String jsonResponse = album.toString();    
Coming Soon
var userName = "Nick",
albumName = "My Album",
max = 1;
offset = 0,
result ;  
photoService.getPhotosByAlbumName(userName,albumName,max,offset,{  
	success: function(object) {  
	var albumObj = JSON.parse(object);  
	result = albumObj.app42.response.albums.album;
	console.log("userName is " + result.userName)
	console.log("albumName is " + result.name)
	},  
	error: function(error) {  
	}  
}); 
String userName = "Nick";
String albumName = "My Album";
int max = 1;
int offset = 0;
Album album = photoService.GetPhotosByAlbumName(userName,albumName,max,offset);   
Console.WriteLine("userName is " + album.GetUserName());
Console.WriteLine("albumName is " + album.GetName());
String jsonResponse = album.ToString();         
$userName = "Nick";
$albumName = "My Album";
$max = 1;
$offset = 0;
$album = $photoService->getPhotosByAlbumName($userName,$albumName,max,offset); 
print_r("userName is " . $album->getUserName());
print_r("albumName is " . $album->getName());
$jsonResponse = $album->toString(); 
Coming Soon
user_name = "Nick";
album_name = "MyAlbum";
max = 1;
offset = 0;			
album = photo_service.get_photos_by_albumName_by_paging(user_name, album_name, max, offset);
puts "albumName is #{album.name}";
puts "userName is #{album.user_name}";
puts "albumDescription is #{album.album_description}";
photo_list  = Array.new();
photo_list = album.photo_list();
for photo in photo_list do
  puts "name is #{photo.name}";
  puts "description is #{photo.description}";
end
json_response = album.to_s();
Coming Soon 
Coming Soon 

Get Photos Count By Album Name

Fetches the count of all Photos based on the userName and album name.

Required Parameters

userName - Name of the User whose count of photos have to be fetched albumName - Name of the Album from which count of photos have to be fetched

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
String albumName = "My Album";
App42Response response = photoService.getPhotosCountByAlbumName(userName,albumName); 
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
public class Callback : App42Callback  
{  
String userName = "Nick"; 
String albumName = "My Album";
photoService.GetPhotosCountByAlbumName(userName,albumName, this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
	 Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
	 App42Response album = (App42Response) response;     
	 String jsonResponse = album.ToString();  
	}  
}  
NSString *userName = @"Nick"; 
String *albumName = @"My Album";
App42Response *response = [photoService getPhotosCountByAlbumName:userName albumName:albumName]; 
NSString *success = response.isResponseSuccess;
NSString *jsonResponse = [response toString];                             
String userName = "Nick";
String albumName = "My Album";
App42Response response = photoService.getPhotosCountByAlbumName(userName,albumName); 
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
String userName = "Nick";
String albumName = "My Album";
App42Response response = photoService.getPhotosCountByAlbumName(userName,albumName); 
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
Coming Soon
	  Coming Soon
String userName = "Nick";
String albumName = "My Album";
App42Response response = photoService.GetPhotosCountByAlbumName(userName,albumName); 
Boolean  success = response.IsResponseSuccess();
String jsonResponse = response.ToString(); 
$userName = "Nick";
$albumName = "My Album";
$response = $photoService->getPhotosCountByAlbumName($userName,$albumName); 
$success = $respons->isResponseSuccess();
$jsonResponse = $respons->toString(); 
Coming Soon
user_name = "Nick";
album_name = "MyAlbum";
response = photo_service.get_photos_count_by_albumName(user_name, album_name);
success = response.is_response_success();
total_records = response.total_records();
json_response = response.to_s();
Coming Soon 
Coming Soon 

Get Photos By Album Name And Photo Name

Fetches the particular photo based on the userName, album name and photo name.

Required Parameters

userName - Name of the User whose photo has to be added. albumName - Name of the Album in which photo has to be added. photoName - Name of the Photo that has to be added.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";				
Album album = photoService.getPhotosByAlbumAndPhotoName(userName,albumName,photoName);   
System.out.println("albumName is " + album.getName());
System.out.println("userName is " + album.getUserName());
String jsonResponse = album.toString();    
public class Callback : App42Callback  
{  
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";	
photoService.GetPhotosByAlbumAndPhotoName(userName,albumName,photoName,this); 
void App42Callback.OnException(App42Exception exception)  
{  
 Console.WriteLine("Exception Message");  
}  
void App42Callback.OnSuccess(Object response)  
{  
 Album album = (Album) response;     
 String jsonResponse = album.ToString();  
}  
}  
NSString *userName = @"Nick";
NSString *albumName = @"My Album";
NSString *photoName = @"My Photo";
Album *album = [photoService getPhotosByAlbumAndPhotoName:userName albumName:albumName photoName:photoName]; 
NSLog(@"userName is %@" , album.userName);
NSLog(@"albumName is %@" ,  album.name);
NSString *jsonResponse = [album toString]; 
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";				
Album album = photoService.getPhotosByAlbumAndPhotoName(userName,albumName,photoName);   
System.out.println("albumName is " + album.getName());
System.out.println("userName is " + album.getUserName());
String jsonResponse = album.toString();    
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";				
Album album = photoService.getPhotosByAlbumAndPhotoName(userName,albumName,photoName);   
System.out.println("albumName is " + album.getName());
System.out.println("userName is " + album.getUserName());
String jsonResponse = album.toString();    
Coming Soon
var userName = "Nick",
albumName = "My Album",
photoName = "My Photo",
result ;
photoService.getPhotosByAlbumAndPhotoName(userName,albumName,photoName,{  
	success: function(object) {  
	var albumObj = JSON.parse(object);  
	result = albumObj.app42.response.albums.album;
	console.log("userName is " + result.userName)
	console.log("albumName is " + result.name)
	},  
	error: function(error) {  
	}  
}); 
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";				
Album album = photoService.GetPhotosByAlbumAndPhotoName(userName,albumName,photoName);   
Console.WriteLine("userName is " + album.GetUserName());
Console.WriteLine("albumName is " + album.GetName());
String jsonResponse = album.ToString();         
$userName = "Nick";
$albumName = "My Album";
$photoName = "My Photo";				
$album = photoService->getPhotosByAlbumAndPhotoName($userName,$albumName,$photoName);   
print_r("userName is " . $album->getUserName());
print_r("albumName is " . $album->getName());
$jsonResponse = $album->toString(); 
Coming Soon
user_name = "Nick";
album_name = "MyAlbum";
photo_name = "Photo091";
album = photo_service.get_photos_by_album_and_photoName(user_name, album_name, photo_name);
puts "albumName is #{album.name}";
puts "userName is #{album.user_name}";
puts "albumDescription is #{album.album_description}";
photo_list  = Array.new();
photo_list = album.photo_list();
for photo in photo_list do
  puts "name is #{photo.name}";
  puts "description is #{photo.description}";
end
json_response = album.to_s();
Coming Soon 
Coming Soon 

Remove Album

Removes the album based on the userName and albumName. Note : All photos added to this Album will also be removed.

Required Parameters

userName - The user for which the album has to be removed. albumName - Name of the album that has to be removed.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
String albumName = "My Album";
App42Response response = albumService.removeAlbum(userName,albumName); 
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
public class Callback : App42Callback  
{  
String userName = "Nick"; 
String albumName = "My Album";
albumService.RemoveAlbum(userName,albumName, this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
	Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
	App42Response album = (App42Response) response;     
	String jsonResponse = album.ToString();  
	}  
}  
NSString *userName = @"Nick"; 
String *albumName = @"My Album";
App42Response *response = [albumService removeAlbum:userName albumName:albumName]; 
NSString *success = response.isResponseSuccess;
NSString *jsonResponse = [response toString];                             
String userName = "Nick";
String albumName = "My Album";
App42Response response = albumService.removeAlbum(userName,albumName); 
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
String userName = "Nick";
String albumName = "My Album";
App42Response response = albumService.removeAlbum(userName,albumName); 
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
Coming Soon
Coming Soon 
String userName = "Nick";
String albumName = "My Album";
App42Response response = albumService.RemoveAlbum(userName,albumName); 
Boolean  success = response.IsResponseSuccess();
String jsonResponse = response.ToString(); 
$userName = "Nick";
$albumName = "My Album";
$response = $albumService->removeAlbum($userName,$albumName); 
$success = $respons->isResponseSuccess();
$jsonResponse = $respons->toString(); 
Coming Soon
user_name = "Nick";
album_name = "MyAlbum";
response = album_service.remove_album(user_name, album_name);
success = response.is_response_success();
json_response = response.to_s();
Coming Soon 
 Coming Soon

Remove Photo

Removes the particular Photo from the specified Album for a particular user. Note : The Photo is removed from the cloud and wont be accessible in future

Required Parameters

userName - The user for which the album has to be removed. albumName - Name of the album that has to be removed. photoName - Name of the Photo that has to be removed.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";
App42Response response = photoService.removePhoto(userName,albumName,photoName); 
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
public class Callback : App42Callback  
{  
String userName = "Nick"; 
String albumName = "My Album";
String photoName = "My Photo";
photoService.RemovePhoto(userName,albumName,photoName, this);  
	void App42Callback.OnException(App42Exception exception)  
	{  
	 Console.WriteLine("Exception Message");  
	}  
	void App42Callback.OnSuccess(Object response)  
	{  
	 App42Response album = (App42Response) response;     
	 String jsonResponse = album.ToString();  
	}  
}  
NSString *userName = @"Nick"; 
String *albumName = @"My Album";
String *photoName = @"My Photo";
App42Response *response = [photoService removePhoto:userName albumName:albumName photoName:photoName]; 
NSString *success = response.isResponseSuccess;
NSString *jsonResponse = [response toString];                             
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";
App42Response response = photoService.removePhoto(userName,albumName,photoName); 
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";
App42Response response = photoService.removePhoto(userName,albumName,photoName); 
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
Coming Soon
Coming Soon 
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";
App42Response response = photoService.RemovePhoto(userName,albumName,photoName); 
Boolean  success = response.IsResponseSuccess();
String jsonResponse = response.ToString(); 
$userName = "Nick";
$albumName = "My Album";
$photoName = "My Photo";
$response = $photoService->removePhoto($userName,$albumName,$photoName); 
$success = $respons->isResponseSuccess();
$jsonResponse = $respons->toString(); 
Coming Soon
user_name = "Nick";
album_name = "MyAlbum";
photo_name = "Album Description";
response = photo_service.remove_photo(user_name, album_name, photo_name);
success = response.is_response_success();
json_response = response.to_s();
Coming Soon 
Coming Soon 

Exception Handling

The functions available under Gallery API can throw some exceptions in abnormal conditions. Example of the same has been given below. E.g. If App developer is creating an album for the user which is not in database, the function will throw the App42Exception (as shown below) with message as “Not Found” and the appErrorCode as “2500” and the details as “The request parameters are invalid. Album with the name ‘My Album’ for the user ‘Nick’ already exists”.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for J2ME
  • create User Api for Java
  • create User Api for Unity
  • create User Api for JS
  • create User Api for .Net
  • create User Api for PHP
  • create User Api for Marmalade
  •  create User Api for Ruby
  •  create User Api for Flash
 
String userName = "Nick";
String albumName = "My Album";
String albumDescription = "Album Description";	
try
{
	Album album = albumService.createAlbum(userName,albumName,albumDescription);
} 
catch(App42Exception exception)
{
	int appErrorCode = exception.getAppErrorCode();
	int httpErrorCode = exception.getHttpErrorCode();
	if(appErrorCode == 2500)
	{
		// Handle here for Bad Request (The request parameters are invalid. Album with the name '@My Album' for the user '@userName' already exists.)
	}
	else if(appErrorCode == 1401){
		// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500){
		// handle here for Internal Server Error
	}
	String jsonText = exception.getMessage(); 	
}                                           
public class Callback : App42Callback  
{  
	String userName = "Nick";
	String albumName = "My Album";
	String albumDescription = "Album Description";	
	albumService.CreateAlbum(userName,albumName,albumDescription, this);  
	 void App42Callback.OnException(App42Exception exception)  
	  {  
		 int appErrorCode = exception.GetAppErrorCode();
		 int httpErrorCode = exception.GetHttpErrorCode();
		 if(appErrorCode == 2500)
			{
				// Handle here for Bad Request (The request parameters are invalid. Album with the name '@My Album' for the user '@userName' already exists.)
			}
			else if(appErrorCode == 1401){
				// handle here for Client is not authorized
			}
			else if(appErrorCode == 1500){
				// handle here for Internal Server Error
			}
		 String jsonText = exception.GetMessage(); 
	  }  
	  void App42Callback.OnSuccess(Object response)  
	  {  
		 User user = (User) response;
		 String jsonResponse = user.ToString();  
	  }  
}  
					
NSString *userName = @"Nick";
NSString *albumName = @"MyAlbum";
NSString *albumDescription = @"Album Description";	
try
{
	Album *album = albumService.createAlbum(userName,albumName,albumDescription);
} 
catch(App42Exception *exception)
{
	int appErrorCode = exception.appErrorCode;
	int httpErrorCode = exception.httpErrorCode;
	if(appErrorCode == 2500)
	{
		// Handle here for Bad Request (The request parameters are invalid. Album with the name '@albumName' for the user '@userName' already exists.)
	}
	else if(appErrorCode == 1401){
		// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500){
		// handle here for Internal Server Error
	}
	String jsonText = exception.reason; 	
}                                                   
String userName = "Nick";
String albumName = "My Album";
String albumDescription = "Album Description";	
try
{
	Album album = albumService.createAlbum(userName,albumName,albumDescription);
} 
catch(App42Exception exception)
{
	int appErrorCode = exception.getAppErrorCode();
	int httpErrorCode = exception.getHttpErrorCode();
	if(appErrorCode == 2500)
	{
		// Handle here for Bad Request (The request parameters are invalid. Album with the name '@My Album' for the user '@userName' already exists.)
	}
	else if(appErrorCode == 1401){
		// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500){
		// handle here for Internal Server Error
	}
	String jsonText = exception.getMessage(); 	
}      
String userName = "Nick";
String albumName = "My Album";
String albumDescription = "Album Description";	
try
{
	Album album = albumService.createAlbum(userName,albumName,albumDescription);
} 
catch(App42Exception exception)
{
	int appErrorCode = exception.getAppErrorCode();
	int httpErrorCode = exception.getHttpErrorCode();
	if(appErrorCode == 2500)
	{
		// Handle here for Bad Request (The request parameters are invalid. Album with the name '@My Album' for the user '@userName' already exists.)
	}
	else if(appErrorCode == 1401){
		// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500){
		// handle here for Internal Server Error
	}
	String jsonText = exception.getMessage(); 	
}       
Coming Soon
var userName = "Nick",
albumName = "My Album",
albumDescription = "Album Description",
appErrorCode ;
albumService.createAlbum(userName,albumName,albumDescription,{
	success: function(object) {
	},
	error: function(error) {
		var userObj = JSON.parse(error);
		appErrorCode = userObj.app42Fault.appErrorCode;
		if(appErrorCode == 2500)
		{
			// Handle here for Bad Request (The request parameters are invalid. Album with the name '@My Album' for the user '@userName' already exists.)
		}
		else if(appErrorCode == 1401){
			// handle here for Client is not authorized
		}
		else if(appErrorCode == 1500){
			// handle here for Internal Server Error
		}
	}
});
String userName = "Nick";
String albumName = "My Album";
String albumDescription = "Album Description";	
try
{
	Album album = albumService.CreateAlbum(userName,albumName,albumDescription);
} 
catch(App42Exception exception)
{
	int appErrorCode = exception.GetAppErrorCode();
	int httpErrorCode = exception.GetHttpErrorCode();
	if(appErrorCode == 2500)
	{
		// Handle here for Bad Request (The request parameters are invalid. Album with the name '@My Album' for the user '@userName' already exists.)
	}
	else if(appErrorCode == 1401){
		// handle here for Client is not authorized
	}
	else if(appErrorCode == 1500){
		// handle here for Internal Server Error
	}
	String jsonText = exception.GetMessage(); 	
}      
$userName = "Nick";
$albumName = "My Album";
$albumDescription = "Album Description";
try
{
	$album = $albumService->createAlbum($userName,$albumName,$albumDescription);
} 
catch(App42Exception $exception) 
{
	$appErrorCode = $ex->getAppErrorCode();
	$httpErrorCode = $ex->getHttpErrorCode();
	if(appErrorCode == 2500)
	{
		// Handle here for Bad Request (The request parameters are invalid. Album with the name 'My Album' for the user '@userName' already exists.)
	}
		else if(appErrorCode == 1401){
		// handle here for Client is not authorized
	}
		else if(appErrorCode == 1500){
		// handle here for Internal Server Error
	}
	$jsonText = $ex->getMessage(); 	
}                     
Coming Soon
Coming Soon
Coming Soon 
Coming Soon

Error Codes

Functions in Gallery API might throw exceptions with following HTTP and Application Error Codes (along with their descriptions):

1400 - BAD REQUEST - The Request parameters are invalid 1401 - UNAUTHORIZED - Client is not authorized 1500 - INTERNAL SERVER ERROR - Internal Server Error. Please try again. 2500 - BAD REQUEST - The request parameters are invalid. Album with the name '@albumName' for the user '@userName' already exists. 2501 - NOT FOUND - Album by the name '@albumName' for the user '@userName' does not exist. 2502 - NOT FOUND - Albums for the user '@userName' do not exist. 2503 - NOT FOUND - Albums and Photos for the user '@userName' does not exist. 2504 - NOT FOUND - Photo with the name '@photoName' from the album '@albumName' for the user '@userName' does not exist. 2505 - BAD REQUEST - The request parameters are invalid. Photo by the name '@photoName' for album '@albumName' for the user '@userName' already exists. 2506 - NOT FOUND - The number of albums for the user '@userName' are less than the specified offset : &lt;offset&gt;. 2507 - NOT FOUND - Album by the name '@albumName' for the user '@userName' have less photos than the specified offset : &lt;offset&gt;. 2508 - NOT FOUND -Albums and Photos for the tag '@tag' does not exist.