Photo Gallery Service

This module enables you to create your own photo gallery on the cloud where you can create, retrieve, remove and manage your photo albums. This service is very useful for developers who want to integrate Photo Gallery functionality in their Mobile/Device and Web Apps. Gallery API gives a complete Photo Gallery service and reduces the footprint on the device so that you can focus on other Gallery aspects such as how to render the Photo Gallery thereby reducing 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 Swift
  • 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 "Shephertz_App42_iOS_API/Shephertz_App42_iOS_API.h"   
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
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;
Initialize

In order to use the various functions available in a specific API, the developer has to initialize with App42API by passing the apiKey and the secretKey which will become available 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 Swift
  • 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.initializeWithAPIKey("API_KEY", andSecretKey:"SECRET_KEY")        
App42API.initialize("API_KEY","SECRET_KEY");
App42API.Initialize("API_KEY","SECRET_KEY");
App42.initialize("API_KEY","SECRET_KEY");
App42API:initialize("API_KEY","SECRET_KEY");
App42API::Initialize("API_KEY", "SECRET_KEY");
App42API.Initialize("API_KEY","SECRET_KEY");
App42API::initialize("API_KEY","SECRET_KEY"); 
App42API::Initialize("API_KEY", "SECRET_KEY");
api = App42::ServiceAPI.new("API_KEY","SECRET_KEY")   
App42API.initialize("API_KEY","SECRET_KEY");
Coming Soon
App42API.initialize("API_KEY","SECRET_KEY");
Build Service

After initialization, the developer will have to call the buildXXXService method on App42API to get the instance of the particular API that they 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 Swift
  • 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]; 
let albumService = App42API.buildAlbumService() as? AlbumService
let photoService = App42API.buildPhotoService() as? PhotoService
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
AlbumService albumService = App42API.buildAlbumService();
PhotoService photoService = App42API.buildPhotoService(); 
Create Albums

Create Album on the cloud.

Required Parameters

userName - The user to whom 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 Swift
  • 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";    
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
AlbumService albumService = App42API.buildAlbumService(); 
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());
}
public void onException(Exception ex) 
{
	System.out.println("Exception Message"+ex.getMessage());
}
});   
String userName = "Nick";
String albumName = "My Album";
String description = "Album Description";    
App42API.Initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.BuildAlbumService();  
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";
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"];
AlbumService *albumService = [App42API buildAlbumService]; 
[albumService createAlbum:userName albumName:albumName description:description completionBlock:^(BOOL success, id responseObj, App42Exception *exception) 
{
	if (success)
	{
		Album *album = (Album*)responseObj; 
		NSLog(@"userName is %@" , album.userName);
		NSLog(@"Album Name is %@",album.name);
	}
	else
	{
		NSLog(@"Exception = %@",[exception reason]);
		NSLog(@"HTTP error Code = %d",[exception httpErrorCode]);
		NSLog(@"App Error Code = %d",[exception appErrorCode]);
		NSLog(@"User Info = %@",[exception userInfo]);
	}
}];
let userName = "Nick" 
let albumName = "My Album"  
let description = "Album Description"  
App42API.initializeWithAPIKey("APP_KEY", andSecretKey:"SECRET_KEY")
let albumService = App42API.buildAlbumService() as? AlbumService 
albumService?.createAlbum(userName, albumName:albumName, albumDescription:description, completionBlock:(success, response, exception) -> Void in  
if (success)  
    {  
        let album = response as! Album   
        NSLog("%@" ,album.userName)
        NSLog("%@",album.name)  
    }  
    else  
    {  
        NSLog("%@",exception.reason!)
        NSLog("%d",exception.httpErrorCode)  
        NSLog("%d",exception.appErrorCode)  
        NSLog("%@",exception.userInfo!)  
    }   
})

String userName = "Nick";
String albumName = "My Album";
String description = "Album Description";	
App42API.initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.buildAlbumService(); 
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());
String jsonResponse = album.toString();    
String userName = "Nick";
String albumName = "My Album";
String description = "Album Description";
App42Log.SetDebug(true);    	//Prints output in your editor console
App42API.Initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.BuildAlbumService(); 
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 ;  
App42.initialize("API_KEY","SECRET_KEY");
var albumService  = new App42Album();
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.name)
},  
error: function(error) {  
}  
}); 
Coming Soon
Coming Soon
String userName = "Nick";
String albumName = "My Album";
String description = "Album Description";	
App42API.Initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.BuildAlbumService(); 
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";
App42API::initialize("API_KEY","SECRET_KEY");
$albumService = App42API::buildAlbumService();
$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";						
api = App42::ServiceAPI.new("API_KEY","SECRET_KEY") 
album_service = api.build_album_service() 
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";  
App42API.initialize("API_KEY","SECRET_KEY");
var albumService:AlbumService = App42API.buildAlbumService(); 
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 
String userName = "Nick";
String albumName = "My Album";
String description = "Album Description";	
App42API.initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.buildAlbumService();
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();    
Get Albums

Fetch all the albums based on the username.

