Photo Gallery Service

This module enables you to create your own photo gallery on the cloud. You can create, retrieve, remove and manage your 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 service and reduces the footprint on the device. Developers can focus on other Gallery aspects such as how to render the Photo Gallery thereby reduces development time. Functions available in Gallery API are listed below:

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 Corona
  • create User Api for Cocos2DX
  • 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.App42API;
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.App42API;
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.App42API;
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;
using com.shephertz.app42.paas.sdk.csharp;  
using com.shephertz.app42.paas.sdk.csharp.gallery;
<script type="text/javascript" src="App42-all-x.x.x.min.js">
Coming Soon
Coming Soon
using com.shephertz.app42.paas.sdk.csharp;  
using com.shephertz.app42.paas.sdk.csharp.gallery;  
include_once '../AlbumService.php';   
include_once '../PhotoService.php';  
include_once '../App42Log.php';   
include_once '../App42Response.php';  
include_once '../App42Exception.php';   
include_once '../App42BadParameterException.php';  
include_once '../App42NotFoundException.php';  
Coming Soon
require 'App42_Ruby_API'
import com.shephertz.app42.paas.sdk.as3.App42API;
import com.shephertz.app42.paas.sdk.as3.App42Response;
import com.shephertz.app42.paas.sdk.as3.App42Exception;
import com.shephertz.app42.paas.sdk.as3.App42BadParameterException;
import com.shephertz.app42.paas.sdk.as3.App42NotFoundException;	
import com.shephertz.app42.paas.sdk.as3.gallery.Album;
import com.shephertz.app42.paas.sdk.as3.gallery.AlbumService;
import com.shephertz.app42.paas.sdk.as3.gallery.Photo;
import com.shephertz.app42.paas.sdk.as3.gallery.PhotoService;
import com.shephertz.app42.paas.sdk.as3.util.Util;
Coming Soon

Initialize

In order to use various the functions available in a specific API, a developer has to initialize with App42API 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 Corona
  • create User Api for Cocos2DX
  • 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
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
App42API.Initialize("API_KEY","SECRET_KEY");
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"];
App42API.initialize("API_KEY","SECRET_KEY");
App42API.initialize("API_KEY","SECRET_KEY");
App42API.Initialize("API_KEY","SECRET_KEY");
App42.initialize("API_KEY","SECRET_KEY");
Coming Soon
Coming Soon
App42API.Initialize("API_KEY","SECRET_KEY");
App42API::initialize("API_KEY","SECRET_KEY");
Coming Soon
api = App42::ServiceAPI.new("API_KEY","SECRET_KEY") 
App42API.initialize("API_KEY","SECRET_KEY");
Coming Soon

Build Service

After initialization, developer needs to call the buildXXXService method on App42API to get the instance of the particular API that you wish to build. For example, To build an instance of Album Service, 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 Corona
  • create User Api for Cocos2DX
  • 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 = App42API.buildAlbumService(); 
PhotoService photoService = App42API.buildPhotoService(); 
AlbumService albumService = App42API.BuildAlbumService();  
PhotoService photoService = App42API.BuildPhotoService();  
AlbumService *albumService = [App42API buildAlbumService]; 
PhotoService *photoService = [App42API buildPhotoService]; 
AlbumService albumService = App42API.buildAlbumService();
PhotoService photoService = App42API.buildPhotoService(); 
AlbumService albumService = App42API.buildAlbumService(); 
PhotoService photoService = App42API.buildPhotoService(); 
AlbumService albumService = App42API.BuildAlbumService(); 
PhotoService photoService = App42API.BuildPhotoService(); 
var albumService  = new App42Album();
var photoService  = new App42Photo();
Coming Soon
Coming Soon
AlbumService albumService = App42API.BuildAlbumService(); 
PhotoService photoService = App42API.BuildPhotoService(); 
$albumService = App42API::buildAlbumService();
$photoService = App42API::buildPhotoService();
Coming Soon
album_service = api.build_album_service() 
var albumService:AlbumService = App42API.buildAlbumService(); 
var photoService:PhotoService = App42API.buildPhotoService();
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 Corona
  • create User Api for Cocos2DX
  • 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";    
albumService.createAlbum(userName, albumName, description, new App42CallBack() {
public void onSuccess(Object response) 
{
	Album album  = (Album)response;
	System.out.println("User Name"+album.getUserName());
	System.out.println("Album Name"+album.getName());
	System.out.println("Description"+album.getDescription());
	System.out.println("Created on is:"+album.getCreatedOn());
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});   
String userName = "Nick";
String albumName = "My Album";
String description = "Album Description";    
albumService.CreateAlbum(userName,albumName,description,new Callback()); 
public class Callback : App42Callback  
{   
	public void OnSuccess(Object response)  
	{  
		Album album = (Album) response;     
		jsonResponse = album.ToString();  
	} 
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
}  
NSString *userName = @"Nick";
NSString *albumName = @"My Album";
NSString *description = @"Album Description";
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("User Name"+album.getUserName());
System.out.println("Album Name"+album.getName());
System.out.println("Description"+album.getDescription());
System.out.println("Created on is:"+album.getCreatedOn());
String jsonResponse = album.toString();    
String userName = "Nick";
String albumName = "My Album";
String description = "Album Description";
App42Log.SetDebug(true);    	//Prints output in your editor console
albumService.CreateAlbum(userName, albumName, description, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		Album album = (Album) response;   
		App42Log.Console("userName is :" + album.GetUserName());
        App42Log.Console("albumName is :" + album.GetName());
        App42Log.Console("Description is :" + album.GetDescription());
        App42Log.Console("jsonResponse is :" + album.ToString());
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
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) {  
}  
}); 
Coming Soon
Coming Soon
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("User Name : ".$album->getUserName());
print_r("Album Name : ".$album->getName());
print_r("Description : ".$album->getDescription());
$jsonResponse = $album->toString(); 
Coming Soon
userName = "Nick";
albumName = "MyAlbum";
description = "Album Description";						
album = album_service.create_album(userName, albumName, description); 
puts "albumName is #{album.albumName}";
puts "userName is #{album.userName}";
puts "albumDescription is #{album.description}";
json_response = album.to_s(); 
var userName:String = "Nick";  
var albumName:String = "MyAlbum";  
var description:String = "Album Description";  
albumService.createAlbum(userName, albumName, description,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{									
		var album:Album = Album(response);
		trace("User Name"+album.getUserName());
		trace("Album Name"+album.getName());
		trace("Description"+album.getDescription());
		trace("Created on is:"+album.getCreatedOn());
	}
}
Coming Soon 

Get Albums

Fetch 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 Corona
  • create User Api for Cocos2DX
  • 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";
albumService.getAlbums(userName, new App42CallBack() {
public void onSuccess(Object response) 
{
	ArrayList<Album> albumList = (ArrayList<Album>)response;
	for(Album album : albumList)  
	{  
		System.out.println("userName is " + album.getUserName());  
		System.out.println("albumName is " + album.getName());  
		System.out.println("albumDescription is " + album.getDescription());   
	}
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});   
String userName = "Nick";
albumService.GetAlbums(userName,new Callback()); 
public class Callback : App42Callback  
{
	public void OnSuccess(Object response)  
	{  
	 IList<Album> album = (Ilist<Album>) response;     
	 String jsonResponse = album[0].ToString();  
	}   
	public void OnException(App42Exception exception)  
	{  
	 Console.WriteLine("Exception Message : " + exception);  
	}   
}  
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);   
for(Album album : albumList)  
{  
	System.out.println("userName is " + album.getUserName());  
	System.out.println("albumName is " + album.getName());  
	System.out.println("albumDescription is " + album.getDescription());   
}
String jsonResponse = album.get(0).toString();    
String userName = "Nick";
App42Log.SetDebug(true);        //Prints output in your editor console
albumService.GetAlbums(userName, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
	public void OnSuccess(object response)
	{
		IList<Album> album = (IList<Album>) response; 
        for(int i = 0; i < album.Count; i++)
        {
		App42Log.Console("userName is :" + album[i].GetUserName());
		App42Log.Console("albumName is :" + album[i].GetName());
        App42Log.Console("Description is :" + album[i].GetDescription());
        App42Log.Console("jsonResponse is :" + album[i].ToString());
        }
    }
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
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) {  
	}  
	}); 
Coming Soon
Coming Soon
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); 
foreach($album as $albumList)
{
	print_r("userName is " . $albumList->getUserName());
	print_r("albumName is " .$albumList->getName());
	print_r("albumDescription is " .$albumList->getDescription());
}
$jsonResponse = $album[0]->toString(); 
Coming Soon
userName = "Nick";						
album_list  = Array.new();
album_list = album_service.get_albums(userName); 
for album in album_list do
  puts "albumName is #{album.album_name}";
  puts "userName is #{album.userName}";
  puts "albumDescription is #{album.album_description}";
