Samples
last update 2015-3-26

Gallery App

Data & Settings Specification: Gallery App

About This App

Gallery App lets you add images with comments and later edit.
All the images are stored as binary data on Appiaries server.
Tapping “Play” button to play a slide-show of images registered.
In “Settings” view, you may set whether to show/hide comments during the slide-show, or set its interval.

Appearance

Thumbnails List
Detail
Edit
Add
Add (Browse)
Slide-show
Settings

Appiaries API Services Used

Project Files

You can get project files from Github.

Server-Side Collections Used

Entity System Name Type Description Note
Illustrations Illustrations JSON Collection Stores the meta-information for illustration images uploaded.
Illustration Images IllustrationImages File Collection Stores the actual image data associated with “Illustrations”.

“Illustrations” Collection

(JSON Collection)

Stores the meta-information for illustration images uploaded.
Images are not registered via Appiaries control panel, but from the client app.
Each object which belongs to this collection therefore has randomly generated Object ID.

Example:

Object ID: (randomly generated because objects are created from the app)

“image_id” refers to the corresponding image object in “IllustrationImages”
which is also uploaded from the client app.

“IllustrationImages” Collection

(File Collection)

Stores the actual image data associated with “Illustrations” collections.
Same as each object in “Illustrations”,
objects in this collection are registered from the client app, and Object ID is randomly generated.

Example:

Object ID: (randomly generated because objects are created from the app)

Uploaded from the client app.
Probablly a photo of Abby touching a dog without hesitation.

Other Server-Side Settings

App ID

When you add a New App on Appiaries, choose “gallery” for its App ID.
We talk about this in the next section [App Settings],
but this is simply because the sample source codes use “gallery” as a default.
There is no problem to change the App ID as you like.
Please make sure, if you want a different App ID,
to also change the one defined in the setting file discussed in [App Settings].

Client-Side Source Codes

(Android)

Constants are defined in the following file:

com/appiaries/gallery/common/Constants.java

Let’s look at each definition.

You specify “App Token” to APIS_APP_TOKEN to authenticate client apps to connect to Appiaries.
“App Token” is required whenever you make requests to Appiaries APIs.
Appiaries’ demo App Token is provided by default.
(See also, “Where Is My App Token?”)

APIS_DATASTORE_ID is your “Datastore ID”.
Just as you need “App Token”, you need “Datastore ID” to make any requests to Appiaries APIs.
Notice you have “appiaries_sample” set in your downloaded sample code.
Specify the appropriate Datastore ID for the contract plan you have.
For instance, specify “_sandbox” if you are working on sandbox environment.

APIS_APP_ID your “App ID”. This is what identifies your app.

(iOS)

Constants are defined in the following file:

Gallery/Library/GALConfigurations.h

Let’s look at each definition.

You specify “App Token” to PUZAPISAppToken to authenticate client apps to connect to Appiaries.
“App Token” is required whenever you make requests to Appiaries APIs.
Appiaries’ demo App Token is provided by default.
(See also, “Where Is My App Token?”)

PUZAPISDatastoreId is your “Datastore ID”.
Just as you need “App Token”, you need “Datastore ID” to make any requests to Appiaries APIs.
Notice you have “appiaries_sample” set in your downloaded sample code.
Specify the appropriate Datastore ID for the contract plan you have.
For instance, specify “_sandbox” if you are working on sandbox environment.

APISAppId is your “App ID”.
This is what identifies your app.