Required Parameters

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

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for Swift
  • 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";
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
AlbumService albumService = App42API.buildAlbumService(); 
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";
App42API.Initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.BuildAlbumService();  
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";
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"];
AlbumService *albumService = [App42API buildAlbumService]; 
[albumService getAlbums:userName completionBlock:^(BOOL success, id responseObj, App42Exception *exception) 
{
	if (success)
	{
		NSArray *albumList = (NSArray*)responseObj;
		for (Album *album in albumList)
        {
			NSLog(@"userName is %@" , album.userName);
			NSLog(@"Album Name is %@",album.name);
		}
	}
	else
	{
		NSLog(@"Exception = %@",[exception reason]);
		NSLog(@"HTTP error Code = %d",[exception httpErrorCode]);
		NSLog(@"App Error Code = %d",[exception appErrorCode]);
		NSLog(@"User Info = %@",[exception userInfo]);
	}
}];
let userName = "Nick"  
App42API.initializeWithAPIKey("APP_KEY", andSecretKey:"SECRET_KEY")
let albumService = App42API.buildAlbumService() as? AlbumService 
albumService?.getAlbums(userName, completionBlock: { (success, response, exception) -> Void in  
if (success)  
    {  
        let albumList = response as! [Album]
         for album in albumList  
        {  
            NSLog("%@" , album.userName)
            NSLog("%@",album.name) 
        }    
          
    }  
else  
    {  
        NSLog("%@",exception.reason!)
        NSLog("%d",exception.httpErrorCode)  
        NSLog("%d",exception.appErrorCode)  
        NSLog("%@",exception.userInfo!)  
    }   
})
String userName = "Nick";
App42API.initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.buildAlbumService(); 
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
App42API.Initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.BuildAlbumService(); 
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 ;  
App42.initialize("API_KEY","SECRET_KEY");
var albumService  = new App42Album();
albumService.getAlbums(userName,{  
	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";
App42API.Initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.BuildAlbumService(); 
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";
App42API::initialize("API_KEY","SECRET_KEY");
$albumService = App42API::buildAlbumService();
$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();
api = App42::ServiceAPI.new("API_KEY","SECRET_KEY") 
album_service = api.build_album_service() 
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";
App42API.initialize("API_KEY","SECRET_KEY");
var albumService:AlbumService = App42API.buildAlbumService(); 
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 
String userName = "Nick";
App42API.initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.buildAlbumService();
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();    
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 Swift
  • 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";
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
AlbumService albumService = App42API.buildAlbumService(); 
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";
App42API.Initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.BuildAlbumService();  
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";
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"];
AlbumService *albumService = [App42API buildAlbumService]; 
[albumService getAlbumsCount:userName completionBlock:^(BOOL success, id responseObj, App42Exception *exception) 
{
	if (success)
	{
		App42Response *response = (App42Response*)responseObj; 
		NSString *success = response.isResponseSuccess;
		NSString *jsonResponse = [response toString]; 
	}
	else
	{
		NSLog(@"Exception = %@",[exception reason]);
		NSLog(@"HTTP error Code = %d",[exception httpErrorCode]);
		NSLog(@"App Error Code = %d",[exception appErrorCode]);
		NSLog(@"User Info = %@",[exception userInfo]);
	}
}];           
let userName = "Nick"  
App42API.initializeWithAPIKey("APP_KEY", andSecretKey:"SECRET_KEY")
let albumService = App42API.buildAlbumService() as? AlbumService  
albumService?.getAlbumsCount(userName, completionBlock: { (success, response, exception) -> Void in 
if (success)  
    {  
       let response = response as! App42Response
       NSLog("%@", response.strResponse)
       NSLog("%@", response.isResponseSuccess)    
          
    }  
    else  
    {  
        NSLog("%@",exception.reason!)
        NSLog("%d",exception.httpErrorCode)  
        NSLog("%d",exception.appErrorCode)  
        NSLog("%@",exception.userInfo!)  
    }   
})
String userName = "Nick";
App42API.initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.buildAlbumService(); 
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
App42API.Initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.BuildAlbumService(); 
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);
	}
}
var userName = "Nick",
result;
App42.initialize("API_KEY", "SECRET_KEY");
var albumService = new App42Album();
albumService.getAlbumsCount(userName, {
	success: function (object) {
		var albumObj = JSON.parse(object);
		result = albumObj.app42.response.totalRecords;
		console.log("TotalRecords : " + result);
	},
	error: function (error) {
	}
});
Coming Soon
Coming Soon
String userName = "Nick";
App42API.Initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.BuildAlbumService(); 
App42Response response = albumService.GetAlbumsCount(); 
Boolean  success = response.IsResponseSuccess();
String jsonResponse = response.ToString(); 
$userName = "Nick";
App42API::initialize("API_KEY","SECRET_KEY");
$albumService = App42API::buildAlbumService();
$response = $albumService->getAlbumsCount(); 
print_r("Total Records : ".$response->getTotalRecords());
$success = $response->isResponseSuccess();
$jsonResponse = $response->toString(); 
Coming Soon
userName = "Nick";					
api = App42::ServiceAPI.new("API_KEY","SECRET_KEY") 
album_service = api.build_album_service() 
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";
App42API.initialize("API_KEY","SECRET_KEY");
var albumService:AlbumService = App42API.buildAlbumService(); 
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 
String userName = "Nick";
App42API.initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.buildAlbumService();
App42Response response = albumService.getAlbumsCount(userName); 
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
Get Albums Paging

Fetch all the albums based on the username by paging.

Required Parameters

userName - Name of the user whose 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 Swift
  • 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 ;
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
AlbumService albumService = App42API.buildAlbumService(); 
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 ;
App42API.Initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.BuildAlbumService();  
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 ;
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"];
AlbumService *albumService = [App42API buildAlbumService]; 
[albumService getAlbums:userName max:max offset:offset completionBlock:^(BOOL success, id responseObj, App42Exception *exception) 
{
	if (success)
	{
		NSArray *albumList = (NSArray*)responseObj;
		for (Album *album in albumList)
        {
			NSLog(@"userName is %@" , album.userName);
			NSLog(@"Album Name is %@",album.name);
		}
	}
	else
	{
		NSLog(@"Exception = %@",[exception reason]);
		NSLog(@"HTTP error Code = %d",[exception httpErrorCode]);
		NSLog(@"App Error Code = %d",[exception appErrorCode]);
		NSLog(@"User Info = %@",[exception userInfo]);
	}
}];
let userName = "Nick"
let max:Int32 = 1
let offset:Int32 = 0
App42API.initializeWithAPIKey("APP_KEY", andSecretKey:"SECRET_KEY")
let albumService = App42API.buildAlbumService() as? AlbumService
albumService?.getAlbums(userName, max:max, offset: offset, completionBlock: { (success, response, exception) -> Void in
if (success)  
    {  
    let albumList = response as! [Album]
    for album in albumList  
        {  
            NSLog("%@" , album.userName)
            NSLog("%@",album.name) 
        }    
   }  
    else  
    {  
        NSLog("%@",exception.reason!)
        NSLog("%d",exception.httpErrorCode)  
        NSLog("%d",exception.appErrorCode)  
        NSLog("%@",exception.userInfo!)  
    }   
)}

String userName = "Nick";
int max = 1;
int offset = 0 ;
App42API.initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.buildAlbumService(); 
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
App42API.Initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.BuildAlbumService(); 
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 ;  
App42.initialize("API_KEY","SECRET_KEY");
var albumService  = new App42Album();
albumService.getAlbums(userName,max,offset,{  
	success: function(object) {  
	var albumObj = JSON.parse(object);  
	result = albumObj.app42.response.albums.album;
	 if (result instanceof Array) {
                for (var i = 0; i < result.length; i++) {
                    console.log("userName is " + result[i].userName)
					console.log("albumName is " + result[i].name)
                }
            } else {
                console.log("userName is " + result.userName)
				console.log("albumName is " + result.name)
            }
	},  
	error: function(error) {  
	}  
}); 
Coming Soon
Coming Soon
String userName = "Nick";
int max = 1;
int offset = 0 ;
App42API.Initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.BuildAlbumService(); 
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 ;
App42API::initialize("API_KEY","SECRET_KEY");
$albumService = App42API::buildAlbumService();
$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();
api = App42::ServiceAPI.new("API_KEY","SECRET_KEY") 
album_service = api.build_album_service() 
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 ;  
App42API.initialize("API_KEY","SECRET_KEY");
var albumService:AlbumService = App42API.buildAlbumService(); 
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 
String userName = "Nick";
Integer max = new Integer(1);
Integer offset = new Integer(0);  
App42API.initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.buildAlbumService();
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();    
Get Album By Name