end
json_response = album_list.to_s();
var userName:String = "Nick";
albumService.getAlbums(userName,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{									
		if(response is Array)
		{
			trace("response is in Array " + response);
			for(var i:int = 0;i < response.length;i++)
			{
				var album:Album = Album(response[i])
				trace("User Name"+album.getUserName());
				trace("Album Name"+album.getName());
				trace("Description"+album.getDescription());
			}
		}
	}
}
Coming Soon 

Get Albums Count

Fetch 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 Corona
  • create User Api for Cocos2DX
  • 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";
albumService.getAlbumsCount(userName, new App42CallBack() {
public void onSuccess(Object response) 
{
	App42Response app42response = (App42Response)response;      
	System.out.println("Total Records : " + app42response.getTotalRecords()) ;
}
public void onException(Exception ex)
{
	System.out.println("Exception Message"+ex.getMessage());
}
});
String userName = "Nick";
albumService.GetAlbumsCount(userName,new Callback());  
public class Callback : App42Callback  
{ 
	public void OnSuccess(Object response)  
	{  
		App42Response user = (App42Response) response;     
		String jsonResponse = user.ToString();  
	}  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}   
}  
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 app42response = albumService.getAlbumsCount(userName); 
System.out.println("Total Records : " + app42response.getTotalRecords()) ;
boolean  success = app42response.isResponseSuccess();
String jsonResponse = app42response.toString(); 
String userName = "Nick";
App42Log.SetDebug(true);        //Prints output in your editor console
albumService.GetAlbumsCount(userName, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
	{
		App42Response app42Response = (App42Response) response;   
		App42Log.Console("app42Response is :" + app42Response.ToString());
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
Coming Soon
Coming Soon
Coming Soon
String userName = "Nick";
App42Response response = albumService.GetAlbumsCount(); 
Boolean  success = response.IsResponseSuccess();
String jsonResponse = response.ToString(); 
$userName = "Nick";
$response = $albumService->getAlbumsCount(); 
print_r("Total Records : ".$response->getTotalRecords());
$success = $response->isResponseSuccess();
$jsonResponse = $response->toString(); 
Coming Soon
userName = "Nick";					
response = album_service.get_albums_count(userName);
success = response.is_response_success();
total_records = response.total_records();
json_response = response.to_s();
var userName:String = "Nick";
albumService.getAlbumsCount(userName,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{									
		var app42response :App42Response= App42Response(response);      
		trace("TotalRecords is :" + app42response.getTotalRecords());    
	}
}
Coming Soon 

Get Albums Paging

Fetch all the Albums based on the username by paging.

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 Corona
  • create User Api for Cocos2DX
  • 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 ;
albumService.getAlbums(userName, max, offset, new App42CallBack() {
public void onSuccess(Object response) 
{
	ArrayList<Album> albumList = (ArrayList<Album>)response;
	for(Album album : albumList)  
	{  
		System.out.println("userName is " + album.getUserName());  
		System.out.println("albumName is " + album.getName());  
		System.out.println("albumDescription is " + album.getDescription());   
	}
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});    
String userName = "Nick";
int max = 1;
int offset = 0 ;
albumService.GetAlbums(userName,max,offset,new Callback()); 
public class Callback : App42Callback  
{    
	public void OnSuccess(Object response)  
	{  
		 IList<Album> album = (Ilist<Album>) response;     
		 String jsonResponse = album[0].ToString();  
	} 
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	} 
}  
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);   
for(Album album : albumList)  
{  
	System.out.println("userName is " + album.getUserName());  
	System.out.println("albumName is " + album.getName());  
	System.out.println("albumDescription is " + album.getDescription());   
}
String jsonResponse = album.get(0).toString();    
String userName = "Nick";
int max = 1;
int offset = 0 ;
App42Log.SetDebug(true);        //Prints output in your editor console
albumService.GetAlbums(userName,max,offset, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
		IList<Album> album = (IList<Album>) response;   
        for(int i = 0; i < album.Count; i++)
        {
    	App42Log.Console("userName is :" + album[i].GetUserName());
		App42Log.Console("albumName is :" + album[i].GetName());
        App42Log.Console("Description is :" + album[i].GetDescription());
        App42Log.Console("jsonResponse is :" + album[i].ToString());
        }
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
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) {  
	}  
}); 
Coming Soon
Coming Soon
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); 
foreach($album as $albumList)
{
	print_r("userName is " . $albumList->getUserName());
	print_r("albumName is " .$albumList->getName());
	print_r("albumDescription is " .$albumList->getDescription());
}
$jsonResponse = $album[0]->toString(); 
Coming Soon
userName = "Nick";
max = 1;
offset = 0;			
album_list  = Array.new();
album_list = album_service.get_albums_by_paging(userName, max, offset);
for album in album_list do
  puts "albumName is #{album.album_name}";
  puts "userName is #{album.userName}";
  puts "albumDescription is #{album.album_description}";
end
json_response = album_list.to_s();
var userName:String = "Nick";
var max:int = 1;  
var offset:int = 0 ;  
albumService.getAlbumsByPaging(userName, max, offset,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{									
		if(response is Array)
		{
			trace("response is in Array " + response);
			for(var i:int = 0;i < response.length;i++)
			{
				var album:Album = Album(response[i])
				trace("User Name"+album.getUserName());
				trace("Album Name"+album.getName());
				trace("Description"+album.getDescription());
			}
		}
	}
} 
Coming Soon 

Get Album By Name

Fetch album details 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 Corona
  • create User Api for Cocos2DX
  • 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";
albumService.getAlbumByName(userName, albumName, new App42CallBack() {
public void onSuccess(Object response) 
{
	Album album  = (Album)response;
	System.out.println("albumName is " + album.getName());  
	System.out.println("userName is " + album.getUserName());  
	System.out.println("albumDescription is " + album.getDescription()); 
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});   
String userName = "Nick";
String albumName = "My Album";
albumService.GetAlbumByName(userName,albumName,new Callback()); 
public class Callback : App42Callback  
{   
	public void OnSuccess(Object response)  
	{  
	 Album album = (Album) response;     
	 String jsonResponse = album.ToString();  
	} 
	public void OnException(App42Exception exception)  
	{  
	 Console.WriteLine("Exception Message : " + exception);  
	}  
}  
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("albumName is " + album.getName());  
System.out.println("userName is " + album.getUserName());  
System.out.println("albumDescription is " + album.getDescription()); 
String jsonResponse = album.toString();    
String userName = "Nick";
String albumName = "My Album";
App42Log.SetDebug(true);        //Prints output in your editor console
albumService.GetAlbumByName(userName,albumName, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
    	Album album = (Album) response;   
    	App42Log.Console("userName is :" + album.GetUserName());
		App42Log.Console("albumName is :" + album.GetName());
        App42Log.Console("Description is :" + album.GetDescription());
        App42Log.Console("jsonResponse is :" + album.ToString());
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
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) {  
	}  
}); 
Coming Soon
Coming Soon
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("User Name : ".$album->getUserName());
print_r("Album Name : ".$album->getName());
print_r("Description : ".$album->getDescription());
$jsonResponse = $album->toString(); 
Coming Soon
userName = "Nick";
albumName = "My Album";
album = album_service.get_album_by_name(userName, albumName);   
puts "albumName is #{album.albumName}";
puts "userName is #{album.userName}";
puts "albumDescription is #{album.album_description}";
json_response = album.to_s();
var userName:String = "Nick";  
var albumName:String = "MyAlbum";  
albumService.getAlbumByName(userName, albumName,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{									
		if(response is Array)
		{
			trace("response is in Array " + response);
			for(var i:int = 0;i < response.length;i++)
			{
				var album:Album = Album(response[i])
				trace("User Name"+album.getUserName());
				trace("Album Name"+album.getName());
				trace("Description"+album.getDescription());
			}
		}
	}
}
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 - The local path for the file.

  • 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 Corona
  • create User Api for Cocos2DX
  • 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";					
