Warning!

It looks like you haven't initilized this page yet.

Make sure you initialize StackMob in this file (more-examples/index.html) before using it!

StackMob JS SDK Examples

Note: Be sure to satisfy the prerequisites in more-examples/README.md before running these examples.

User CRUD

Login/Logout

Custom Model: Book

Advanced Queries: StackMobQuery

Geospatial (Lat/Lon)

You need to have a Schema named "attraction" with a geopoint called "location". Create one at http://www.stackmob.com/platform/

      {
        'name': STRING,
        'location': GEOPOINT
      }
      

Array Methods: (append/remove/append+create)

This assumes you have a user schema that has a messages field. The messages field is an array of message objects. The message object has a String field called content.

e.g.,

        //User
        {
          'username': 'Bruce Wayne',
          'password': '...',
          'messages': ['a','b','c']
        }

        //Message
        {
          'message_id': 'a',
          'content': 'hello world'
        }
      

Binary File Upload (S3 Integration)

File to Encode:

Custom Code

Facebook

Query Results:

(results also displayed in your FireBug/Developer Tools JS console)