Fetch album details based on the username.

Required Parameters

userName - Name of the user whose 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 Swift
  • 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";
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
AlbumService albumService = App42API.buildAlbumService(); 
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";
App42API.Initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.BuildAlbumService();  
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";
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"];
AlbumService *albumService = [App42API buildAlbumService]; 
[albumService getAlbumByName:userName albumName:albumName completionBlock:^(BOOL success, id responseObj, App42Exception *exception) 
{
	if (success)
	{
		Album *album = (Album*)responseObj; 
		NSLog(@"userName is %@" , album.userName);
		NSLog(@"albumName is %@" ,  album.name);
	}
	else
	{
		NSLog(@"Exception = %@",[exception reason]);
		NSLog(@"HTTP error Code = %d",[exception httpErrorCode]);
		NSLog(@"App Error Code = %d",[exception appErrorCode]);
		NSLog(@"User Info = %@",[exception userInfo]);
	}
}];
let userName = "Nick"  
let albumName = "My Album"  
App42API.initializeWithAPIKey("APP_KEY", andSecretKey:"SECRET_KEY")
let albumService = App42API.buildAlbumService() as? AlbumService  
albumService?.getAlbumByName(userName, albumName:albumName, completionBlock: { (success, response, exception) -> Void in
if (success)  
    {  
        let album = response as! Album   
        NSLog("%@" , album.userName)  
        NSLog("%@",album.name)  
    }  
    else  
    {  
        NSLog("%@",exception.reason!)
        NSLog("%d",exception.httpErrorCode)  
        NSLog("%d",exception.appErrorCode)  
        NSLog("%@",exception.userInfo!)  
    }   
})

String userName = "Nick";
String albumName = "My Album";
App42API.initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.buildAlbumService(); 
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
App42API.Initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.BuildAlbumService(); 
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 ;  
App42.initialize("API_KEY","SECRET_KEY");
var albumService  = new App42Album();
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";
App42API.Initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.BuildAlbumService(); 
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";
App42API::initialize("API_KEY","SECRET_KEY");
$albumService = App42API::buildAlbumService();
$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";
api = App42::ServiceAPI.new("API_KEY","SECRET_KEY") 
album_service = api.build_album_service() 
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";  
App42API.initialize("API_KEY","SECRET_KEY");
var albumService:AlbumService = App42API.buildAlbumService(); 
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 
String userName = "Nick";
String albumName = "My Album";
App42API.initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.buildAlbumService();
Album album = albumService.getAlbumByName(userName,albumName);   
System.out.println("userName is " + album.getUserName());
System.out.println("albumName is " + album.getName());
String jsonResponse = album.toString();    
Add Photo

Add 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 Swift
  • 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";					
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService();
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";	
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService();   
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";
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"];
PhotoService *photoService = [App42API buildPhotoService]; 
[photoService addPhoto:userName albumName:albumName photoName:photoName photoDescription:description path:filePath completionBlock:^(BOOL success, id responseObj, App42Exception *exception) 
{
	if (success)
	{
		Album *album = (Album*)responseObj; 
		NSLog(@"userName is %@" , album.userName);
		NSLog(@"albumName is %@" ,  album.name);
		NSMutableArray *photoList = album.photoList;
		for (Photo *photo in photoList)
        {
            NSLog(@"Photo Name=%@",photo.name);
			NSLog(@"URL=%@",photo.url);
			NSLog(@"CreatedOn=%@",photo.createdOn);
		}
	}
	else
	{
		NSLog(@"Exception = %@",[exception reason]);
		NSLog(@"HTTP error Code = %d",[exception httpErrorCode]);
		NSLog(@"App Error Code = %d",[exception appErrorCode]);
		NSLog(@"User Info = %@",[exception userInfo]);
	}
}];
let userName = "Nick"  
let albumName = "My Album" 
let description = "Album Description"
let photoName  = "My Photo" 
let filePath   = NSBundle.mainBundle().pathForResource("Image", ofType: "png")   
App42API.initializeWithAPIKey("APP_KEY", andSecretKey:"SECRET_KEY")
let photoService = App42API.buildPhotoService() as? PhotoService
photoService?.addPhoto(userName, albumName:albumName, photoName:photoName, photoDescription:description, path:filePath, completionBlock:{ (success, response, exception) -> Void in
if (success)  
    {  
        let albumList = response as! [Album]
        for album in albumList
        {
            NSLog("%@" , album.userName)
            NSLog("%@",album.name)
            let photoList = album.photoList
            for photo in photoList
            {
                NSLog("%@",photo.name);
                NSLog("%@",photo.description);
                NSLog("%@",photo.url);
                NSLog("%@",photo.thumbNailUrl);
            }
        }

    }  
    else  
    {  
        NSLog("%@",exception.reason!)
        NSLog("%d",exception.httpErrorCode)  
        NSLog("%d",exception.appErrorCode)  
        NSLog("%@",exception.userInfo!)  
    }   
})
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";
String description = "Photo Details";
String filePath	= "Your Local file path";					
App42API.initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService(); 
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
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService();
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;
App42.initialize("API_KEY","SECRET_KEY");
var photoService  = new App42Photo();
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";					
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService(); 
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";					
App42API::initialize("API_KEY","SECRET_KEY");
$photoService = App42API::buildPhotoService();
$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";
api = App42::ServiceAPI.new("API_KEY","SECRET_KEY") 
photo_service = api.build_photo_service() 
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";    
App42API.initialize("API_KEY","SECRET_KEY");
var photoService:PhotoService = App42API.buildPhotoService();
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 
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";
String description = "Photo Details";
String filePath	= "Your Local file path";					
App42API.initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService(); 
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();    
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 Swift
  • 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");	
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService();
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");	
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService();   
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"];					
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"];
PhotoService *photoService = [App42API buildPhotoService]; 
[photoService addTagToPhoto:userName albumName:albumName photoName:photoName tagList:tagList completionBlock:^(BOOL success, id responseObj, App42Exception *exception) 
{
	if (success)
	{
		Album *album = (Album*)responseObj; 
		NSLog(@"userName is %@" , album.userName);
		NSLog(@"albumName is %@" ,  album.name);
		NSMutableArray *photoList = album.photoList;
		for (Photo *photo in photoList)
        {
            NSLog(@"Photo Name=%@",photo.name);
			NSLog(@"URL=%@",photo.url);
			NSLog(@"CreatedOn=%@",photo.createdOn);
		}
	}
	else
	{
		NSLog(@"Exception = %@",[exception reason]);
		NSLog(@"HTTP error Code = %d",[exception httpErrorCode]);
		NSLog(@"App Error Code = %d",[exception appErrorCode]);
		NSLog(@"User Info = %@",[exception userInfo]);
	}
}];
let userName = "Nick"  
let albumName = "My Album" 
let photoName  = "My Photo" 
let tagList = NSArray?.arrayWithObject:"John" 
App42API.initializeWithAPIKey("APP_KEY", andSecretKey:"SECRET_KEY")
let photoService = App42API.buildPhotoService() as? PhotoService 
photoService?.addTagToPhoto(userName, albumName:albumName, photoName:photoName,  tagList:tagList, completionBlock: { (success, response, exception) -> Void in  
if (success)  
    {  
        let album = response as! Album   
        NSLog("%@" , album.userName)  
        NSLog("%@",album.name)
        let photoList = album.photoList
        for photo in photoList
        {
        	NSLog("%@",photo.name);  
            NSLog("%@",photo.url);  
            NSLog("%@",photo.createdOn);  

        }   
    }  
    else  
    {  
        NSLog("%@",exception.reason!)
        NSLog("%d",exception.httpErrorCode)  
        NSLog("%d",exception.appErrorCode)  
        NSLog("%@",exception.userInfo!)  
    }   
})
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";
ArrayList<String> tagList = new ArrayList<String>();					
tagList.add("John");	
App42API.initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService(); 
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
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService();
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 ;
App42.initialize("API_KEY","SECRET_KEY");
var photoService  = new App42Photo();
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");	
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService(); 
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");
App42API::initialize("API_KEY","SECRET_KEY");
$photoService = App42API::buildPhotoService();
$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");
api = App42::ServiceAPI.new("API_KEY","SECRET_KEY") 
photo_service = api.build_photo_service() 
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");
App42API.initialize("API_KEY","SECRET_KEY");
var photoService:PhotoService = App42API.buildPhotoService();
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 
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";
Vector tagList = new Vector();					
tagList.addElement("John");	
App42API.initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService(); 
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(); 
Get Photos

