Closed AndyGarage closed 3 years ago
Hi @AndyGarage Thank you for bringing this up.
Can you please share more details on it? Like the endpoint, request payload and the response format you are getting.
Hi, I'm having the same thing here.
`from future import print_function import time import datetime import sib_api_v3_sdk from sib_api_v3_sdk.rest import ApiException from pprint import pprint
configuration = sib_api_v3_sdk.Configuration() configuration.api_key['api-key'] = ''
api_instance = sib_api_v3_sdk.EmailCampaignsApi(sib_api_v3_sdk.ApiClient(configuration)) campaign_id = 797
api_response = api_instance.get_ab_test_campaign_result(campaign_id) print(api_response)`
{'click_rate': None, 'clicked_links': None, 'open_rate': '23.33%', 'statistics': {'clicks': {'version_a': '1.64%', 'version_b': '1%'}, 'complaints': {'version_a': '0%', 'version_b': '0%'}, 'hard_bounces': {'version_a': '1.23%', 'version_b': '1.13%'}, 'openers': {'version_a': '23.33%', 'version_b': '18.7%'}, 'soft_bounces': {'version_a': '24.56%', 'version_b': '25.47%'}, 'unsubscribed': {'version_a': '0.27%', 'version_b': '0.63%'}}, 'winning_criteria': 'Open', 'winning_subject_line': 'TEST', 'winning_version': 'A', 'winning_version_rate': '22.46%'}
Hi, I'm having the same thing here.
Code:
`from future import print_function import time import datetime import sib_api_v3_sdk from sib_api_v3_sdk.rest import ApiException from pprint import pprint
configuration = sib_api_v3_sdk.Configuration() configuration.api_key['api-key'] = ''
api_instance = sib_api_v3_sdk.EmailCampaignsApi(sib_api_v3_sdk.ApiClient(configuration)) campaign_id = 797
api_response = api_instance.get_ab_test_campaign_result(campaign_id) print(api_response)`
Results :
{'click_rate': None, 'clicked_links': None, 'open_rate': '23.33%', 'statistics': {'clicks': {'version_a': '1.64%', 'version_b': '1%'}, 'complaints': {'version_a': '0%', 'version_b': '0%'}, 'hard_bounces': {'version_a': '1.23%', 'version_b': '1.13%'}, 'openers': {'version_a': '23.33%', 'version_b': '18.7%'}, 'soft_bounces': {'version_a': '24.56%', 'version_b': '25.47%'}, 'unsubscribed': {'version_a': '0.27%', 'version_b': '0.63%'}}, 'winning_criteria': 'Open', 'winning_subject_line': 'TEST', 'winning_version': 'A', 'winning_version_rate': '22.46%'}
Hi @melchiorEcotree,
Yes the behaviour is expected, you can confirm by checking the type of api_response
variable.
Attributes visible can be accessed same as class attributes.
Thank you
Hello, I've implemented the API via the official documentation on the website and noticed that the response returns in single quotes instead of the JSON double quotes format. Is this a bug or am I doing something wrong?