photoService.addPhoto(userName, albumName, photoName, description, filePath, new App42CallBack() {
public void onSuccess(Object response) 
{
	Album album  = (Album)response;
	System.out.println("albumName is " + album.getName());  
	System.out.println("userName is " + album.getUserName());  
	System.out.println("description is " + album.getDescription());  
	ArrayList<Album.Photo> photoList = album.getPhotoList();  
	for(Album.Photo photo : photoList)  
	{    
		System.out.println("name is " + photo.getName());  
		System.out.println("description is " + photo.getDescription());  			
		System.out.println("ThumbNail Tiny Url"+photo.getThumbNailTinyUrl());
		System.out.println("ThumbNail Url"+photo.getThumbNailUrl());
		System.out.println("Tiny Url"+photo.getTinyUrl());
		System.out.println("Url"+photo.getUrl());
	} 
}
public void onException(Exception ex)
{
	System.out.println("Exception Message"+ex.getMessage());
}
});    
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,new Callback()); 
public class Callback : App42Callback  
{   
	public void OnSuccess(Object response)  
	{  
		 Album album = (Album) response;     
		 String jsonResponse = album.ToString();  
	}  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	} 
}  
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 photoDescription: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());  
System.out.println("description is " + album.getDescription());  
ArrayList<Album.Photo> photoList = album.getPhotoList();  
for(Album.Photo photo : photoList)  
{    
	System.out.println("name is " + photo.getName());  
	System.out.println("description is " + photo.getDescription());  			
	System.out.println("ThumbNail Tiny Url"+photo.getThumbNailTinyUrl());
	System.out.println("ThumbNail Url"+photo.getThumbNailUrl());
	System.out.println("Tiny Url"+photo.getTinyUrl());
	System.out.println("Url"+photo.getUrl());
} 
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";	
App42Log.SetDebug(true);        //Prints output in your editor console
photoService.AddPhoto(userName, albumName, photoName, description, filePath, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        Album album = (Album) response;   
        App42Log.Console("userName is :" + album.GetUserName());
        App42Log.Console("albumName is :" + album.GetName());
        App42Log.Console("Description is :" + album.GetDescription());
        App42Log.Console("jsonResponse is :" + album.ToString());
        IList<Album.Photo> photoList = album.GetPhotoList();;   
        for(int i = 0; i < photoList.Count; i++)
        {
    	App42Log.Console("PhotoName is :" + photoList[i].GetName());
        App42Log.Console("Url is :" + photoList[i].GetUrl());
    	App42Log.Console("TinyUrl is :" + photoList[i].GetTinyUrl());
    	App42Log.Console("ThumbNailUrl is :" + photoList[i].GetThumbNailUrl());
    	App42Log.Console("ThumbNailTinyUrl is :" + photoList[i].GetThumbNailTinyUrl());
    	App42Log.Console("jsonResponse is :" + photoList[i].ToString());
        }
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
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) {  
	}  
}); 
Coming Soon
Coming Soon
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("albumName is " .$album->getName());
print_r("userName is " .$album->getUserName());
print_r("description is " .$album->getDescription());
$photo = $album->getPhotoList();
foreach($photo as $photoList)
{
	print_r("name is " .$photoList->getName());
	print_r("description is " .$photoList->getDescription());
	print_r("ThumbNail Tiny Url".$photoList->getThumbNailTinyUrl());
	print_r("ThumbNail Url".$photoList->getThumbNailUrl());
	print_r("Tiny Url".$photoList->getTinyUrl());
	print_r("Url".$photoList->getUrl());
} 
$jsonResponse = $album->toString(); 
Coming Soon
userName = "Nick";
albumName = "MyAlbum";
photoName = "Photo091";
description = "Photo Details";
filePath = "Local file path";
album = photo_service.add_photo(userName, albumName, photoName, description, filePath);
puts "albumName is #{album.name}";
puts "userName is #{album.userName}";
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();
var userName:String = "Nick";  
var albumName:String = "My Album";  
var photoName:String = "My Photo";  
var description:String = "Photo Details";  
var filePath:String = "Your Local file path";    
photoService.addPhoto(userName, albumName, photoName,description,filePath,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		trace("response is  " + response);
		var albumObj:Album  = Album(response);
		var photoList:Array = albumObj.getPhotoList();
		trace("UserName"+albumObj.getUserName());
		trace("AlbumName"+albumObj.getName());
		trace("Description of album"+albumObj.getDescription());
		if(photoList !=null)
		{
			for(var p:int=0;p<photoList.length;p++)
			{
				var photo1:Photo = Photo(photoList[p]);
				trace("Description Photo is"+photo1.getDescription());
				trace("Photo Name"+photo1.getName())
				trace("ThumbNail Tiny Url"+photo1.getThumbNailTinyUrl());
				trace("ThumbNail Url"+photo1.getThumbNailUrl());
				trace("Tiny Url"+photo1.getTinyUrl());
				trace("Url"+photo1.getUrl());
			}
		}	
	}
}
Coming Soon 

Add Tag To Photo

Add tags to the Photos for the user in the album.

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 Corona
  • create User Api for Cocos2DX
  • 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");	
photoService.addTagToPhoto(userName, albumName, photoName, tagList, new App42CallBack() {
public void onSuccess(Object response) 
{
	Album album  = (Album)response;
	System.out.println("albumName is " + album.getName());  
	System.out.println("userName is " + album.getUserName());  
	System.out.println("description is " + album.getDescription());  
	ArrayList<Album.Photo> photoList = album.getPhotoList();  
	for(Album.Photo photo : photoList)  
	{    
		System.out.println("name is " + photo.getName());  
		System.out.println("description is " + photo.getDescription());  			
		System.out.println("ThumbNail Tiny Url"+photo.getThumbNailTinyUrl());
		System.out.println("ThumbNail Url"+photo.getThumbNailUrl());
		System.out.println("Tiny Url"+photo.getTinyUrl());
		System.out.println("Url"+photo.getUrl());
		if(photo.getTagList().size()> 0)
		{
			for(int j=0;j<photo.getTagList().size();j++)
			{
				System.out.println("Tag Listis : " + photo.getTagList().get(j));
			}
		}
	} 
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});
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,new Callback()); 
public class Callback : App42Callback  
{    
	public void OnSuccess(Object response)  
	{  
		Album album = (Album) response;     
		String jsonResponse = album.ToString();  
	}
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
}  
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());  
System.out.println("description is " + album.getDescription());  
ArrayList<Album.Photo> photoList = album.getPhotoList();  
for(Album.Photo photo : photoList)  
{    
	System.out.println("name is " + photo.getName());  
	System.out.println("description is " + photo.getDescription());  			
	System.out.println("ThumbNail Tiny Url"+photo.getThumbNailTinyUrl());
	System.out.println("ThumbNail Url"+photo.getThumbNailUrl());
	System.out.println("Tiny Url"+photo.getTinyUrl());
	System.out.println("Url"+photo.getUrl());
	if(photo.getTagList().size()> 0)
	{
		for(int j=0;j<photo.getTagList().size();j++)
		{
			System.out.println("Tag Listis : " + photo.getTagList().get(j));
		}
	}
}  
String jsonResponse = album.toString(); 
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";
IList<String> tagList = new List<String>();    				
tagList.Add("John");	
App42Log.SetDebug(true);        //Prints output in your editor console
photoService.AddTagToPhoto(userName,albumName,photoName,taglist, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        Album album = (Album) response;   
    	App42Log.Console("userName is :" + album.GetUserName());
        App42Log.Console("albumName is :" + album.GetName());
        App42Log.Console("Description is :" + album.GetDescription());
        App42Log.Console("jsonResponse is :" + album.ToString());
        IList<Album.Photo> photoList = album.GetPhotoList();;   
        for(int i = 0; i < photoList.Count; i++)
        {
    	App42Log.Console("PhotoName is :" + photoList[i].GetName());
        App42Log.Console("Url is :" + photoList[i].GetUrl());
    	App42Log.Console("TinyUrl is :" + photoList[i].GetTinyUrl());
    	App42Log.Console("ThumbNailUrl is :" + photoList[i].GetThumbNailUrl());
    	App42Log.Console("ThumbNailTinyUrl is :" + photoList[i].GetThumbNailTinyUrl());
    	App42Log.Console("jsonResponse is :" + photoList[i].ToString());
        }
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
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) {  
	}  
}); 
Coming Soon
Coming Soon
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());
print_r("description is " .$album->getDescription());
$photo = $album->getPhotoList();
foreach($photo as $photoList)
{
	print_r("name is " .$photoList->getName());
	print_r("description is " .$photoList->getDescription());
	print_r("ThumbNail Tiny Url".$photoList->getThumbNailTinyUrl());
	print_r("ThumbNail Url".$photoList->getThumbNailUrl());
	print_r("Tiny Url".$photoList->getTinyUrl());
	print_r("Url".$photoList->getUrl());
	$tag = $photoList->getTagList();
	foreach($tag as $tagList)
	{
		print_r("Tag Listis : " .$tagList);;
	}
}
$jsonResponse = $album->toString(); 
Coming Soon
userName = "Nick";
albumName = "MyAlbum";
photoName = "PhotoName_01";	
tagList = Array.new();
tagList.push("John");
album = photoService.add_tag_to_photo(userName, albumName, photoName, tagList);
puts "albumName is #{album.name}";
puts "userName is #{album.userName}";
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();
var userName:String = "Nick";  
var albumName:String = "MyAlbum"; 
var photoName:String = "My Photo";  
var tagList:Array = new Array();
tagList.push("John");
photoService.addTagToPhoto(userName, albumName, photoName, tagList,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		trace("response is  " + response);
		var albumObj:Album  = Album(response);
		var photoList:Array = albumObj.getPhotoList();
		trace("UserName"+albumObj.getUserName());
		trace("AlbumName"+albumObj.getName());
		trace("Description of album"+albumObj.getDescription());
		if(photoList !=null)
		{
			for(var p:int=0;p<photoList.length;p++)
			{
				var photo1:Photo = Photo(photoList[p]);
				trace("Description Photo is"+photo1.getDescription());
				trace("Photo Name"+photo1.getName())
				trace("ThumbNail Tiny Url"+photo1.getThumbNailTinyUrl());
				trace("ThumbNail Url"+photo1.getThumbNailUrl());
				trace("Tiny Url"+photo1.getTinyUrl());
				trace("Url"+photo1.getUrl());
				if(photo1.getTagList().length > 0)
				{
					for(var j:int=0;j<photo1.getTagList().length;j++)
					{
						trace("Tag Listis : " + photo1.getTagList()[j]);
					}
				}
			}
		}	
	}
} 
Coming Soon 