Fetch all the photos based on the username.

Required Parameters

userName - Name of the user whose photos have to be fetched.

  • create User Api for Android
  • create User Api for Windows
  • create User Api for iOS
  • create User Api for Swift
  • 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";
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService();
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";
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService();   
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";
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"];
PhotoService *photoService = [App42API buildPhotoService]; 
[photoService getPhotos:userName completionBlock:^(BOOL success, id responseObj, App42Exception *exception) 
{
	if (success)
	{
		NSArray *albumList = (NSArray*)responseObj;
		for (Album *album in albumList)
        {
            NSLog(@"userName is %@" , album.userName);
			NSLog(@"albumName is %@" ,  album.name);
			NSMutableArray *photoList = album.photoList;
			for (Photo *photo in photoList)
			{
				NSLog(@"Photo Name=%@",photo.name);
				NSLog(@"URL=%@",photo.url);
				NSLog(@"CreatedOn=%@",photo.createdOn);
			}
		}
	}
	else
	{
		NSLog(@"Exception = %@",[exception reason]);
		NSLog(@"HTTP error Code = %d",[exception httpErrorCode]);
		NSLog(@"App Error Code = %d",[exception appErrorCode]);
		NSLog(@"User Info = %@",[exception userInfo]);
	}
}];
let userName = "Nick"   
App42API.initializeWithAPIKey("APP_KEY", andSecretKey:"SECRET_KEY")
let photoService = App42API.buildPhotoService() as? PhotoService  
photoService?.getPhotos(userName, completionBlock: { (success, response, exception) -> Void in   
if (success)  
    {  
        let albumList = response as! [Album]   
        for album in albumList
        {
            NSLog("%@" , album.userName)
            NSLog("%@",album.name)
            let photoList = album.photoList
            for photo in photoList
            {
                NSLog("%@",photo.name);
                NSLog("%@",photo.description);
                NSLog("%@",photo.url);
                NSLog("%@",photo.thumbNailUrl);
            }
        }

    }  
else  
    {  
        NSLog("%@",exception.reason!)
        NSLog("%d",exception.httpErrorCode)  
        NSLog("%d",exception.appErrorCode)  
        NSLog("%@",exception.userInfo!)  
    }   
)}

String userName = "Nick";
App42API.initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService(); 
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
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService();
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 ;  
App42.initialize("API_KEY","SECRET_KEY");
var photoService  = new App42Photo();
photoService.getPhotos(userName,{  
	success: function(object) {  
	  var albumObj = JSON.parse(object);  
	  result = albumObj.app42.response.albums.album;
	  if(result instanceof Array){
		for(var i=0;i<result.length;i++){
		console.log("userName is " + result[i].userName)
		console.log("albumName is " + result[i].name)
		}
	}else{
		console.log("userName is " + result.userName)
		console.log("albumName is " + result.name)
	}
	},  
	error: function(error) {  
	}  
}); 
Coming Soon
Coming Soon
String userName = "Nick";
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService(); 
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";
App42API::initialize("API_KEY","SECRET_KEY");
$photoService = App42API::buildPhotoService();
$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();
api = App42::ServiceAPI.new("API_KEY","SECRET_KEY")
photo_service = api.build_photo_service() 
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"; 
App42API.initialize("API_KEY","SECRET_KEY");
var photoService:PhotoService = App42API.buildPhotoService();
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 
String userName = "Nick";
App42API.initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService(); 
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();    
Get Tagged Photos

Fetche 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 Swift
  • 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";
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService();
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";
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService();   
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";
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"];
PhotoService *photoService = [App42API buildPhotoService]; 
[photoService getTaggedPhotos:userName tag:tag completionBlock:^(BOOL success, id responseObj, App42Exception *exception) 
{
	if (success)
	{
		NSArray *albumList = (NSArray*)responseObj;
		for (Album *album in albumList)
        {
            NSLog(@"userName is %@" , album.userName);
			NSLog(@"albumName is %@" ,  album.name);
			NSMutableArray *photoList = album.photoList;
			for (Photo *photo in photoList)
			{
				NSLog(@"Photo Name=%@",photo.name);
				NSLog(@"URL=%@",photo.url);
				NSLog(@"CreatedOn=%@",photo.createdOn);
			}
		}
	}
	else
	{
		NSLog(@"Exception = %@",[exception reason]);
		NSLog(@"HTTP error Code = %d",[exception httpErrorCode]);
		NSLog(@"App Error Code = %d",[exception appErrorCode]);
		NSLog(@"User Info = %@",[exception userInfo]);
	}
}];
let userName = "Nick" 
let tag = "John"   
App42API.initializeWithAPIKey("APP_KEY", andSecretKey:"SECRET_KEY")
let photoService = App42API.buildPhotoService() as? PhotoService 
photoService?.getTaggedPhotos(userName, tag:tag, completionBlock: { (success, response, exception) -> Void in
if (success)  
    {  
        let albumList = response as! [Album]
        for album in albumList
        {
            NSLog("%@" , album.userName)
            NSLog("%@",album.name)
            let photoList = album.photoList
            for photo in photoList
            {
                NSLog("%@",photo.name);
                NSLog("%@",photo.description);
                NSLog("%@",photo.url);
                NSLog("%@",photo.thumbNailUrl);
            }
        }
         
    }
    else  
    {  
        NSLog("%@",exception.reason!)
        NSLog("%d",exception.httpErrorCode)  
        NSLog("%d",exception.appErrorCode)  
        NSLog("%@",exception.userInfo!)  
    }   
})

