Bundle

Anne Rosebery
2.x

Bundle

Bundle is a helper object designed to be used in javascript applications. The bundle object provides a number of static methods that are automatically included with each request.


KD.Bundle.apiLocation()

Returns the path of the latest API version including the application context path.

Example:

KD.Bundle.apiLocation()                                /kinetic/SPACE_SLUG/app/api/v1

KD.Bundle.apiLocation(version)

Returns the path of the specified API version including the application context path.

Example:

KD.Bundle.apiLocation('v1')                            /kinetic/SPACE_SLUG/app/api/v1

KD.Bundle.contextPath()

Returns the context path for the application.

Example:

KD.Bundle.contextPath()                                /kinetic

KD.Bundle.kappLocation()

Returns the path of the current Kapp including the application context path.

Example:

KD.Bundle.kappLocation()                               /kinetic/SPACE_SLUG/KAPP_SLUG

KD.Bundle.kappLocation(slug)

Returns the path of the specified Kapp including the application context path.

Example:

KD.Bundle.kappLocation('catalog')                      /kinetic/SPACE_SLUG/catalog

KD.Bundle.kappSlug()

Returns the slug of the current Kapp.

Example:

KD.Bundle.kappSlug()                                   catalog

KD.Bundle.location()

Returns the path of the current bundle including the application context path.

Example:

KD.Bundle.location()                                   /kinetic/app/bundles/SPACE/BUNDLE

KD.Bundle.spaceLocation()

Returns the path of the current Space including the application context path.

Example:

KD.Bundle.spaceLocation()                              /kinetic/SPACE_SLUG

KD.Bundle.kappSlug()

Returns the slug of the current Space.

Example:

KD.Bundle.spaceSlug()                                  acme

KD.Bundle.identity()

Returns the username of the user making the request.

Example:

KD.Bundle.identity()                                   joe.blow@example.com