Get Photos

Fetch all the photos based on the username.

Required Parameters

userName - Name of the user for which the 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 Corona
  • create User Api for Cocos2DX
  • 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";
photoService.getPhotos(userName, new App42CallBack() {
public void onSuccess(Object response) 
{
	ArrayList<Album> albumList = (ArrayList<Album>)response;
	for(Album album : albumList)  
	{  
		System.out.println("albumName is " + album.getName());  
		System.out.println("userName is " + album.getUserName());  
		System.out.println("description is " + album.getDescription());  
		ArrayList<Album.Photo> photoList = album.getPhotoList();  
		for(Album.Photo photo : photoList)  
		{    
			System.out.println("name is " + photo.getName());  
			System.out.println("description is " + photo.getDescription());  
			System.out.println("ThumbNail Tiny Url"+photo.getThumbNailTinyUrl());
			System.out.println("ThumbNail Url"+photo.getThumbNailUrl());
			System.out.println("Tiny Url"+photo.getTinyUrl());
			System.out.println("Url"+photo.getUrl());
		}  
	}
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});    
String userName = "Nick";
photoService.GetPhotos(userName,new Callback()); 
public class Callback : App42Callback  
{   
	public void OnSuccess(Object response)  
	{  
		IList<Album> album = (Ilist<Album>) response;     
		String jsonResponse = album[0].ToString();  
	} 
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
}  
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);   
for(Album album : albumList)  
{  
	System.out.println("albumName is " + album.getName());  
	System.out.println("userName is " + album.getUserName());  
	System.out.println("description is " + album.getDescription());  
	ArrayList<Album.Photo> photoList = album.getPhotoList();  
	for(Album.Photo photo : photoList)  
	{    
		System.out.println("name is " + photo.getName());  
		System.out.println("description is " + photo.getDescription());  
		System.out.println("ThumbNail Tiny Url"+photo.getThumbNailTinyUrl());
		System.out.println("ThumbNail Url"+photo.getThumbNailUrl());
		System.out.println("Tiny Url"+photo.getTinyUrl());
		System.out.println("Url"+photo.getUrl());
	}  
}
String jsonResponse = album.get(0).toString();    
String userName = "Nick";
App42Log.SetDebug(true);        //Prints output in your editor console
photoService.GetPhotos(userName, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        Album album = (Album) response;  
        App42Log.Console("userName is :" + album.GetUserName());
        App42Log.Console("albumName is :" + album.GetName());
        App42Log.Console("Description is :" + album.GetDescription());
        App42Log.Console("jsonResponse is :" + album.ToString());
        IList<Album.Photo> photoList = album.GetPhotoList();;   
    	for(int i = 0; i < photoList.Count; i++)
        {
    	App42Log.Console("PhotoName is :" + photoList[i].GetName());
        App42Log.Console("Url is :" + photoList[i].GetUrl());
    	App42Log.Console("TinyUrl is :" + photoList[i].GetTinyUrl());
    	App42Log.Console("ThumbNailUrl is :" + photoList[i].GetThumbNailUrl());
    	App42Log.Console("ThumbNailTinyUrl is :" + photoList[i].GetThumbNailTinyUrl());
    	App42Log.Console("jsonResponse is :" + photoList[i].ToString());
        }
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
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) {  
	}  
}); 
Coming Soon
Coming Soon
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); 
foreach ($photoResponse as $album) 
{
	print_r("albumName is " . $album->getName());
	print_r("userName is " . $album->getUserName());
	print_r("description is " . $album->getDescription());
	$photo = $album->getPhotoList();
	foreach ($photo as $photoList) 
	{
		print_r("name is " . $photoList->getName());
		print_r("description is " . $photoList->getDescription());
		print_r("ThumbNail Tiny Url" . $photoList->getThumbNailTinyUrl());
		print_r("ThumbNail Url" . $photoList->getThumbNailUrl());
		print_r("Tiny Url" . $photoList->getTinyUrl());
		print_r("Url" . $photoList->getUrl());
	}
}
$jsonResponse = $photoResponse[0]->toString(); 
Coming Soon
userName = "Nick";	
album_list  = Array.new();
album_list = photo_service.get_photos(userName);
for album in album_list do
  puts "albumName is #{album.name}";
  puts "userName is #{album.userName}";
  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();
var userName:String = "Nick"; 
photoService.getPhotos(userName,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		if(response is Array)
		{
			trace("response is array " + response);
			for(var i:int = 0;i < response.length;i++)
			{								
				var albumObj1:Album  = Album(response[i]);
				var photoList1:Array = albumObj1.getPhotoList();
				trace("UserName"+albumObj1.getUserName());
				trace("AlbumName"+albumObj1.getName());
				trace("Description of album"+albumObj1.getDescription());
				for(var t:int=0;t<photoList1.length;t++)
				{
					var photoObject:Photo = Photo(photoList1[t]);
					trace("Description Photo is : "+photoObject.getDescription());
					trace("Album Name : "+photoObject.getName())
					trace("ThumbNail Tiny Url : "+photoObject.getThumbNailTinyUrl());
					trace("ThumbNail Url : "+photoObject.getThumbNailUrl());
					trace("Tiny Url : "+photoObject.getTinyUrl());
					trace("Url : "+photoObject.getUrl());
				}
			}			
		}	
	}
} 
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 Corona
  • create User Api for Cocos2DX
  • 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";
