{"id":14067705,"url":"https://github.com/adjust/api-client-r","last_synced_at":"2025-05-10T08:31:09.312Z","repository":{"id":32212336,"uuid":"35786161","full_name":"adjust/api-client-r","owner":"adjust","description":"an R client for the KPI service https://docs.adjust.com/en/kpi-service/","archived":true,"fork":false,"pushed_at":"2024-01-04T03:49:33.000Z","size":39,"stargazers_count":14,"open_issues_count":2,"forks_count":9,"subscribers_count":71,"default_branch":"master","last_synced_at":"2025-03-22T07:51:27.500Z","etag":null,"topics":["adjust","api","client","r"],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adjust.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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}},"created_at":"2015-05-17T22:52:07.000Z","updated_at":"2024-09-30T15:43:36.000Z","dependencies_parsed_at":"2024-08-13T07:23:31.763Z","dependency_job_id":null,"html_url":"https://github.com/adjust/api-client-r","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fapi-client-r","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fapi-client-r/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fapi-client-r/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjust%2Fapi-client-r/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adjust","download_url":"https://codeload.github.com/adjust/api-client-r/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253389736,"owners_count":21900805,"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","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":["adjust","api","client","r"],"created_at":"2024-08-13T07:05:44.171Z","updated_at":"2025-05-10T08:31:08.759Z","avatar_url":"https://github.com/adjust.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"# R Client for the Adjust Statistics API\n\nThis is an R client for the [Adjust KPI service](https://docs.adjust.com/en/kpi-service/). It supports all API\nfunctionalities through well documented functions.\n\n## Installation\n\nThe client is currently best installed installed via GitHub (using the `devtools` package):\n\n    \u003e library(devtools)\n    \u003e devtools::install_github('adjust/api-client-r');\n\n## Usage\n\nLet's have a walk through the functionalities through a couple of examples. Start by loading the library.\n\n    \u003e library(adjust)\n\n### Setup and Authentication\n\nIn order for you to access the KPI Service, you need to authenticate with `user_token`. Your `user_token`, once you supply it, will be used throughout the entire R session. Furthermore, you need to provide `app_tokens` for the requests.\n\nYou have three ways to authenticate and provide these settings.\n\n#### Config File for UNIX Users\n\nSince version 0.0.5, UNIX users can save their configurations in a file and the `adjust` package will automatically use\nthese settings without having to explicitly authenticate in every R session. Using this feature will save you a lot of\nfunction calls that would otherwise have to be explicitly issued, as you see below.\n\nThe config file should be placed in your `HOME` (`~/`) directory and be named `.adjustrc`. The expected format is:\n\n```\nuser_token: aYSsuEVhAMDQDyZ8kj2K\napp_tokens: abcdefg,gfedcba\n```\n\nYou can skip any of these settings and still use the rest. For example, you can only keep your `user_token` there for\nauthentication, and provide `app_tokens` in a different way.\n\n#### Using `adjust.setup()` Function\n\nEven if you use the config file, you could still overwrite all settings there in an R session. To do this, you can use\nthe `adjust.setup()` function or the `set.user.token()`, `set.app.tokens()` functions. See the help pages for each of\nthose for more details and here is the example:\n\n    \u003e adjust.setup(user.token='aYSsuEVhAMDQDyZ8kj2K', app.tokens=c('abcdefg', 'gfedcba'))\n\n#### Provide `app.tokens` as Function Arguments.\n\nEven if you use the config file, call `adjust.setup()` in your script, you can still pass `app.tokens`\narguments to individual API calls. See the function descriptions for more details.\n\n### Statistics API calls\n\nThere are three functions that return KPI data from the API:\n\n    \u003e adjust.deliverables()\n    \u003e adjust.events()\n    \u003e adjust.cohorts()\n\nOnce you've setup your user token and app tokens, then each of these calls will produce data for you straight away.\n\nFor details on any of those, you should refer to the help pages for example by `?adjust.deliverables` as well as the KPI\nservice documentation, cited above.\n\nYou can, more interestingly, also specify parameters:\n\n    \u003e adjust.deliverables(start_date='2015-01-01', end_date='2015-01-10',\n        countries=c('us', 'de'), kpis=c('clicks', 'sessions', 'installs'))\n\n      tracker_token   tracker_name   clicks sessions installs\n    1        2yakhy   Twitter        19     369      0\n    2        26kvyi   Facebook       857    26251    311\n    3        3d7ly6   Adwords        1      0        0\n    ...\n\nA more complete example:\n\n    \u003e adjust.deliverables(\n        countries=c('us', 'de'),\n        kpis=c('sessions', 'installs'),\n        start_date='2015-05-01',\n        end_date='2015-05-10',\n        sandbox=TRUE,\n        grouping=c('trackers', 'countries'),\n        tracker_filter=c('26kvyi'))\n      )\n\nFor this function, you can issue calls for multiple app tokens at the same time and group for example by `grouping=c('app', 'network')`.\n\nNote that this function supports multiple `app_tokens`. This means that you can make calls like so:\n\n    \u003e adjust.deliverables(app.tokens=c('abcd', 'efgh'), grouping=('app', 'networks'))\n\nThis will return KPI data for the two apps, grouped by the app and all its network trackers.\n\n### Custom API instances\n\nFor most users this functionality wouldn't be necessary, but the adjust R client\nallows for custom API hosts to be used. Check the function `adjust.set.host()`\nfor more details.\n\n### Debugging\n\nThe functions `adjust.enable.verbose()` and `adjust.disable.verbose()` will trigger verbose mode, which will output\ndetails on each API call, such as exact API URL used.\n\n## Contributions and bug reports.\n\nRunning the tests for development relies on the `testthat` package:\n\n    \u003e library(testthat);\n    \u003e test_file('tests/adjust.R');\n\nContributions and bug reports are only acceptable as GitHub Pull Requests and issues. Thanks!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadjust%2Fapi-client-r","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadjust%2Fapi-client-r","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadjust%2Fapi-client-r/lists"}