Config helpers
twitter_disable_edit()
¶
Checks for a disable_edit flag in the config.
If true, this prevents the user editing the tweet before it is posted.
Returns:
| Type | Description |
|---|---|
|
boolean |
Source code in ckanext/twitter/lib/config_helpers.py
81 82 83 84 85 86 87 88 89 | |
twitter_get_credentials()
¶
Retrieves twitter API key and secret from config file.
Returns:
| Type | Description |
|---|---|
|
(key, secret) |
Source code in ckanext/twitter/lib/config_helpers.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | |
twitter_hours_between_tweets()
¶
For calculating the 'rest period' between subsequent tweets about the same dataset.
Returns:
| Type | Description |
|---|---|
|
int |
Source code in ckanext/twitter/lib/config_helpers.py
40 41 42 43 44 45 46 | |
twitter_is_debug()
¶
Checks debug flags in the config - the plugin-specific flag can override the global debug flag.
Returns:
| Type | Description |
|---|---|
|
boolean |
Source code in ckanext/twitter/lib/config_helpers.py
29 30 31 32 33 34 35 36 37 | |
twitter_new_format()
¶
Gets the string defining the format of the tweet that will be posted for new datasets.
Returns:
| Type | Description |
|---|---|
|
string with replaceable jinja2 tags |
Source code in ckanext/twitter/lib/config_helpers.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
twitter_updated_format()
¶
Gets the string defining the format of the tweet that will be posted for updated.
Returns:
| Type | Description |
|---|---|
|
string with replaceable jinja2 tags |
Source code in ckanext/twitter/lib/config_helpers.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 | |