photoService.getTaggedPhotos(userName, tag, new App42CallBack() {
public void onSuccess(Object response) 
{
	ArrayList<Album> albumList = (ArrayList<Album>)response;
	for(Album album : albumList)  
	{  
		System.out.println("albumName is " + album.getName());  
		System.out.println("userName is " + album.getUserName());  
		System.out.println("description is " + album.getDescription());  
		ArrayList<Album.Photo> photoList = album.getPhotoList();  
		for(Album.Photo photo : photoList)  
		{    
			System.out.println("name is " + photo.getName());  
			System.out.println("description is " + photo.getDescription());  
			System.out.println("ThumbNail Tiny Url"+photo.getThumbNailTinyUrl());
			System.out.println("ThumbNail Url"+photo.getThumbNailUrl());
			System.out.println("Tiny Url"+photo.getTinyUrl());
			System.out.println("Url"+photo.getUrl());
			if(photo.getTagList().size()> 0)
			{
				for(int j=0;j<photo.getTagList().size();j++)
				{
					System.out.println("Tag Listis : " + photo.getTagList().get(j));
				}
			}
		}  
	}
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});   
String userName = "Nick";
String tag = "John";
photoService.GetTaggedPhotos(userName,tag,new Callback()); 
public class Callback : App42Callback  
{   
	public void OnSuccess(Object response)  
	{  
		IList<Album> album = (Ilist<Album>) response;     
		String jsonResponse = album[0].ToString();  
	} 
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
}  
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> albumList = photoService.getTaggedPhotos(userName,tag);   
for(Album album : albumList)  
{  
	System.out.println("albumName is " + album.getName());  
	System.out.println("userName is " + album.getUserName());  
	System.out.println("description is " + album.getDescription());  
	ArrayList<Album.Photo> photoList = album.getPhotoList();  
	for(Album.Photo photo : photoList)  
	{    
		System.out.println("name is " + photo.getName());  
		System.out.println("description is " + photo.getDescription());  
		System.out.println("ThumbNail Tiny Url"+photo.getThumbNailTinyUrl());
		System.out.println("ThumbNail Url"+photo.getThumbNailUrl());
		System.out.println("Tiny Url"+photo.getTinyUrl());
		System.out.println("Url"+photo.getUrl());
		if(photo.getTagList().size()> 0)
		{
			for(int j=0;j<photo.getTagList().size();j++)
			{
				System.out.println("Tag Listis : " + photo.getTagList().get(j));
			}
		}
	}  
}
String jsonResponse = album.get(0).toString();    
String userName = "Nick";
String tag = "John";
App42Log.SetDebug(true);        //Prints output in your editor console
photoService.GetTaggedPhotos(userName, tag, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        IList<Album> album = (IList<Album>) response;  
        for(int i=0; i < album.Count; i++)
        {
		App42Log.Console("userName is :" + album[i].GetUserName());
		App42Log.Console("albumName is :" + album[i].GetName());
        App42Log.Console("Description is :" + album[i].GetDescription());
        App42Log.Console("jsonResponse is :" + album[i].ToString());
        }
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
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) {  
	}  
}); 
Coming Soon
Coming Soon
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";
$photoResponse = $photoService->getTaggedPhotos($userName,$tag); 
foreach($photoResponse as $album)
{
	print_r("albumName is " .$album->getName());
	print_r("userName is " .$album->getUserName());
	print_r("description is " .$album->getDescription());
	print_r(count($album->getPhotoList()));

	$photo = $album->getPhotoList();
	foreach($photo as $photoList)
	{
		print_r("name is " .$photoList->getName());
		print_r("description is " .$photoList->getDescription());
		print_r("ThumbNail Tiny Url".$photoList->getThumbNailTinyUrl());
		print_r("ThumbNail Url".$photoList->getThumbNailUrl());
		print_r("Tiny Url".$photoList->getTinyUrl());
		print_r("Url".$photoList->getUrl());
		$tag = $photoList->getTagList();
		foreach($tag as $tagList)
		{
			print_r("Tag Listis : " .$tagList);;
		}
	}
}
$jsonResponse = $photoResponse[0]->toString(); 
Coming Soon
userName = "Nick";
tag = "joy";		
album_list  = Array.new();
album_list = photo_service.get_tagged_photos(userName, tag);
for album in album_list do
  puts "albumName is #{album.name}";
  puts "userName is #{album.userName}";
  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();
var userName:String = "Nick";
var tag:String = "John"; 
photoService.getTaggedPhotos(userName,tag,new callback());		
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		trace("response is  " + response);
		var albumObj:Album  = Album(response);
		var photoList:Array = albumObj.getPhotoList();
		trace("UserName"+albumObj.getUserName());
		trace("AlbumName"+albumObj.getName());
		trace("Description of album"+albumObj.getDescription());
		if(photoList !=null)
		{
			for(var p:int=0;p<photoList.length;p++)
			{
				var photo1:Photo = Photo(photoList[p]);
				trace("Description Photo is"+photo1.getDescription());
				trace("Photo Name"+photo1.getName())
				trace("ThumbNail Tiny Url"+photo1.getThumbNailTinyUrl());
				trace("ThumbNail Url"+photo1.getThumbNailUrl());
				trace("Tiny Url"+photo1.getTinyUrl());
				trace("Url"+photo1.getUrl());
				if(photo1.getTagList().length > 0)
				{
					for(var j:int=0;j<photo1.getTagList().length;j++)
					{
						trace("Tag List is : " + photo1.getTagList()[j]);
					}
				}
			}
		}	
	}
}
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 Corona
  • create User Api for Cocos2DX
  • 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";
photoService.getPhotosByAlbumName(userName,albumName, new App42CallBack() {
public void onSuccess(Object response) 
{
	Album album = (Album)response;
	System.out.println("albumName is " + album.getName());  
	System.out.println("userName is " + album.getUserName());  
	System.out.println("description is " + album.getDescription());  
	ArrayList<Album.Photo> photoList = album.getPhotoList();  
	for(Album.Photo photo : photoList)  
	{    
		System.out.println("name is " + photo.getName());  
		System.out.println("description is " + photo.getDescription());  
		System.out.println("ThumbNail Tiny Url"+photo.getThumbNailTinyUrl());
		System.out.println("ThumbNail Url"+photo.getThumbNailUrl());
		System.out.println("Tiny Url"+photo.getTinyUrl());
		System.out.println("Url"+photo.getUrl());
	} 
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});   
String userName = "Nick";
String albumName = "My Album";
photoService.GetPhotosByAlbumName(userName,albumName,new Callback()); 
public class Callback : App42Callback  
{   
	public void OnSuccess(Object response)  
	{  
		Album album = (Album) response;     
		String jsonResponse = album.ToString();  
	}  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	} 
}  
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("albumName is " + album.getName());  
System.out.println("userName is " + album.getUserName());  
System.out.println("description is " + album.getDescription());  
ArrayList<Album.Photo> photoList = album.getPhotoList();  
for(Album.Photo photo : photoList)  
{    
	System.out.println("name is " + photo.getName());  
	System.out.println("description is " + photo.getDescription());  
	System.out.println("ThumbNail Tiny Url"+photo.getThumbNailTinyUrl());
	System.out.println("ThumbNail Url"+photo.getThumbNailUrl());
	System.out.println("Tiny Url"+photo.getTinyUrl());
	System.out.println("Url"+photo.getUrl());
} 
String jsonResponse = album.toString();    
String userName = "Nick";
String albumName = "My Album";
App42Log.SetDebug(true);        //Prints output in your editor console
photoService.GetPhotosByAlbumName(userName,albumName, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        Album album = (Album) response;   
        App42Log.Console("userName is :" + album.GetUserName());
    	App42Log.Console("albumName is :" + album.GetName());
        App42Log.Console("Description is :" + album.GetDescription());
        App42Log.Console("jsonResponse is :" + album.ToString());
        IList<Album.Photo> photoList = album.GetPhotoList();
    	for(int i=0; i < photoList.Count; i++)
        {
    	App42Log.Console("Photo List jsonResponse is : " + photoList[i].ToString());
        App42Log.Console("Name is : " + photoList[i].GetName());
        App42Log.Console("ThumbNailUrl is : " + photoList[i].GetThumbNailUrl());
        App42Log.Console("ThumbNailTinyUrl is : " + photoList[i].GetThumbNailTinyUrl());
        App42Log.Console("Url is : " + photoList[i].GetUrl());
        App42Log.Console("TinyUrl is : " + photoList[i].GetTinyUrl());
    	}
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
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) {  
	}  
}); 
Coming Soon
Coming Soon
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("albumName is " .$album->getName());
print_r("userName is " .$album->getUserName());
print_r("description is " .$album->getDescription());
$photo = $album->getPhotoList();
foreach($photo as $photoList)
{
	print_r("name is " .$photoList->getName());
	print_r("description is " .$photoList->getDescription());
	print_r("ThumbNail Tiny Url".$photoList->getThumbNailTinyUrl());
	print_r("ThumbNail Url".$photoList->getThumbNailUrl());
	print_r("Tiny Url".$photoList->getTinyUrl());
	print_r("Url".$photoList->getUrl());
}
$jsonResponse = $album->toString(); 
Coming Soon
userName = "Nick";
albumName = "MyAlbum";	
album = photo_service.get_photos_by_albumName(userName, albumName);
puts "albumName is #{album.name}";
puts "userName is #{album.userName}";
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();
var userName:String = "Nick";  
var albumName:String = "MyAlbum";
photoService.getPhotosByAlbumName(userName,albumName,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		trace("response is  " + response);
		var albumObj:Album  = Album(response);
		var photoList:Array = albumObj.getPhotoList();
		trace("UserName"+albumObj.getUserName());
		trace("AlbumName"+albumObj.getName());
		trace("Description of album"+albumObj.getDescription());
		if(photoList !=null)
		{
			for(var p:int=0;p<photoList.length;p++)
			{
				var photo1:Photo = Photo(photoList[p]);
				trace("Description Photo is"+photo1.getDescription());
				trace("Photo Name"+photo1.getName())
				trace("ThumbNail Tiny Url"+photo1.getThumbNailTinyUrl());
				trace("ThumbNail Url"+photo1.getThumbNailUrl());
				trace("Tiny Url"+photo1.getTinyUrl());
				trace("Url"+photo1.getUrl());
			}
		}	
	}
} 
Coming Soon 

Get Photos By Album Name (Paging)

Fetches all Photos based on the username and album name by paging.

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 Corona
  • create User Api for Cocos2DX
  • 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;
