SmugFig API
The StreetsOfBoston’s SmugFig API is a Java API that provides integration with the SmugMug JSON API and is built on top of kallasoft’s SmugMug Java API. It is developed/released under the Apache License v2.0
Kallasoft’s Java API lays the foundation for the SmugFig API. Kallasoft’s Java API is more geared towards Smugmug functions. It maps each Smugmug’s JSON API’s function (e.g. Create, GetInfo) to an appropriate Java Class.
The SmugFig API is more geared toward Smugmug objects. It maps each Smugmug’s object (e.g. Category, Album, Image) to an appropriate Java Class. The SmugFig API offers the following pieces of functionality:
- It removes the burden of remembering the names or order of the JSON parameters.
- It adds a simple level of change-management.
It provides easy ways of determining whether SmugFig objects (Categories, Albums, etc) have changed or remain unchanged with respect to their values on Smugmug’s servers. - It adds a simple mechanism of caching to reduce network traffic.
Caching is done in the background and not visible to the user of SmugFig objects. - It adds search-functionality by leveraging Smugmug-feeds and a tiny embedded database.
API Version Support and Implementation
The current implementation of the SmugFig API is being for Smugmug API version 1.2.0. Version 1.2.1 support will be added soon.
At this moment, the functionality-set of 1.2.0 is implemented, using the 1.2.1 implementation on Smugmug.
Download and Support
Downloads Version 0.1.1
- Download Java 2 SE Version 1.5 or higher, if you have not done so yet.
- The SmugFig API 0.1.1 JAR (runtime and documentation only. Dependent libraries not included)
smugfig-api-0.1.1.jar - The SmugFig API 0.1.1 Distribution (contains above jar and all dependent libraries)
smugfig-api-0.1.1-dist.zip - The SmugFig API 0.1.1 Source (contains above jar and all libraries, sources, etc, to be used for development)
smugfig-api-0.1.1-src.zip
Release Notes
Version 0.1.1
-
Fixed a bug in SubCategoryPrototype>>getAll(int ID). mData.getCategoryID() was used instead of the provided ID.
-
Fixed a bug in the cache handling of the postGetAll method.
-
All objects in the named cache are returned, not the particular (modified) subset that is equal to the input of this postGetAll method. (still to do).
-
Added user.getTree method. This Smugmug method will be handled by the Account.getSmugObjectsHierarchy.
-
Added functionality to be able to refresh subsets of caches.
-
Added getAllFromCache() method to ISmugObjectProtoype interface and the implementing classes.
-
Added getAllFromCache(String subSetId) method to ISmugObjectProtoype interface and the implementing classes.
-
Added getParentId() to ISmugObject interface and implementing classes. This id is used for the subSetId.
-
Added support for smugmug-api-0.3.0.
-
Now uses the new security features for handling images and albums/galleries.
http://www.dgrin.com/showthread.php?t=83919 -
Album titles can now be updated.
-
Images now have a ‘IsHidden’ attribute.
-
Added ‘getFileName()’ to the Image class.
-
Added asynchronous smugmug-operations to ISmugObject and ISmugObjectPrototype.
-
Added GUIDs: Smugmug Objects can handle them now (initial implementation).
-
Improved the java-generics of the API
-
An Image’s TinyURL was not properly retrieved from the Smugmug Repository.
-
Added two methods to the Session class to allow downloading of the owner’s private images.
Version 0.1.0
Initial version of the SmugFig API.
- Support for version 1.2.0 of the Smugmug API. However, the code uses the version 1.2.1 accesspoint (URL).
- Uses Beta 3 version of Kallasoft’s Smugmug API.
http://www.kallasoft.com/smugmug-java-api/changelog/ - Simple caching mechanism is supported: No minimum and maximum bounds on the cache.
- Search functionaliy is not yet implemented.
- Exception handling is basic. Improvements are needed for recognizing certain expected error conditions (e.g. detecting that objects did exist but are deleted is functioning only partially implemented).
Documentation
The Java API Doc can be found inside the SmugFig API 0.1.1 JAR download.
Some examples can be found inside the SmugFig API 0.1.1 Source download.
Other documentation is still to be done.
Examples
Some examples can be found inside the SmugFig API 0.1.1 Source download. Here is a link to an example source file:
ImageExample.java (as text file)
License
The SmugFig API is licensed under the Apache License v2.0. You can download a copy of it here.
The long and short of the API being under the Apache License v2.0 is that you are free to use the API in an open source or commercial product, but you need to provide full credits to the kallasoft SmugMug Java API and SmugFig API in the documentation of your product somewhere.





