Grl.Config

g GObject.Object GObject.Object Grl.Config Grl.Config GObject.Object->Grl.Config

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (plugin, source)

get_api_key ()

get_api_key_blob (size)

get_api_secret ()

get_api_token ()

get_api_token_secret ()

get_binary (param, size)

get_boolean (param)

get_float (param)

get_int (param)

get_password ()

get_plugin ()

get_source ()

get_string (param)

get_username ()

has_param (param)

set (param, value)

set_api_key (key)

set_api_key_blob (blob, size)

set_api_secret (secret)

set_api_token (token)

set_api_token_secret (secret)

set_binary (param, blob, size)

set_boolean (param, value)

set_float (param, value)

set_int (param, value)

set_password (password)

set_plugin (plugin)

set_source (source)

set_string (param, value)

set_username (username)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class Grl.Config(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Grl.ConfigClass

classmethod new(plugin, source)
Parameters:
  • plugin (str) – plugin id for this configuration

  • source (str or None) – source id for this configuration

Returns:

a newly-allocated data config. The data config associated with the plugin should not be freed until the plugin has been unloaded.

Return type:

Grl.Config

Creates a new data config object that will be associated with a plugin (if source is None), or a specific source spawned from a plugin (if source is not None). The latter may be useful for plugins spawning various sources, each one needing a different configuration.

New in version 0.1.4.

get_api_key()
Returns:

the webservice API key

Return type:

str

New in version 0.1.4.

get_api_key_blob(size)
Parameters:

size (int) – pointer to size of data

Returns:

the binary API key, size will reflect the size of the buffer

Return type:

int

New in version 0.1.9.

get_api_secret()
Returns:

the webservice API passphrase

Return type:

str

New in version 0.1.4.

get_api_token()
Returns:

the webservice API token

Return type:

str

New in version 0.1.4.

get_api_token_secret()
Returns:

the webservice API token secret (Needed by OAuth)

Return type:

str

New in version 0.2.6.

get_binary(param, size)
Parameters:
  • param (str) – a binary type parameter

  • size (int or None) – place for size of value

Returns:

param value

Return type:

int

Gets the value of param encoded as base64. If size is not None, it puts there the size of the value.

New in version 0.1.9.

get_boolean(param)
Parameters:

param (str) – a boolean type parameter

Returns:

param value

Return type:

bool

New in version 0.1.8.

get_float(param)
Parameters:

param (str) – a float type parameter

Returns:

param value

Return type:

float

New in version 0.1.5.

get_int(param)
Parameters:

param (str) – an integer type parameter

Returns:

param value

Return type:

int

New in version 0.1.5.

get_password()
Returns:

the password

Return type:

str

New in version 0.1.8.

get_plugin()
Returns:

the plugin id

Return type:

str

New in version 0.1.4.

get_source()
Returns:

the source id

Return type:

str

get_string(param)
Parameters:

param (str) – a string type paramter

Returns:

param value

Return type:

str

New in version 0.1.5.

get_username()
Returns:

the username

Return type:

str

New in version 0.1.8.

has_param(param)
Parameters:

param (str) – the param

Returns:

True if params has a defined value within self, False otherwise.

Return type:

bool

New in version 0.1.8.

set(param, value)
Parameters:

Set param value.

New in version 0.1.5.

set_api_key(key)
Parameters:

key (str) – the API key

Set the webservice API key in the configuration

New in version 0.1.4.

set_api_key_blob(blob, size)
Parameters:
  • blob (int) – the binary API key blob

  • size (int) – the size of the blob

Set the binary API key in the configuration

New in version 0.1.9.

set_api_secret(secret)
Parameters:

secret (str) – the webservice passphrase

Set the webservice passphrase in the configuration

New in version 0.1.4.

set_api_token(token)
Parameters:

token (str) – the API token

Set the webservice API token in the configuration

New in version 0.1.4.

set_api_token_secret(secret)
Parameters:

secret (str) – the API token

Set the webservice API token secret in the configuration (Needed by OAuth)

New in version 0.2.6.

set_binary(param, blob, size)
Parameters:
  • param (str) – a binary type parameter

  • blob (int) – a base64 encoded binary value

  • size (int) – size of value

Set param value.

New in version 0.1.9.

set_boolean(param, value)
Parameters:
  • param (str) – a boolean type parameter

  • value (bool) – a value

Set param value.

New in version 0.1.8.

set_float(param, value)
Parameters:
  • param (str) – a float type parameter

  • value (float) – a value

Set param value.

New in version 0.1.5.

set_int(param, value)
Parameters:
  • param (str) – an integer type parameter

  • value (int) – a value

Set param value.

New in version 0.1.5.

set_password(password)
Parameters:

password (str) – the password

Set the password in the configuration

New in version 0.1.8.

set_plugin(plugin)
Parameters:

plugin (str) – the plugin id

Set the plugin key in the configuration

New in version 0.1.4.

set_source(source)
Parameters:

source (str) – the source id

Set the source key in the configuration

New in version 0.1.4.

set_string(param, value)
Parameters:
  • param (str) – a string type parameter

  • value (str) – a value

Set param value.

New in version 0.1.5.

set_username(username)
Parameters:

username (str) – the username

Set the username in the configuration

New in version 0.1.8.