String userName = "Nick";
String tag = "John";
App42API.initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService(); 
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
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService();
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 ;  
App42.initialize("API_KEY","SECRET_KEY");
var photoService  = new App42Photo();
photoService.getTaggedPhotos(userName,tag,{  
	success: function(object) {  
	var albumObj = JSON.parse(object);  
	result = albumObj.app42.response.albums.album;
    if(result instanceof Array){
		for(var i=0;i<result.length;i++){
		console.log("userName is " + result[i].userName)
		console.log("albumName is " + result[i].name)
		}
	}else{
		console.log("userName is " + result.userName)
		console.log("albumName is " + result.name)
	}
	},  
	error: function(error) {  
	}  
}); 
Coming Soon
Coming Soon
String userName = "Nick";
String tag = "John";
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService(); 
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";
App42API::initialize("API_KEY","SECRET_KEY");
$photoService = App42API::buildPhotoService();
$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();
api = App42::ServiceAPI.new("API_KEY","SECRET_KEY") 
photo_service = api.build_photo_service() 
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"; 
App42API.initialize("API_KEY","SECRET_KEY");
var photoService:PhotoService = App42API.buildPhotoService();
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 
String userName = "Nick";
String tag = "John";
App42API.initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService(); 
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();    
Get Photos By Album Name

Fetche 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 Swift
  • 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";
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService();
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";
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService();   
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";
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"];
PhotoService *photoService = [App42API buildPhotoService]; 
[photoService getPhotosByAlbumName:userName albumName:albumName completionBlock:^(BOOL success, id responseObj, App42Exception *exception) 
{
	if (success)
	{
		Album *album = (Album*)responseObj; 
		NSLog(@"userName is %@" , album.userName);
		NSLog(@"albumName is %@" ,  album.name);
		NSMutableArray *photoList = album.photoList;
		for (Photo *photo in photoList)
        {
            NSLog(@"Photo Name=%@",photo.name);
			NSLog(@"URL=%@",photo.url);
			NSLog(@"CreatedOn=%@",photo.createdOn);
		}
	}
	else
	{
		NSLog(@"Exception = %@",[exception reason]);
		NSLog(@"HTTP error Code = %d",[exception httpErrorCode]);
		NSLog(@"App Error Code = %d",[exception appErrorCode]);
		NSLog(@"User Info = %@",[exception userInfo]);
	}
}];
let userName = "Nick" 
let albumName  = "My Album"   
App42API.initializeWithAPIKey("APP_KEY", andSecretKey:"SECRET_KEY")
let photoService = App42API.buildPhotoService() as? PhotoService  
photoService?.getPhotosByAlbumName(albumName, userName:userName,completionBlock: { (success, response, exception) -> Void in  
if (success)
{
    let albumList = response as! [Album]
    for album in albumList
    {
        NSLog("%@" , album.userName)
        NSLog("%@",album.name)
        let photoList = album.photoList
        for photo in photoList
        {
            NSLog("%@",photo.name);
            NSLog("%@",photo.description);
            NSLog("%@",photo.url);
            NSLog("%@",photo.thumbNailUrl);
        }
    }
}
else  
    {  
        NSLog("%@",exception.reason!)
        NSLog("%d",exception.httpErrorCode)  
        NSLog("%d",exception.appErrorCode)  
        NSLog("%@",exception.userInfo!)  
    }   
})

String userName = "Nick";
String albumName = "My Album";
App42API.initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService(); 
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
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService();
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 ;  
App42.initialize("API_KEY","SECRET_KEY");
var photoService  = new App42Photo();
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";
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService(); 
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";
App42API::initialize("API_KEY","SECRET_KEY");
$photoService = App42API::buildPhotoService();
$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";	
api = App42::ServiceAPI.new("API_KEY","SECRET_KEY")
photo_service = api.build_photo_service() 
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";
App42API.initialize("API_KEY","SECRET_KEY");
var photoService:PhotoService = App42API.buildPhotoService();
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 
String userName = "Nick";
String albumName = "My Album";
App42API.initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService(); 
Album album = photoService.getPhotosByAlbumName(userName,albumName);   
System.out.println("userName is " + album.getUserName());
System.out.println("albumName is " + album.getName());
String jsonResponse = album.toString();    
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 Swift
  • 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;
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService();
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;
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService();   
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;
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"];
PhotoService *photoService = [App42API buildPhotoService]; 
[photoService getPhotosByAlbumName:max offset:offset userName:userName albumName:albumName completionBlock:^(BOOL success, id responseObj, App42Exception *exception) 
{
	if (success)
	{
		Album *album = (Album*)responseObj; 
		NSLog(@"userName is %@" , album.userName);
		NSLog(@"albumName is %@" ,  album.name);
		NSMutableArray *photoList = album.photoList;
		for (Photo *photo in photoList)
        {
            NSLog(@"Photo Name=%@",photo.name);
			NSLog(@"URL=%@",photo.url);
			NSLog(@"CreatedOn=%@",photo.createdOn);
		}
	}
	else
	{
		NSLog(@"Exception = %@",[exception reason]);
		NSLog(@"HTTP error Code = %d",[exception httpErrorCode]);
		NSLog(@"App Error Code = %d",[exception appErrorCode]);
		NSLog(@"User Info = %@",[exception userInfo]);
	}
}];
let userName = "Nick" 
let albumName  = "My Album"
let max:Int32 = 1
let offset:Int32 = 0    
App42API.initializeWithAPIKey("APP_KEY", andSecretKey:"SECRET_KEY")
let photoService = App42API.buildPhotoService() as? PhotoService 
photoService?.getPhotosByAlbumName(userName, albumName: albumName, completionBlock: { (success, response, exception) -> Void in
if (success)
   {
    let albumList = response as! [Album]
    for album in albumList
    {
        NSLog("%@" , album.userName)
        NSLog("%@",album.name)
        let photoList = album.photoList
        for photo in photoList
        {
            NSLog("%@",photo.name);
            NSLog("%@",photo.description);
            NSLog("%@",photo.url);
            NSLog("%@",photo.thumbNailUrl);
        }
    }
   }
else  
   {  
        NSLog("%@",exception.reason!)
        NSLog("%d",exception.httpErrorCode)  
        NSLog("%d",exception.appErrorCode)  
        NSLog("%@",exception.userInfo!)  
   }   
})

