Liking cljdoc? Tell your friends :D

milia.api.widgets


createclj/s

(create {:keys [content_type content_id] :as widget-definition}
        &
        {:keys [with-data?]})

Create a new widget. widget-definition is a map containing the following keys: :title is a string :content_type is one of either :form of :dataview :content_id is an intger identifying the content object :description is a string. :widget_type is a string, determined by the client e.g. chart :view_type is a string, determined by the client e.g. bar-chart :column is the data column to be stored based on the form field. :order this is the position of the widget in relation to others within the set associated with a form or dataview. Optional. :group_by the data column for the data to be grouped by. Optional :aggregation is the aggregation used while grouping data. Optional. :metadata is a map containing arbitrary key-value pairs.

Create a new widget.
`widget-definition` is a map containing the following keys:
 `:title` is a string
 `:content_type` is one of either :form of :dataview
 `:content_id` is an intger identifying the content object
 `:description` is a string.
 `:widget_type` is a string, determined by the client e.g. chart
 `:view_type` is a string, determined by the client e.g. bar-chart
 `:column` is the  data column to be stored based on the form field.
 `:order` this is the position of the widget in relation to others
          within the set associated with a form or dataview. Optional.
 `:group_by` the data column for the data to be grouped by. Optional
 `:aggregation` is the aggregation used while grouping data. Optional.
 `:metadata` is a map containing arbitrary key-value pairs.
sourceraw docstring

deleteclj/s

(delete widget-id)

Deletes a widget, given a widget id.

Deletes a widget, given a widget id.
sourceraw docstring

generate-content-object-urlclj/s

(generate-content-object-url content-type content-id)

The Ona API expects clients to submit a URL as the value of the object bound to a widget. This is basically asking clients to be aware of internal API implementation details since this is a Django REST framework peculiarity. This function provides an abstraction that allows Clojure based clients to be ignorant of the quirk. content-type can be either :form or :dataview content-id is an integer identifying the object

The Ona API expects clients to submit a URL as the value of the object bound
to a widget. This is basically asking clients to be aware of internal API
implementation details since this is a Django REST framework peculiarity.
This function provides an abstraction that allows Clojure based clients to
be ignorant of the quirk.
`content-type` can be either :form or :dataview
`content-id` is an integer identifying the object
sourceraw docstring

getclj/s

(get widget-id & {:keys [with-data?]})

Returns specific widget, given the ID

Returns specific widget, given the ID
sourceraw docstring

listclj/s

(list & {:keys [dataview-id xform-id with-data?]})

List widgets belonging to a particular user Can optionally be filtered by supplying either a dataview ID or an XForm ID Note that the filters are mutually exclusive

List widgets belonging to a particular user
Can optionally be filtered by supplying either a dataview ID or an XForm ID
Note that the filters are mutually exclusive
sourceraw docstring

updateclj/s

(update widget-id patch-map)

Updates a widget, given the widget ID, and a map of properties to replace existing values for the associated keys

Updates a widget, given the widget ID, and a map of properties to replace
existing values for the associated keys
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close