{"id":18719838,"url":"https://github.com/sc-networks/evalanche-reporting-api-connector","last_synced_at":"2025-10-28T20:09:01.275Z","repository":{"id":37704128,"uuid":"153582221","full_name":"SC-Networks/evalanche-reporting-api-connector","owner":"SC-Networks","description":"Official PHP client for Evalanche Reporting API","archived":false,"fork":false,"pushed_at":"2024-11-07T06:14:55.000Z","size":189,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-10-02T13:57:06.161Z","etag":null,"topics":["api","connector","evalanche","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SC-Networks.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-10-18T07:33:01.000Z","updated_at":"2024-11-07T06:14:53.000Z","dependencies_parsed_at":"2023-11-30T09:28:58.916Z","dependency_job_id":"69947dd9-6147-4949-a55e-e77b4fecf970","html_url":"https://github.com/SC-Networks/evalanche-reporting-api-connector","commit_stats":{"total_commits":30,"total_committers":7,"mean_commits":4.285714285714286,"dds":"0.33333333333333337","last_synced_commit":"578cbc6976b743c9106c1f3bbb7fab8d83ac0302"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/SC-Networks/evalanche-reporting-api-connector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SC-Networks%2Fevalanche-reporting-api-connector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SC-Networks%2Fevalanche-reporting-api-connector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SC-Networks%2Fevalanche-reporting-api-connector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SC-Networks%2Fevalanche-reporting-api-connector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SC-Networks","download_url":"https://codeload.github.com/SC-Networks/evalanche-reporting-api-connector/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SC-Networks%2Fevalanche-reporting-api-connector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281504348,"owners_count":26512870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-28T02:00:06.022Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","connector","evalanche","php"],"created_at":"2024-11-07T13:28:11.495Z","updated_at":"2025-10-28T20:09:01.244Z","avatar_url":"https://github.com/SC-Networks.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EVALANCHE REPORTING API CONNECTOR\n\n[![Monthly Downloads](https://poser.pugx.org/scn/evalanche-reporting-api-connector/d/monthly)](https://packagist.org/packages/scn/evalanche-reporting-api-connector)\n[![License](https://poser.pugx.org/scn/evalanche-reporting-api-connector/license)](LICENSE)\n[![Unittests](https://github.com/SC-Networks/evalanche-reporting-api-connector/actions/workflows/php.yml/badge.svg)](https://github.com/SC-Networks/evalanche-reporting-api-connector/actions/workflows/php.yml)\n\n## Install\n\nVia Composer\n\n``` bash\n$ composer require scn/evalanche-reporting-api-connector\n```\n\n## Usage\n\n### General\n\nFirst create a connection with the access credentials provided by SC-Networks.\n\n```php\nuse Scn\\EvalancheReportingApiConnector\\Enum\\Language;\nuse Scn\\EvalancheReportingApiConnector\\Enum\\TimeFormat;\nuse Scn\\EvalancheReportingApiConnector\\EvalancheConfig;\nuse Scn\\EvalancheReportingApiConnector\\EvalancheConnection;\n\n$connection = EvalancheConnection::create(\n    new EvalancheConfig(\n        'your evalanche hostname (no uri, just the hostname)',\n        'username',\n        'password',\n        Language::LANG_EN,\n        TimeFormat::ISO8601,\n    ),\n    // $requestFactory, (optional existing PSR-17 RequestFactory instance)\n    // $httpClient, (optional existing PSR-18 Http-Client instance)\n);\n```\n\nThe EvalancheConnection class provides one method for each table. E.g. the method ```getPools()``` queries the table 'pools'.\n\nThese methods each return a specific client class, e.g. ```PoolsClient```, to specify further options and to receive the data in different formats.\n\nA minimal working example could be:\n```php\n$connection-\u003egetPools()-\u003easXml();\n```\n\nThe available methods follow the \"Fluent Interface\" pattern, which means they enable method chaining.\n\nThe call of a format method like ```asXml()``` or ```asCsv()``` is always the last call in the chain, as it returns the data.\n\n#### Methods\nThe following methods are available:\n- ```getArticleReferences(int $customer_id)```\n- ```getCustomers()```\n- ```getForms()```\n- ```getGeoCoordinates(int $customer_id)```\n- ```getLeadpages(int $customerId = null)```\n- ```getMailings()```\n- ```getMilestoneProfiles(int $customer_id)```\n- ```getNewsletterSendlogs(int $customer_id)```\n- ```getPools()```\n- ```getProfileChangelogs(int $pool_id)```\n- ```getProfiles(int $pool_id)```\n- ```getProfileScores()```\n- ```getResourceTypes()```\n- ```getScoringCluster()```\n- ```getScoringGroups()```\n- ```getScoringHistory()```\n- ```getTrackingHistory()```\n- ```getTrackingTypes()```\n\n#### Formats\n\nAt the current state you can choose between the following formats:\n\n##### JsonArray\n\nExample:\n```php\n$connection-\u003egetPools()-\u003easJsonArray();\n```\n\nReturns an array of stdClass objects.\n\n##### JsonObject\n\nExample:\n```php\n$connection-\u003egetPools()-\u003easJsonObject();\n```\n\nReturns a stdClass object.\n\n##### XML\n\nExample:\n```php\n$connection-\u003egetPools()-\u003easXml();\n```\n\nReturns a string, containing valid xml.\n\n##### CSV\n\nExample:\n```php\n$connection-\u003egetPools()-\u003easCsv();\n```\n\nReturns a string with comma separated values. The first line contains the column titles.\n\n\n#### Parameters\nSome tables provide further options or mandatory parameters:\n##### Customer id (int)\nUse it to get the results for a specific customer, instead of the current customer.\u003cbr/\u003e\n###### Example:\n```php\n$connection-\u003egetLeadpages(1234)-\u003easJsonArray();\n```\n\n###### Provided by:\n- getLeadpages (optional)\n- getNewsletterSendlogs\n\n##### Pool id (int)\nId of the pool you want to get results for.\n###### Example:\n```php\n$connection-\u003egetProfiles(123)-\u003easJsonArray();\n```\n\n###### Provided by:\n- getProfiles\n- getLeadpages\n\n#### Time restrictions\nLimit the result to a defined time span by using the method ```withTimeRestriction(string $from = null, string $to = null)```. Both parameters are optional and can be replaced by ```null```.\n\n###### Examples:\n\nEverything since yesterday:\n```php\n$connection\n    -\u003egetMailings()\n    -\u003ewithTimeRestriction('yesterday')\n    -\u003easJsonArray();\n```\nFrom date to yesterday:\n```php\n$connection\n    -\u003egetMailings()\n    -\u003ewithTimeRestriction('2018-09-27', 'yesterday')\n    -\u003easJsonArray();\n```\nEverything until yesterday:\n```php\n$connection\n    -\u003egetMailings()\n    -\u003ewithTimeRestriction(null, 'yesterday')\n    -\u003easJsonArray();\n```\n\n###### Possible values:\n- date: `2018-08-03`, `03.08.2018`\n- date and time: `03.08.2018 07:30`\n- relative values: `yesterday`, `last monday`, `now-24hours` etc.\n\n###### Provided by:\n- getMailings\n- getNewsletterSendLogs\n- getProfiles\n- getScoringHistory\n- getTrackingHistory\n\n#### Language\nDefault language is English, but you can pass a different language code when establishing the connection.\n\nUse the provided Enums in the class `\\Scn\\EvalancheReportingApiConnector\\Enum\\Language`\n\n###### Example\n```php\nuse Scn\\EvalancheReportingApiConnector\\Enum\\Language;\nuse Scn\\EvalancheReportingApiConnector\\EvalancheConnection;\n\n$connection = EvalancheConnection::create(\n    'given host',\n    'given username',\n    'given password',\n    Language::LANG_DE\n);\n```\n\n###### Possible values\n- English: `Language::LANG_EN`\n- German: `Language::LANG_DE`\n- Italian: `Language::LANG_IT`\n- French: `Language::LANG_FR`\n\n\n#### Time format\nDefault time format is iso8601, but you can pass a different format code when establishing the connection.\n\nUse the provided Enums in the class `\\Scn\\EvalancheReportingApiConnector\\Enum\\TimeFormat`\n\n###### Example\n```php\nuse Scn\\EvalancheReportingApiConnector\\EvalancheConnection;\nuse Scn\\EvalancheReportingApiConnector\\Enum\\Language;\nuse Scn\\EvalancheReportingApiConnector\\Enum\\TimeFormat;\n\n$connection = EvalancheConnection::create(\n    'given host',\n    'given username',\n    'given password',\n    Language::LANG_DE,\n    TimeFormat::UNIX,\n);\n```\n\n###### Possible values\n- `TimeFormat::ISO8601`\n- `TimeFormat::UNIX`\n- `TimeFormat::RFC822`\n- `TimeFormat::RFC850`\n- `TimeFormat::RFC1036`\n- `TimeFormat::RFC1123`\n- `TimeFormat::RFC2822`\n- `TimeFormat::RFC3339`\n- `TimeFormat::W3C`\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsc-networks%2Fevalanche-reporting-api-connector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsc-networks%2Fevalanche-reporting-api-connector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsc-networks%2Fevalanche-reporting-api-connector/lists"}