Rest.Params¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
params |
[ |
r |
|
ref_count |
r |
Methods¶
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Rest.Params¶
- classmethod new()¶
- Returns:
A empty
Rest.Params
.- Return type:
Create a new
Rest.Params
.
- add(param)¶
- Parameters:
param (
Rest.Param
) – a validRest.Param
Add param to self.
- are_strings()¶
-
Checks if the parameters are all simple strings (have a content type of “text/plain”).
- as_string_hash_table()¶
- Returns:
a new
GLib.HashTable
.- Return type:
{
str
:Rest.Param
}
Create a new
GLib.HashTable
which contains the name and value of all string (content type of text/plain) parameters.The values are owned by the
Rest.Params
, so don’t destroy theRest.Params
before the hash table.
- copy()¶
- Returns:
A newly created
Rest.Params
with the same contents as self- Return type:
Makes a deep copy of a
Rest.Params
.
- get(name)¶
- Parameters:
name (
str
) – a parameter name- Returns:
a
Rest.Param
orNone
if the name doesn’t exist- Return type:
Rest.Param
orNone
Return the
Rest.Param
called name, orNone
if it doesn’t exist.
- ref()¶
- Returns:
self
- Return type:
Increments the reference count of self by one.
- remove(name)¶
- Parameters:
name (
str
) – a parameter name
Remove the
Rest.Param
called name.
- unref()¶
Decrements the reference count of self by one, freeing the structure when the reference count reaches zero.