Группа одноклассников указывается в настройках #40
This commit is contained in:
parent
1f4a39e22e
commit
85c97f3dd4
@ -6,4 +6,5 @@ VK_PASSWORD=123123
|
||||
VK_OWNER_ID=-2
|
||||
OK_ACCESS_TOKEN=aatk
|
||||
OK_APPLICATION_KEY=FFCF
|
||||
OK_APPLICATION_SECRET_KEY=GGD
|
||||
OK_APPLICATION_SECRET_KEY=GGD
|
||||
OK_GROUP_ID=700
|
@ -63,6 +63,7 @@ class OdnoklassnikiPromoter(Promoter):
|
||||
ok_access_token = promoter_secrets['OK_ACCESS_TOKEN']
|
||||
ok_application_key = promoter_secrets['OK_APPLICATION_KEY']
|
||||
ok_application_secret_key = promoter_secrets['OK_APPLICATION_SECRET_KEY']
|
||||
ok_group_id = promoter_secrets['OK_GROUP_ID']
|
||||
|
||||
session = ok_api.OkApi(access_token=ok_access_token,
|
||||
application_key=ok_application_key,
|
||||
@ -82,7 +83,7 @@ class OdnoklassnikiPromoter(Promoter):
|
||||
encoded_attachments = JSONEncoder().encode(attachments)
|
||||
try:
|
||||
session.mediatopic.post(type='GROUP_THEME',
|
||||
gid='70000001426867',
|
||||
gid=ok_group_id,
|
||||
attachment=encoded_attachments)
|
||||
except ok_api.OkApiException as exc:
|
||||
raise PromoteError(exc)
|
||||
|
@ -42,7 +42,7 @@ dotenv.read_dotenv(env_file)
|
||||
promoter_env_keys = (
|
||||
'TELEGRAM_BOT_TOKEN', 'TELEGRAM_CHAT_ID', 'JOOMLA_TOKEN',
|
||||
'VK_LOGIN', 'VK_PASSWORD', 'VK_OWNER_ID', 'OK_ACCESS_TOKEN', 'OK_APPLICATION_KEY',
|
||||
'OK_APPLICATION_SECRET_KEY',
|
||||
'OK_APPLICATION_SECRET_KEY', 'OK_GROUP_ID',
|
||||
)
|
||||
promoter_secrets = {}
|
||||
if ENV_ENCODED:
|
||||
|
Loading…
x
Reference in New Issue
Block a user