String userName = "Nick";
String albumName = "My Album";
int max = 1;
int offset = 0;
App42API.initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService(); 
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
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService();
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 ;  
App42.initialize("API_KEY","SECRET_KEY");
var photoService  = new App42Photo();
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;
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService(); 
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;
App42API::initialize("API_KEY","SECRET_KEY");
$photoService = App42API::buildPhotoService();
$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;			
api = App42::ServiceAPI.new("API_KEY","SECRET_KEY") 
photo_service = api.build_photo_service() 
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;
App42API.initialize("API_KEY","SECRET_KEY");
var photoService:PhotoService = App42API.buildPhotoService();
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 
String userName = "Nick";
String albumName = "My Album";
Integer max = new Integer(1);
Integer offset = new Integer(0);  
App42API.initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService(); 
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();    
Get Photos Count By Album Name

Fetche 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 Swift
  • 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";
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService();
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";
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService();   
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"; 
NSString *albumName = @"My Album";
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"];
PhotoService *photoService = [App42API buildPhotoService]; 
[photoService getPhotosCountByAlbumName:userName albumName:albumName completionBlock:^(BOOL success, id responseObj, App42Exception *exception) 
{
	if (success)
	{
		App42Response *response = (App42Response*)responseObj; 
		NSString *success = response.isResponseSuccess;
		NSString *jsonResponse = [response toString]; 
	}
	else
	{
		NSLog(@"Exception = %@",[exception reason]);
		NSLog(@"HTTP error Code = %d",[exception httpErrorCode]);
		NSLog(@"App Error Code = %d",[exception appErrorCode]);
		NSLog(@"User Info = %@",[exception userInfo]);
	}
}];    
let userName = "Nick" 
let albumName  = "My Album"    
App42API.initializeWithAPIKey("APP_KEY", andSecretKey:"SECRET_KEY")
let photoService = App42API.buildPhotoService() as? PhotoService  
photoService?.getPhotosCountByAlbumName(userName, albumName: albumName, completionBlock:{ (success, response, exception) -> Void in
if (success)  
    {  
        let response = response as! App42Response
        NSLog("%@", response.strResponse)
        NSLog("%@", response.isResponseSuccess)  
    }  
else  
    {  
        NSLog("%@",exception.reason!)
        NSLog("%d",exception.httpErrorCode)  
        NSLog("%d",exception.appErrorCode)  
        NSLog("%@",exception.userInfo!)  
    }   
})

String userName = "Nick";
String albumName = "My Album";
App42API.initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService(); 
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
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService();
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);
	}
}
var userName = "Nick",
albumName = "My Album",
result;
App42.initialize("API_KEY", "SECRET_KEY");
var photoService = new App42Photo();
photoService.getPhotosCountByAlbumName(userName, albumName, {
	success: function (object) {
		var albumObj = JSON.parse(object);
		result = albumObj.app42.response.totalRecords;
		console.log("TotalRecords : " + result);
	},
	error: function (error) {
	}
});
Coming Soon
Coming Soon
String userName = "Nick";
String albumName = "My Album";
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService(); 
App42Response response = photoService.GetPhotosCountByAlbumName(userName,albumName); 
Boolean  success = response.IsResponseSuccess();
String jsonResponse = response.ToString(); 
$userName = "Nick";
$albumName = "My Album";
App42API::initialize("API_KEY","SECRET_KEY");
$photoService = App42API::buildPhotoService();
$response = $photoService->getPhotosCountByAlbumName($userName,$albumName); 
print_r("Total Records : ".$response->getTotalRecords());
$success = $response->isResponseSuccess();
$jsonResponse = $response->toString(); 
Coming Soon
userName = "Nick";
albumName = "MyAlbum";
api = App42::ServiceAPI.new("API_KEY","SECRET_KEY") 
photo_service = api.build_photo_service() 
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";
App42API.initialize("API_KEY","SECRET_KEY");
var photoService:PhotoService = App42API.buildPhotoService();
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 
String userName = "Nick";
String albumName = "My Album";
App42API.initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService(); 
App42Response response = photoService.getPhotosCountByAlbumName(userName,albumName); 
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
Get Photos By Album Name And Photo Name

Fetch 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 Swift
  • 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";				
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService();
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";	
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService();   
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";
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"];
PhotoService *photoService = [App42API buildPhotoService]; 
[photoService getPhotosByAlbumAndPhotoName:userName albumName:albumName photoName:photoName completionBlock:^(BOOL success, id responseObj, App42Exception *exception) 
{
	if (success)
	{
		Album *album = (Album*)responseObj; 
		NSLog(@"userName is %@" , album.userName);
		NSLog(@"albumName is %@" ,  album.name);
		NSMutableArray *photoList = album.photoList;
		for (Photo *photo in photoList)
        {
            NSLog(@"Photo Name=%@",photo.name);
			NSLog(@"URL=%@",photo.url);
			NSLog(@"CreatedOn=%@",photo.createdOn);
		}
	}
	else
	{
		NSLog(@"Exception = %@",[exception reason]);
		NSLog(@"HTTP error Code = %d",[exception httpErrorCode]);
		NSLog(@"App Error Code = %d",[exception appErrorCode]);
		NSLog(@"User Info = %@",[exception userInfo]);
	}
}];
let userName = "Nick" 
let albumName  = "My Album"   
let photoName  = "My Photo"   
App42API.initializeWithAPIKey("APP_KEY", andSecretKey:"SECRET_KEY")
let photoService = App42API.buildPhotoService() as? PhotoService  
photoService?.getPhotosByAlbumAndPhotoName(userName, albumName: albumName, photoName: photoName, completionBlock: { (success, response, exception) -> Void in
if (success)
{
    let albumList = response as! [Album]
    for album in albumList
    {
        NSLog("%@" , album.userName)
        NSLog("%@",album.name)
        let photoList = album.photoList
        for photo in photoList
        {
            NSLog("%@",photo.name);
            NSLog("%@",photo.description);
            NSLog("%@",photo.url);
            NSLog("%@",photo.thumbNailUrl);
        }
    }
}
else
{
    NSLog("%@",exception.reason!)
    NSLog("%d",exception.httpErrorCode)
    NSLog("%d",exception.appErrorCode)
    NSLog("%@",exception.userInfo!)  
}
})

