name('Google Analytics') //->model(Project::class) ->expectsJsonData() //->transformer(ModelTransformer::class) ->itemKey('ga') ->collectionKey('ga') ->deny(AclRoles::UNAUTHORIZED) ->handler(GaController::class) ->endpoint(ApiEndpoint::get('?{metric}', 'getAction') ->allow(AclRoles::USER) ->description('Returns data from Google Analytics Api') ->exampleResponse(' { "reports": [ { "columnHeader": { "metricHeader": { "metricHeaderEntries": [ { "name": "users", "type": "INTEGER" }, { "name": "sessionsPerUser", "type": "FLOAT" } ] } }, "data": { "rows": [ { "metrics": [ { "values": [ "4814", "1.23764021603656" ] } ] } ], "totals": [ { "values": [ "4814", "1.23764021603656" ] } ], "rowCount": 1, "minimums": [ { "values": [ "4814", "1.23764021603656" ] } ], "maximums": [ { "values": [ "4814", "1.23764021603656" ] } ] } } ] } ') ) ; } }