photoService.getPhotosByAlbumName(userName,albumName, max, offset, new App42CallBack() {
public void onSuccess(Object response) 
{
	Album album = (Album)response;
	System.out.println("albumName is " + album.getName());  
	System.out.println("userName is " + album.getUserName());  
	System.out.println("description is " + album.getDescription());  
	ArrayList<Album.Photo> photoList = album.getPhotoList();  
	for(Album.Photo photo : photoList)  
	{    
		System.out.println("name is " + photo.getName());  
		System.out.println("description is " + photo.getDescription());  
		System.out.println("ThumbNail Tiny Url"+photo.getThumbNailTinyUrl());
		System.out.println("ThumbNail Url"+photo.getThumbNailUrl());
		System.out.println("Tiny Url"+photo.getTinyUrl());
		System.out.println("Url"+photo.getUrl());
	} 
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});   
String userName = "Nick";
String albumName = "My Album";
int max = 1;
int offset = 0;
photoService.GetPhotosByAlbumName(userName,albumName,max,offset,new Callback()); 
public class Callback : App42Callback  
{   
	public void OnSuccess(Object response)  
	{  
		Album album = (Album) response;     
		String jsonResponse = album.ToString();  
	}  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	} 
}  
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("albumName is " + album.getName());  
System.out.println("userName is " + album.getUserName());  
System.out.println("description is " + album.getDescription());  
ArrayList<Album.Photo> photoList = album.getPhotoList();  
for(Album.Photo photo : photoList)  
{    
	System.out.println("name is " + photo.getName());  
	System.out.println("description is " + photo.getDescription());  
	System.out.println("ThumbNail Tiny Url"+photo.getThumbNailTinyUrl());
	System.out.println("ThumbNail Url"+photo.getThumbNailUrl());
	System.out.println("Tiny Url"+photo.getTinyUrl());
	System.out.println("Url"+photo.getUrl());
} 
String jsonResponse = album.toString();    
String userName = "Nick";
String albumName = "My Album";
int max = 1;
int offset = 0;
App42Log.SetDebug(true);        //Prints output in your editor console
photoService.GetPhotosByAlbumName(userName,albumName,max,offset, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        Album album = (Album) response;   
        App42Log.Console("userName is :" + album.GetUserName());
        App42Log.Console("albumName is :" + album.GetName());
        App42Log.Console("Description is :" + album.GetDescription());
        App42Log.Console("jsonResponse is :" + album.ToString());
        IList<Album.Photo> photoList = album.GetPhotoList();
    	for(int i=0; i < photoList.Count; i++)
        {
    	App42Log.Console("Photo List jsonResponse is : " + photoList[i].ToString());
        App42Log.Console("Name is : " + photoList[i].GetName());
        App42Log.Console("ThumbNailUrl is : " + photoList[i].GetThumbNailUrl());
        App42Log.Console("ThumbNailTinyUrl is : " + photoList[i].GetThumbNailTinyUrl());
        App42Log.Console("Url is : " + photoList[i].GetUrl());
        App42Log.Console("TinyUrl is : " + photoList[i].GetTinyUrl());
        }
	}

	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
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) {  
	}  
}); 
Coming Soon
Coming Soon
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("albumName is " .$album->getName());
print_r("userName is " .$album->getUserName());
print_r("description is " .$album->getDescription());
$photo = $album->getPhotoList();
foreach($photo as $photoList)
{
	print_r("name is " .$photoList->getName());
	print_r("description is " .$photoList->getDescription());
	print_r("ThumbNail Tiny Url".$photoList->getThumbNailTinyUrl());
	print_r("ThumbNail Url".$photoList->getThumbNailUrl());
	print_r("Tiny Url".$photoList->getTinyUrl());
	print_r("Url".$photoList->getUrl());
}
$jsonResponse = $album->toString(); 
Coming Soon
userName = "Nick";
albumName = "MyAlbum";
max = 1;
offset = 0;			
album = photo_service.get_photos_by_albumName_by_paging(userName, albumName, max, offset);
puts "albumName is #{album.name}";
puts "userName is #{album.userName}";
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();
var userName:String = "Nick";  
var albumName:String = "MyAlbum";
var max:int=1;
var offset:int=0;
photoService.getPhotosByAlbumNameByPaging(userName,albumName,max,offset,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		trace("response is  " + response);
		var albumObj:Album  = Album(response);
		var photoList:Array = albumObj.getPhotoList();
		trace("UserName"+albumObj.getUserName());
		trace("AlbumName"+albumObj.getName());
		trace("Description of album"+albumObj.getDescription());
		if(photoList !=null)
		{
			for(var p:int=0;p<photoList.length;p++)
			{
				var photo1:Photo = Photo(photoList[p]);
				trace("Description Photo is"+photo1.getDescription());
				trace("Photo Name"+photo1.getName())
				trace("ThumbNail Tiny Url"+photo1.getThumbNailTinyUrl());
				trace("ThumbNail Url"+photo1.getThumbNailUrl());
				trace("Tiny Url"+photo1.getTinyUrl());
				trace("Url"+photo1.getUrl());
			}
		}	
	}
} 
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 Corona
  • create User Api for Cocos2DX
  • 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";
photoService.getPhotosCountByAlbumName(userName, albumName, new App42CallBack() {
public void onSuccess(Object response) 
{
	App42Response app42response = (App42Response)response;      
	System.out.println("Total Records is :" + app42response.getTotalRecords()) ;
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
}); 
String userName = "Nick"; 
String albumName = "My Album";
photoService.GetPhotosCountByAlbumName(userName,albumName, new Callback());  
public class Callback : App42Callback  
{   
	public void OnSuccess(Object response)  
	{  
		App42Response album = (App42Response) response;     
		String jsonResponse = album.ToString();  
	} 
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
}  
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 app42response = photoService.getPhotosCountByAlbumName(userName,albumName); 
System.out.println("Total Records  :" + app42response.getTotalRecords()) ;
boolean  success = app42response.isResponseSuccess();
String jsonResponse = app42response.toString(); 
String userName = "Nick";
String albumName = "My Album";
App42Log.SetDebug(true);        //Prints output in your editor console
photoService.GetPhotosCountByAlbumName(userName,albumName, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        App42Response app42Response = (App42Response) response;   
        App42Log.Console("app42Response is :" + app42Response.ToString());
    }
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
	Coming Soon
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); 
print_r("Total Records : ".$response->getTotalRecords());
$success = $response->isResponseSuccess();
$jsonResponse = $response->toString(); 
Coming Soon
userName = "Nick";
albumName = "MyAlbum";
response = photo_service.get_photos_count_by_albumName(userName, albumName);
success = response.is_response_success();
total_records = response.total_records();
json_response = response.to_s();
var userName:String = "Nick";  
var albumName:String = "MyAlbum";
photoService.getPhotosCountByAlbumName(userName,albumName,new callback());
App42Log.setDebug(true);
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		var app42response :App42Response= App42Response(response);      
		trace("TotalCount :" + app42response.getTotalRecords());    	
	}
} 
Coming Soon 

Get Photos By Album Name And Photo Name

Fetches the photo details 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 Corona
  • create User Api for Cocos2DX
  • 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";				
