API Docs for:
Show:

BrowserCharm Class

Extends Charm
Module: models.charm
Parent Module: models

Model to represent the Charms from the Charmworld0 Api.

Methods

_loadRecentCommits

()

Load the recent commits into a format we can use nicely.

_parseRelations

(
  • attr
)

Parse the relations ATTR from the api into specific provides/requires information.

Parameters:

  • attr String

    the attribute to load from the relations object.

full_name.getter

()

Generate the full name of the charm from its attributes.

initializer

(
  • cfg
)

Initializer

Parameters:

  • cfg Object

    The configuration object.

last_change.setter

()

Normalize created value from float to date object.

provides.getter

()

provides is a subcomponent of relations in the new api.

recent_commit_count.getter

() Int

Returns:

Int: count of the commits in 'recent' time.

recent_commits.valueFn

()

Return the commits of the charm in a format we can live with from the source code data provided by the api.

recent_download_count.valueFn

() Int

Returns:

Int: the number of downloads in the 'recent' time frame.

requires.getter

()

requires is a subcomponent of relations in the new api.

revision.setter

()

Parse the revision number out of a string.

scheme.setter

()

If no value is given, "cs" is used as the default.

Attributes

code_source

Object

Object of data about the source for this charm including bugs link, log, revisions, etc.

Default: undefined

options

Object

options is the parsed YAML object from config.yaml in a charm. Do not set a value if there are no options to be had.

Default: undefined

provides

Object

This attr is a mapper to the relations ATTR in the new API. It's provided for backwards compatibility with the original Charm model. This can be removed when Charmworld0 is the one true model used in all Juju Gui code.

Default: undefined

recent_commit_count

Int

Default: 0

recent_commits

Array list of objects for each commit.

Default: undefined

recent_download_count

Int number of downloads in 'recent' time.

Mapped from the downloadsinpast30days in the API.

Default: undefined

requires

Object

This attr is a mapper to the relations ATTR in the new API. It's provided for backwards compatibility with the original Charm model.

This can be removed when Charmworld0 is the one true model used in all Juju Gui code.

Default: undefined