String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";				
App42API.initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService(); 
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
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService();
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 ;
App42.initialize("API_KEY","SECRET_KEY");
var photoService  = new App42Photo();
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";				
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService(); 
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";				
App42API::initialize("API_KEY","SECRET_KEY");
$photoService = App42API::buildPhotoService();
$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";
api = App42::ServiceAPI.new("API_KEY","SECRET_KEY") 
photo_service = api.build_photo_service() 
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"; 
App42API.initialize("API_KEY","SECRET_KEY");
var photoService:PhotoService = App42API.buildPhotoService();
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 
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";				
App42API.initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService(); 
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();    
Remove Album

Remove the album based on the username and album name.
Note: All photos in this album will also be removed.

Required Parameters

userName - User whose 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 Swift
  • 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";
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
AlbumService albumService = App42API.buildAlbumService(); 
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";
App42API.Initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.BuildAlbumService();  
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"; 
NSString *albumName = @"My Album";
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"];
AlbumService *albumService = [App42API buildAlbumService]; 
[albumService removeAlbum:userName albumName:albumName completionBlock:^(BOOL success, id responseObj, App42Exception *exception) 
{
	if (success)
	{
		App42Response *response = (App42Response*)responseObj; 
		NSString *success = response.isResponseSuccess;
		NSString *jsonResponse = [response toString]; 
	}
	else
	{
		NSLog(@"Exception = %@",[exception reason]);
		NSLog(@"HTTP error Code = %d",[exception httpErrorCode]);
		NSLog(@"App Error Code = %d",[exception appErrorCode]);
		NSLog(@"User Info = %@",[exception userInfo]);
	}
}]; 
let userName = "Nick" 
let albumName  = "My Album"    
App42API.initializeWithAPIKey("APP_KEY", andSecretKey:"SECRET_KEY")
let albumService = App42API.buildAlbumService() as? AlbumService
albumService?.removeAlbum(userName, albumName: albumName, completionBlock: { (success, response, exception) -> Void in
if (success)
{  
    let response = response as! App42Response
    NSLog("%@", response.strResponse)
    NSLog("%@", response.isResponseSuccess)  
}  
else  
{  
    NSLog("%@",exception.reason!)
    NSLog("%d",exception.httpErrorCode)  
    NSLog("%d",exception.appErrorCode)  
    NSLog("%@",exception.userInfo!)  
}   
})

String userName = "Nick";
String albumName = "My Album";
App42API.initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.buildAlbumService(); 
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
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService();
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);
	}
}
var userName = "Nick",
albumName = "My Album",
result;
App42.initialize("API_KEY", "SECRET_KEY");
var albumService = new App42Album();
albumService.removeAlbum(userName, albumName, {
	success: function (object) {
		var albumObj = JSON.parse(object);
		result = albumObj.app42.response;
		console.log("App42Response : " + result);
	},
	error: function (error) {
	}
});
Coming Soon
Coming Soon
String userName = "Nick";
String albumName = "My Album";
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService(); 
App42Response response = albumService.RemoveAlbum(userName,albumName); 
Boolean  success = response.IsResponseSuccess();
String jsonResponse = response.ToString(); 
$userName = "Nick";
$albumName = "My Album";
App42API::initialize("API_KEY","SECRET_KEY");
$albumService = App42API::buildAlbumService();
$response = $albumService->removeAlbum($userName,$albumName); 
print_r("Response is : ".$response->toString());
$success = $response->isResponseSuccess();
$jsonResponse = $response->toString(); 
Coming Soon
userName = "Nick";
albumName = "MyAlbum";
api = App42::ServiceAPI.new("API_KEY","SECRET_KEY") 
album_service = api.build_album_service() 
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"; 
App42API.initialize("API_KEY","SECRET_KEY");
var albumService:AlbumService = App42API.buildAlbumService(); 
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
String userName = "Nick";
String albumName = "My Album";
App42API.initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.buildAlbumService();
App42Response response = albumService.removeAlbum(userName,albumName); 
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
Remove Photo

Remove the particular photo from the specified album for a particular user.
Note: The photo is removed from the cloud and won’t 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 Swift
  • 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";
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService();
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";
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService();   
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"; 
NSString *albumName = @"My Album";
NSString *photoName = @"My Photo";
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"];
PhotoService *photoService = [App42API buildPhotoService]; 
[photoService removePhoto:userName albumName:albumName photoName:photoName completionBlock:^(BOOL success, id responseObj, App42Exception *exception) 
{
	if (success)
	{
		App42Response *response = (App42Response*)responseObj; 
		NSString *success = response.isResponseSuccess;
		NSString *jsonResponse = [response toString]; 
	}
	else
	{
		NSLog(@"Exception = %@",[exception reason]);
		NSLog(@"HTTP error Code = %d",[exception httpErrorCode]);
		NSLog(@"App Error Code = %d",[exception appErrorCode]);
		NSLog(@"User Info = %@",[exception userInfo]);
	}
}]; 
let userName = "Nick" 
let photoName  = "My Photo"
let albumName  = "My Album"     
App42API.initializeWithAPIKey("APP_KEY", andSecretKey:"SECRET_KEY")
let photoService = App42API.buildPhotoService() as? PhotoService
photoService?.removePhoto(userName, albumName: albumName, photoName: photoName, completionBlock: { (success, response, exception) -> Void in
if (success)
{  
    let response = response as! App42Response
    NSLog("%@", response.strResponse)
    NSLog("%@", response.isResponseSuccess)  
}  
else  
{  
    NSLog("%@",exception.reason!)
    NSLog("%d",exception.httpErrorCode)  
    NSLog("%d",exception.appErrorCode)  
    NSLog("%@",exception.userInfo!)  
}   
})
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";
App42API.initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService(); 
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
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService();
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);
	}
}
var userName = "Nick",
albumName = "My Album",
photoName = "My Photo",
result;
App42.initialize("API_KEY", "SECRET_KEY");
var photoService = new App42Photo();
photoService.removePhoto(userName, albumName, photoName, {
	success: function (object) {
		var albumObj = JSON.parse(object);
		result = albumObj.app42.response;
		console.log("App42Response : " + result);
	},
	error: function (error) {
	}
});
Coming Soon
Coming Soon
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService(); 
App42Response response = photoService.RemovePhoto(userName,albumName,photoName); 
Boolean  success = response.IsResponseSuccess();
String jsonResponse = response.ToString(); 
$userName = "Nick";
$albumName = "My Album";
$photoName = "My Photo";
App42API::initialize("API_KEY","SECRET_KEY");
$photoService = App42API::buildPhotoService();
$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";
api = App42::ServiceAPI.new("API_KEY","SECRET_KEY") 
photo_service = api.build_photo_service() 
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"; 
App42API.initialize("API_KEY","SECRET_KEY");
var photoService:PhotoService = App42API.buildPhotoService();
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 
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";
App42API.initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService(); 
App42Response response = photoService.removePhoto(userName,albumName,photoName); 
boolean  success = response.isResponseSuccess();
String jsonResponse = response.toString(); 
Update Photo