photoService.getPhotosByAlbumAndPhotoName(userName, albumName, photoName, new App42CallBack() {
public void onSuccess(Object response) 
{
	Album album = (Album)response;
	System.out.println("albumName is " + album.getName());  
	System.out.println("userName is " + album.getUserName());  
	System.out.println("description is " + album.getDescription());  
	ArrayList<Album.Photo> photoList = album.getPhotoList();  
	for(Album.Photo photo : photoList)  
	{    
		System.out.println("name is " + photo.getName());  
		System.out.println("description is " + photo.getDescription());  
		System.out.println("ThumbNail Tiny Url"+photo.getThumbNailTinyUrl());
		System.out.println("ThumbNail Url"+photo.getThumbNailUrl());
		System.out.println("Tiny Url"+photo.getTinyUrl());
		System.out.println("Url"+photo.getUrl());
	} 
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});    
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";	
photoService.GetPhotosByAlbumAndPhotoName(userName,albumName,photoName,new Callback()); 
public class Callback : App42Callback  
{ 
	public void OnSuccess(Object response)  
	{  
		Album album = (Album) response;     
		String jsonResponse = album.ToString();  
	}   
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
}  
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());  
System.out.println("description is " + album.getDescription());  
ArrayList<Album.Photo> photoList = album.getPhotoList();  
for(Album.Photo photo : photoList)  
{    
	System.out.println("name is " + photo.getName());  
	System.out.println("description is " + photo.getDescription());  
	System.out.println("ThumbNail Tiny Url"+photo.getThumbNailTinyUrl());
	System.out.println("ThumbNail Url"+photo.getThumbNailUrl());
	System.out.println("Tiny Url"+photo.getTinyUrl());
	System.out.println("Url"+photo.getUrl());
} 
String jsonResponse = album.toString();    
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";
App42Log.SetDebug(true);        //Prints output in your editor console
photoService.GetPhotosByAlbumAndPhotoName(userName, albumName, photoName, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        Album album = (Album) response;   
        App42Log.Console("userName is :" + album.GetUserName());
        App42Log.Console("albumName is :" + album.GetName());
        App42Log.Console("Description is :" + album.GetDescription());
        App42Log.Console("jsonResponse is :" + album.ToString());
        IList<Album.Photo> photoList = album.GetPhotoList();
        for(int i=0; i < photoList.Count; i++)
        {
    	App42Log.Console("Photo List jsonResponse is : " + photoList[i].ToString());
        App42Log.Console("Name is : " + photoList[i].GetName());
        App42Log.Console("ThumbNailUrl is : " + photoList[i].GetThumbNailUrl());
        App42Log.Console("ThumbNailTinyUrl is : " + photoList[i].GetThumbNailTinyUrl());
        App42Log.Console("Url is : " + photoList[i].GetUrl());
        App42Log.Console("TinyUrl is : " + photoList[i].GetTinyUrl());
        }
    }
    public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
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) {  
	}  
}); 
Coming Soon
Coming Soon
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("albumName is " .$album->getName());
print_r("userName is " .$album->getUserName());
print_r("description is " .$album->getDescription());
$photo = $album->getPhotoList();
foreach($photo as $photoList)
{
	print_r("name is " .$photoList->getName());
	print_r("description is " .$photoList->getDescription());
	print_r("ThumbNail Tiny Url".$photoList->getThumbNailTinyUrl());
	print_r("ThumbNail Url".$photoList->getThumbNailUrl());
	print_r("Tiny Url".$photoList->getTinyUrl());
	print_r("Url".$photoList->getUrl());
}
$jsonResponse = $album->toString(); 
Coming Soon
userName = "Nick";
albumName = "MyAlbum";
photoName = "Photo091";
album = photo_service.get_photos_by_album_and_photoName(userName, albumName, photoName);
puts "albumName is #{album.name}";
puts "userName is #{album.userName}";
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();
var userName:String = "Nick";  
var albumName:String = "MyAlbum"; 
var photoName:String = "My Photo"; 
photoService.getPhotosByAlbumAndPhotoName(userName,albumName, photoName ,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		trace("response is  " + response);
		var albumObj:Album  = Album(response);
		var photoList:Array = albumObj.getPhotoList();
		trace("UserName"+albumObj.getUserName());
		trace("AlbumName"+albumObj.getName());
		trace("Description of album"+albumObj.getDescription());
		if(photoList !=null)
		{
			for(var p:int=0;p<photoList.length;p++)
			{
				var photo1:Photo = Photo(photoList[p]);
				trace("Description Photo is"+photo1.getDescription());
				trace("Photo Name"+photo1.getName())
				trace("ThumbNail Tiny Url"+photo1.getThumbNailTinyUrl());
				trace("ThumbNail Url"+photo1.getThumbNailUrl());
				trace("Tiny Url"+photo1.getTinyUrl());
				trace("Url"+photo1.getUrl());
			}
		}	
	}
}
Coming Soon 

Remove Album

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

Required Parameters

userName - 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 Corona
  • create User Api for Cocos2DX
  • 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";
albumService.removeAlbum(userName, albumName, new App42CallBack() {
public void onSuccess(Object response) 
{
	App42Response app42response = (App42Response)response;      
	System.out.println("Response is " + app42response) ;
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
}); 
String userName = "Nick"; 
String albumName = "My Album";
albumService.RemoveAlbum(userName,albumName, new Callback());  
public class Callback : App42Callback  
{  
	public void OnSuccess(Object response)  
	{  
		App42Response album = (App42Response) response;     
		String jsonResponse = album.ToString();  
	}  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	}  
}  
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 app42response = albumService.removeAlbum(userName,albumName); 
System.out.println("Response is :" + app42response) ;
boolean  success = app42response.isResponseSuccess();
String jsonResponse = app42response.toString(); 
String userName = "Nick";
String albumName = "My Album";
App42Log.SetDebug(true);        //Prints output in your editor console
photoService.RemoveAlbum(userName,albumName, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        App42Response app42Response = (App42Response) response;   
        App42Log.Console("app42Response is :" + app42Response.ToString());
    }
    public void OnException(Exception e)
    {
		App42Log.Console("Exception : " + e);
	}
}
Coming Soon 
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); 
print_r("Response is : ".$response->toString());
$success = $response->isResponseSuccess();
$jsonResponse = $response->toString(); 
Coming Soon
userName = "Nick";
albumName = "MyAlbum";
response = album_service.remove_album(userName, albumName);
success = response.is_response_success();
json_response = response.to_s();
var userName:String = "Nick";  
var albumName:String = "MyAlbum"; 
albumService.removeAlbum(userName, albumName,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		var app42response :App42Response= App42Response(response);      
		trace("response is " + app42response)   	
	}
}
 Coming Soon

Remove Photo

Remove 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 - Name of the User whose photo has to be removed. albumName - Name of the Album in which photo 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 Corona
  • create User Api for Cocos2DX
  • 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";
photoService.removePhoto(userName,albumName,photoName, new App42CallBack() {
public void onSuccess(Object response) 
{
	App42Response app42response = (App42Response)response;      
	System.out.println("Response is :" + app42response) ;
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});
String userName = "Nick"; 
String albumName = "My Album";
String photoName = "My Photo";
photoService.RemovePhoto(userName,albumName,photoName, new Callback());
public class Callback : App42Callback  
{    
	public void OnSuccess(Object response)  
	{  
		App42Response album = (App42Response) response;     
		String jsonResponse = album.ToString();  
	}   
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	} 
}  
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 app42response = photoService.removePhoto(userName,albumName,photoName); 
System.out.println("Response is :" + app42response) ;
boolean  success = app42response.isResponseSuccess();
String jsonResponse = app42response.toString(); 
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";
App42Log.SetDebug(true);        //Prints output in your editor console
photoService.RemovePhoto(userName,albumName,photoName, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        App42Response app42Response = (App42Response) response;   
        App42Log.Console("app42Response is :" + app42Response.ToString());
    }
    public void OnException(Exception e)
    {
    	App42Log.Console("Exception : " + e);
	}
}
Coming Soon 
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); 
print_r("Response is : ".$response->toString());
$success = $response->isResponseSuccess();
$jsonResponse = $response->toString(); 
Coming Soon
userName = "Nick";
albumName = "MyAlbum";
photoName = "Album Description";
response = photo_service.remove_photo(userName, albumName, photoName);
success = response.is_response_success();
json_response = response.to_s();
var userName:String = "Nick";  
var albumName:String = "MyAlbum"; 
var photoName:String = "My Photo"; 
photoService.removePhoto(userName, albumName, photoName,new callback());
class callback implements App42CallBack
{	
	public function onException(exception:App42Exception):void
	{
		trace("Exception Message " + exception);
	}
	public function onSuccess(response:Object):void
	{					
		var app42response :App42Response= App42Response(response);      
		trace("response is " + app42response)   	
	}
} 
Coming Soon 

Update Photo

Update existing Photo for a particular user and album.Note Only Photo and description are changed(Photo Name can’t changed).

Required Parameters

userName - Name of the User whose photo has to be update. albumName - Name of the Album in which photo has to be update. photoName - Name of the Photo that has to be update. description - Description of the Photo that has to be updated. 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 Corona
  • create User Api for Cocos2DX
  • 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";
