Exemplo n.º 1
0
def test_fom_json():
    from adobe_analytics import Client

    json_path = mock_dir+"/_login.json"
    client = Client.from_json(json_path)
    assert client.username == "my_username"
    assert client.password == "my_password"
Exemplo n.º 2
0
import pandas as pd
from adobe_analytics import Client, ClassificationUploader

client = Client.from_json("my_credentials.json")
suites = client.suties()
suite_ids = list(suites.keys())

dataframe = pd.read_csv("my_classification_data.csv")

uploader = ClassificationUploader(
    client=client,
    suite_ids=suite_ids,
    variable_id="evar24",
    data=dataframe,
    email="my_email",
    description="my trial classification for evar24.")
uploader.upload()
"""
The client class has a request method that allows all sorts of generic API requests to Adobe's v1.4 REST API.

To get a comprehensive overview of available APIs and methods check out the official Adobe Analytics API Explorer:
https://marketing.adobe.com/developer/api-explorer
"""
from adobe_analytics import Client

client = Client.from_json("my_path.json")

# The request below returns a list of all evars available in all specified report suites.
result = client.request(api="ReportSuite",
                        method="GetEvars",
                        data={
                            "rsid_list": [
                                "my_report_suite_id_1", "my_report_suite_id_2",
                                "...", "my_report_suite_id_n"
                            ]
                        })
print(result)