Update existing photo for a particular user and album.
Note: Only Photo and description will be changed(Photo Name will remain the same).

Required Parameters

userName - Name of the user whose photo has to be updated. albumName - Name of the album in which photo has to be updated. 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 Swift
  • 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";
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService();
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";
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService();   
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";
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"];
PhotoService *photoService = [App42API buildPhotoService]; 
[photoService updatePhoto:userName albumName:albumName photoName:photoName photoDescription:photoDescription path:filePath completionBlock:^(BOOL success, id responseObj, App42Exception *exception) 
{
	if (success)
	{
		Album *album = (Album*)responseObj; 
		NSLog(@"userName is %@" , album.userName);
		NSLog(@"albumName is %@" ,  album.name);
		NSMutableArray *photoList = album.photoList;
		for (Photo *photo in photoList)
        {
            NSLog(@"Photo Name=%@",photo.name);
			NSLog(@"URL=%@",photo.url);
			NSLog(@"CreatedOn=%@",photo.createdOn);
		}
	}
	else
	{
		NSLog(@"Exception = %@",[exception reason]);
		NSLog(@"HTTP error Code = %d",[exception httpErrorCode]);
		NSLog(@"App Error Code = %d",[exception appErrorCode]);
		NSLog(@"User Info = %@",[exception userInfo]);
	}
}];
let userName = "Nick"  
let albumName = "My Album" 
let photoDescription = "Photo Description"
let photoName  = "My Photo" 
let filePath = NSBundle.mainBundle().pathForResource("Image", ofType: "png")  
App42API.initializeWithAPIKey("APP_KEY", andSecretKey:"SECRET_KEY")
let photoService = App42API.buildPhotoService() as? PhotoService 
photoService?.updatePhoto(userName, albumName:albumName, photoName:photoName, photoDescription:photoDescription, path:filePath, completionBlock: { (success, response, exception) -> Void in
if (success)  
    {  
        let albumList = response as! [Album]
        for album in albumList
        {
            NSLog("%@" , album.userName)
            NSLog("%@",album.name)
            let photoList = album.photoList
            for photo in photoList
            {
                NSLog("%@",photo.name);
                NSLog("%@",photo.description);
                NSLog("%@",photo.url);
                NSLog("%@",photo.thumbNailUrl);
            }
        }
    }  
else  
{  
    NSLog("%@",exception.reason!)
    NSLog("%d",exception.httpErrorCode)  
    NSLog("%d",exception.appErrorCode)  
    NSLog("%@",exception.userInfo!)  
}   
})

String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";
String description = "Photo Details";
String filePath	= "Your Local file path";
App42API.initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService(); 
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
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService();
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);
	}
}
var userName = "Nick",
albumName = "My Album",
photoName = "My Photo",
description = "Photo Details";
var filePath = document.getElementById("filePath");
var file = filePath.files[0];
var result;
App42.initialize("API_KEY", "SECRET_KEY");
var photoService = new App42Photo();
photoService.updatePhoto(userName, albumName, photoName, description, file, {
	success: function (object) {
		var albumObj = JSON.parse(object);
		result = albumObj.app42.response.albums.album;
		if (result instanceof Array) {
			for (var i = 0; i < result.length; i++) {
				console.log("userName is " + result[i].userName)
				console.log("albumName is " + result[i].name)
			}
		} else {
			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";                
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService(); 
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";   
App42API::initialize("API_KEY","SECRET_KEY");
$photoService = App42API::buildPhotoService();
$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 
String userName = "Nick";
String albumName = "My Album";
String photoName = "My Photo";
String description = "Photo Details";
String filePath	= "Your Local file path";
App42API.initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.buildPhotoService(); 
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();    
Exception Handling

The functions available under Gallery API can throw some exceptions in abnormal conditions. For example, if a 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 Swift
  • 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";	
App42API.initialize("ANDROID_APPLICATION_CONTEXT","API_KEY","SECRET_KEY");
AlbumService albumService = App42API.buildAlbumService(); 
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";	
App42API.Initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.BuildAlbumService();  
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";	
[App42API initializeWithAPIKey:@"APP_KEY" andSecretKey:@"SECRET_KEY"];
AlbumService *albumService = [App42API buildAlbumService]; 
[albumService createAlbum:userName albumName:albumName albumDescription:description completionBlock:^(BOOL success, id responseObj, App42Exception *exception) 
{
	if (success)
	{
		Album *album = (Album*)responseObj; 
		NSLog(@"userName is %@" , album.userName);
	}
	else
	{
		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
		}
		NSString *jsonText = exception.reason; 	
	}    
}];	
Coming Soon
String userName = "Nick";
String albumName = "My Album";
String albumDescription = "Album Description";	
App42API.initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.buildAlbumService(); 
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
App42API.Initialize("API_KEY","SECRET_KEY");
PhotoService photoService = App42API.BuildPhotoService();
photoService.CreateAlbum(userName,albumName,albumDescription, new UnityCallBack()); 
public class UnityCallBack : App42CallBack
{
    public void OnException(Exception e)
    {
	   App42Exception exception = (App42Exception)e;
       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 ;
App42.initialize("API_KEY","SECRET_KEY");
var albumService  = new App42Album();
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";	
App42API.Initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.BuildAlbumService(); 
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";
App42API::initialize("API_KEY","SECRET_KEY");
$albumService = App42API::buildAlbumService();
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";  
App42API.initialize("API_KEY","SECRET_KEY");
var albumService:AlbumService = App42API.buildAlbumService(); 
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
String userName = "Nick";
String albumName = "My Album";
String albumDescription = "Album Description";	
App42API.initialize("API_KEY","SECRET_KEY");
AlbumService albumService = App42API.buildAlbumService();
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(); 	
}      
Error Codes

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

1400 - BAD REQUEST - The requested parameters are invalid. 1401 - UNAUTHORIZED - Client is not authorized. 1500 - INTERNAL SERVER ERROR - Internal Server Error. Please try again. 2500 - BAD REQUEST - The request parameters are invalid. Album with the name '@albumName' for the user '@userName' already exists. 2501 - NOT FOUND - Album by the name '@albumName' for the user '@userName' does not exist. 2502 - NOT FOUND - Albums for the user '@userName' do not exist. 2503 - NOT FOUND - Albums and Photos for the user '@userName' does not exist. 2504 - NOT FOUND - Photo with the name '@photoName' from the Album '@albumName' for the user '@userName' does not exist. 2505 - BAD REQUEST - The request parameters are invalid. Photo by the name '@photoName' for album '@albumName' for the user '@userName' already exists. 2506 - NOT FOUND - The number of albums for the user '@userName' are less than the specified offset : + "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.