photoService.updatePhoto(userName, albumName, photoName,description,filePath,new App42CallBack() {
public void onSuccess(Object response) 
{
	Album album = (Album)response;
	System.out.println("Albumname is :" + album.getName());  
	System.out.println("Username is :" + album.getUserName());  
	System.out.println("Description is :" + album.getDescription());  
	ArrayList<Album.Photo> photoList = album.getPhotoList();  
	for(Album.Photo photo : photoList)  
	{    
		System.out.println("Photoname is " + photo.getName());  
		System.out.println("Photo Description is " + photo.getDescription());  
		System.out.println("ThumbNail Tiny Url is:"+photo.getThumbNailTinyUrl());
		System.out.println("ThumbNail Url is :"+photo.getThumbNailUrl());
		System.out.println("Tiny Url is :"+photo.getTinyUrl());
		System.out.println("Url is :"+photo.getUrl());
	} 
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});
String userName = "Nick";  
String albumName = "My Album";  
String photoName = "My Photo";  
String description = "Photo Details";  
String filePath = "Your Local file path";
photoService.UpdatePhoto(userName, albumName, photoName, description, filePath, new Callback()); 
public class Callback : App42Callback  
{   
	public void OnSuccess(Object response)  
	{  
		Album album = (Album) response;   
        Console.WriteLine("userName is :" + album.GetUserName());
        Console.WriteLine("albumName is :" + album.GetName());
        Console.WriteLine("Description is :" + album.GetDescription());
        Console.WriteLine("jsonResponse is :" + album.ToString());
        IList<Album.Photo> photoList = album.GetPhotoList();;   
        for(int i = 0; i < photoList.Count; i++)
        {
    	Console.WriteLine("PhotoName is :" + photoList[i].GetName());
        Console.WriteLine("Url is :" + photoList[i].GetUrl());
    	Console.WriteLine("TinyUrl is :" + photoList[i].GetTinyUrl());
    	Console.WriteLine("ThumbNailUrl is :" + photoList[i].GetThumbNailUrl());
    	Console.WriteLine("ThumbNailTinyUrl is :" + photoList[i].GetThumbNailTinyUrl());
    	Console.WriteLine("jsonResponse is :" + photoList[i].ToString());
        }
	}  
	public void OnException(App42Exception exception)  
	{  
		Console.WriteLine("Exception Message : " + exception);  
	} 
}
NSString *userName = @"Nick";
NSString *albumName = @"My Album";
NSString *photoName = @"My Photo";
NSString *photoDescription = @"Photo Details";
NSString *filePath	= @"Your Local file path";
Album *album = [photoService updatePhoto:userName albumName:albumName photoName:photoName photoDescription:photoDescription path:filePath]; 
NSLog(@"userName is %@" , album.userName);
NSLog(@"albumName is %@" ,  album.name);
NSMutableArray *photoListArray = album.photoList;               
for(Photo *photoList in photoListArray) 
{  
	NSLog(@"PhotoName is = %@ " , photoList.name);  
	NSLog(@"Url is = %@ " , photoList.url); 
}  
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.updatePhoto(userName, albumName, photoName, description, filePath);
System.out.println("Albumname is :" + album.getName());  
System.out.println("Username is :" + album.getUserName());  
System.out.println("Description is :" + album.getDescription());  
Vector photoList = album.getPhotoList();  
for(int i = 0; i < photoList.size(); i++)  
{    
	Album.Photo photo = (Album.Photo)photoList.elementAt(i); 
	System.out.println("Photoname is " + photo.getName());  
	System.out.println("Photo Description is " + photo.getDescription());  
	System.out.println("ThumbNail Tiny Url"+photo.getThumbNailTinyUrl());
	System.out.println("ThumbNail Url"+photo.getThumbNailUrl());
	System.out.println("Tiny Url"+photo.getTinyUrl());
	System.out.println("Url"+photo.getUrl());
} 
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.updatePhoto(userName, albumName, photoName, description, filePath);
System.out.println("Albumname is :" + album.getName());  
System.out.println("Username is :" + album.getUserName());  
System.out.println("Description is :" + album.getDescription());  
ArrayList<Album.Photo> photoList = album.getPhotoList();  
for(Album.Photo photo : photoList)  
{    
	System.out.println("Photoname is " + photo.getName());  
	System.out.println("Photo Description is " + photo.getDescription());  
	System.out.println("ThumbNail Tiny Url"+photo.getThumbNailTinyUrl());
	System.out.println("ThumbNail Url"+photo.getThumbNailUrl());
	System.out.println("Tiny Url"+photo.getTinyUrl());
	System.out.println("Url"+photo.getUrl());
} 
String userName = "Nick";  
String albumName = "My Album";  
String photoName = "My Photo";  
String description = "Photo Details";  
String filePath = "Your Local file path";  
App42Log.SetDebug(true);        //Prints output in your editor console
photoService.UpdatePhoto(userName, albumName, photoName, description, filePath, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnSuccess(object response)
    {
        Album album = (Album) response;   
        App42Log.Console("userName is :" + album.GetUserName());
        App42Log.Console("albumName is :" + album.GetName());
        App42Log.Console("Description is :" + album.GetDescription());
        App42Log.Console("jsonResponse is :" + album.ToString());
        IList<Album.Photo> photoList = album.GetPhotoList();;   
        for(int i = 0; i < photoList.Count; i++)
        {
    	App42Log.Console("PhotoName is :" + photoList[i].GetName());
        App42Log.Console("Url is :" + photoList[i].GetUrl());
    	App42Log.Console("TinyUrl is :" + photoList[i].GetTinyUrl());
    	App42Log.Console("ThumbNailUrl is :" + photoList[i].GetThumbNailUrl());
    	App42Log.Console("ThumbNailTinyUrl is :" + photoList[i].GetThumbNailTinyUrl());
    	App42Log.Console("jsonResponse is :" + photoList[i].ToString());
        }
	}
	public void OnException(Exception e)
	{
		App42Log.Console("Exception : " + e);
	}
}
Coming Soon 
Coming Soon
Coming Soon
String userName = "Nick";  
String albumName = "My Album";  
String photoName = "My Photo";  
String description = "Photo Details";  
String filePath = "Your Local file path";                
Album album = photoService.UpdatePhoto(userName, albumName, photoName,description, filePath);
Console.WriteLine("Albumname is :" + album.GetName());
Console.WriteLine("Username is :" + album.GetUserName());
Console.WriteLine("Description is :" + album.GetDescription());
for (int i = 0; i < album.GetPhotoList().Count; i++)
{
	Console.WriteLine("Photoname is :" + album.GetPhotoList()[i].GetName());
	Console.WriteLine("Photo Description is :" + album.GetPhotoList()[i].GetDescription());
	Console.WriteLine("Url is :" + album.GetPhotoList()[i].GetUrl());
	Console.WriteLine("TinyUrl is :" + album.GetPhotoList()[i].GetTinyUrl());
	Console.WriteLine("ThumbNailUrl is :" + album.GetPhotoList()[i].GetThumbNailUrl());
	Console.WriteLine("ThumbNailTinyUrl is :" + album.GetPhotoList()[i].GetThumbNailTinyUrl());
}
$userName = "Nick";  
$albumName = "My Album";  
$photoName = "My Photo";  
$description = "Photo Details";  
$filePath = "Your Local file path";   
$album = $photo->updatePhoto($userName, $albumName, $photoName, $description, $filePath);
print_r("albumName is " .$album->getName());
print_r("userName is " .$album->getUserName());
print_r("description is " .$album->getDescription());
$photo = $album->getPhotoList();
foreach($photo as $photoList)
{
	print_r("name is " .$photoList->getName());
	print_r("description is " .$photoList->getDescription());
	print_r("ThumbNail Tiny Url".$photoList->getThumbNailTinyUrl());
	print_r("ThumbNail Url".$photoList->getThumbNailUrl());
	print_r("Tiny Url".$photoList->getTinyUrl());
	print_r("Url".$photoList->getUrl());
}
Coming Soon
Coming Soon
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 Corona
  • create User Api for Cocos2DX
  • 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";	
albumService.createAlbum(userName, albumName, albumDescription, new App42CallBack() {
public void onSuccess(Object response) 
{
	Album album  = (Album)response;
	System.out.println("User Name"+album.getUserName());
	System.out.println("Album Name"+album.getName());
	System.out.println("Description"+album.getDescription());
}
public void onException(Exception ex) 
{
	App42Exception exception = (App42Exception)ex;
	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";	
albumService.CreateAlbum(userName,albumName,albumDescription, new Callback());  
public class Callback : App42Callback  
{   
	public void OnSuccess(Object response)  
	{  
		User user = (User) response;
		String jsonResponse = user.ToString();  
	}  
	public void 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(); 
	} 
}  
					
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(); 	
}       
String userName = "Nick";
String albumName = "My Album";
String albumDescription = "Album Description";
App42Log.SetDebug(true);        //Prints output in your editor console
photoService.CreateAlbum(userName,albumName,albumDescription, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnException(Exception 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 void OnSuccess(object response)
    {
        App42Log.Console("response is :" + response.ToString());
    }
}
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
		}
	}
});
Coming Soon
Coming Soon
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
var userName:String = "Nick";  
var albumName:String = "MyAlbum";  
var description:String = "Album Description";  
albumService.createAlbum(userName, albumName, description,new callback());
public class callback implements App42CallBack  
{   
	public function onSuccess(response:Object):void  
	{  
		var album:Album = Album(response);
		trace("Response is " + album) 
	}  
	public function onException(exception:App42Exception):void  
	{  
		var appErrorCode:int = exception.getAppErrorCode();  
		var httpErrorCode:int = 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
		}
	}  	
}  
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 exists. 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 : + "offset". 2507 - NOT FOUND - Album by the name '@albumName' for the user '@userName' have less photos than the specified offset : + "offset". 2508 - NOT FOUND - Albums and Photos for the tag '@tag' does not exist.