getTargetUser(); $tag = $this->getValidatedParams()['tag']; $count = $this->contributionsLookup->getContributionCount( $target, $this->getAuthority(), $tag ); $response = [ 'count' => $count ]; return $response; } public function getParamSettings() { $settings = [ 'tag' => [ self::PARAM_SOURCE => 'query', ParamValidator::PARAM_TYPE => 'string', ParamValidator::PARAM_REQUIRED => false, ParamValidator::PARAM_DEFAULT => null, ] ]; if ( $this->me === false ) { $settings['user'] = [ self::PARAM_SOURCE => 'path', ParamValidator::PARAM_REQUIRED => true, ParamValidator::PARAM_TYPE => 'user', UserDef::PARAM_RETURN_OBJECT => true, UserDef::PARAM_ALLOWED_USER_TYPES => [ 'name', 'ip' ], ]; } return $settings; } }