We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nchan has a concept named groups. A group configuration can be shown and can be changed.
Suggested implementation / collaborators
Code documentation and use statements has been removed for readability.
This class wraps the group api.
<?php namespace Marein\Nchan\Api; final class Group { private $groupUrl; private $client; public function __construct(Url $groupUrl, Client $client) { $this->groupUrl = $groupUrl; $this->client = $client; } public function configuration(): GroupInformation { // Create and return value object for group information. } public function configure(): GroupConfigurator { return new GroupConfigurator($this->groupUrl, $this->client); } }
This class acts like a builder for the group configuration. The configuration is sent when the configurate method is called.
<?php namespace Marein\Nchan\Api; final class GroupConfigurator { private $groupUrl; private $client; public function __construct(Url $groupUrl, Client $client) { $this->groupUrl = $groupUrl; $this->client = $client; } public function changeMaximumNumberOfChannels( int $maximumNumberOfChannels ): GroupConfigurator { $this->groupUrl = $this->groupUrl->appendQueryString( 'max_channels', $maximumNumberOfChannels ); return $this; } public function changeMaximumNumberOfSubscribers( int $maximumNumberOfSubscribers ): GroupConfigurator { $this->groupUrl = $this->groupUrl->appendQueryString( 'max_subs', $maximumNumberOfSubscribers ); return $this; } public function configurate(): void { // Send request with configured items } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Nchan has a concept named groups. A group configuration can be shown and can be changed.
Suggested implementation / collaborators
Code documentation and use statements has been removed for readability.
This class wraps the group api.
This class acts like a builder for the group configuration. The configuration is sent when the configurate method is called.
The text was updated successfully, but these errors were encountered: