Create a community

@param string $name
@param string $summary
@param string $description
@param string $rules
@param string $accessToken
@throws InvalidParameterLengthException
@throws EndpointNotSupportedByApiVersionException
@return array|json
489367
public function createCommunity($name, $summary, $description, $rules, $accessToken)
    {
        if (!$this->apiVersionIsGreaterThanV3()) {
            throw new EndpointNotSupportedByApiVersionException();
        }

        if (strlen($name) < 3 || strlen($name) > 25) {
            throw new InvalidParameterLengthException('name');
        }

        if (strlen($summary) > 160) {
            throw new InvalidParameterLengthException('summary');
        }

        if (strlen($description) > 1572864) { // 1.5MB
            throw new InvalidParameterLengthException('description');
        }

        if (strlen($rules) > 1572864) { // 1.5MB
            throw new InvalidParameterLengthException('rules');
        }

        $params = [
            'name' => $name,
            'summary' => $summary,
            'description' => $description,
            'rules' => $rules,
        ];

        return $this->post('communities', $params, $accessToken);
    }
409786
public static function createRole($name, $description)
    {
        // Create role with a given name and description and add it to RBAC system
        $auth = Yii::$app->authManager;
        $role = $auth->createRole($name);
        $role->description = $description;
        $auth->add($role);

        return $role;
    }
863105
public function createTags($name)
    {
        $url = "https://api.weixin.qq.com/cgi-bin/tags/create?access_token=ACCESS_TOKEN";
        $this->registerApi($url, __FUNCTION__, func_get_args());
        return $this->httpPostForJson($url, ['tag' => ['name' => $name]]);
    }
1354935
public function create_group($name, $course_name, $course_description, $course_link = null){
		$data = array(
		    "group" => array(
		    	"name" => $name,
		    	"course_name" => $course_name,
				"course_description" => $course_description,
    			"course_link" => $course_link
		    )
		);

		$client = new \GuzzleHttp\Client();

		$response = $client->post($this->api_endpoint.'issuer/groups', array(
		    'headers' =>  array('Authorization' => 'Token token="'.$this->getAPIKey().'"'),
		    'json' => $data
		));

		$result = json_decode($response->getBody());

		return $result;
	}
947042
public static function build($name, $version, $description)
    {
        $api = new static();
        $api->name = $name;
        $api->apiVersion = $version;
        $api->description = $description;

        return $api;
    }
925413
public function create($name)
    {
        $params = array(
            "tag" => array(
                "name" => $name
            )
        );
        $rst = $this->_request->post($this->_url . 'tags/create', $params);
        return $this->_client->rst($rst);
    }
219759
public function create(Description $description)
    {
        $timeZone           = $description->getOptionalProperty('timeZone');
        $likesDescription   = $description->getOptionalProperty('likes');
        $hereNowDescription = $description->getOptionalProperty('hereNow');

        return new Detail(
            $description->getMandatoryProperty('verified'),
            $this->getCreatedAt($description),
            $this->getBestPhoto($description),
            $description->getOptionalProperty('rating'),
            $description->getOptionalProperty('url'),
            ($hereNowDescription instanceof Description) ? $hereNowDescription->getMandatoryProperty('count') : null,
            $description->getOptionalProperty('tags', []),
            ($likesDescription instanceof Description) ? $likesDescription->getMandatoryProperty('count'): null,
            ($timeZone !== null) ? new \DateTimeZone($timeZone) : null
        );
    }
297969
public static function create($name, $type, $description = null)
    {
        $result = new static();
        $result->name = $name;
        $result->type = $type;
        $result->description = $description;

        return $result;
    }
634280
public function create($name, $params = [ ])
    {
        if ($name !== null) {
            $name = $this->getName($name);
        } else {
            $name = $this->_base;
        }

        if (!isset($params['rule'])) {
            $params['rule'] = $this->_rule;
        }

        if (!isset($params['class'])) {
            $params['class'] = $this->_class;
        }

        return $this->link($name, $params);
    }
173618
protected function findObject($name, $description = null) {
		$this->client->setup();
		
		if(!$description)
			$description = $this->description;
	
		if(isSet($description->actions)) {
			foreach($description->actions as $searched_name => $desc) {
				if($searched_name == $name || in_array($name, $desc->aliases)) {
					return new Action($this->client, $this, $searched_name, $description->actions->$searched_name, $this->args);
				}
			}
		}
		
		if(array_key_exists($name, (array) $description->resources)) {
			return new Resource($this->client, $name, $description->resources->$name, $this->args);
		}
		
		return false;
	}
525584
public function createRole($name, $key = null, $description = null)
    {
        $key        =   snake_case(isset($key) ? $key : $name);
        $description=   isset($description) ? $description : $name;
        $values     =   compact('name', 'key', 'description');

        return $this->roleProvider->create($values);
    }
541143
public function create(
        string $title,
        string $description,
        $amount,
        array $optional = []
    ): Response {
        $body = \array_merge(\compact('title', 'description', 'amount'), $optional);

        list($headers, $stream) = $this->prepareMultipartRequestPayloads([], $body);

        return $this->stream('POST', 'open_collections', $headers, $body);
    }
157615
public function create($name, $enabled = null)
    {
        if (is_null($name)) {
            throw new PlivoValidationException(
                "Mandatory parameters cannot be null");
        }

        $data = [
            'name' => $name,
            'enabled' => $enabled
        ];

        $response = $this->client->update(
            $this->uri,
            $data
        );
        $responseContents = $response->getContent();
        if(!array_key_exists("error",$responseContents)){

            return new SubAccountCreateResponse(
                $responseContents['message'],
                $responseContents['auth_id'], 
                $responseContents['auth_token'], 
                $responseContents['api_id'],
                $response->getStatusCode()
            );
            
        } else {
            throw new PlivoResponseException(
                $responseContents['error'],
                0,
                null,
                $response->getContent(),
                $response->getStatusCode()

            );
        }
    }
275795
public BoxWebLink.Info createWebLink(String name, URL linkURL, String description) {
        JsonObject parent = new JsonObject();
        parent.add("id", this.getID());

        JsonObject newWebLink = new JsonObject();
        newWebLink.add("name", name);
        newWebLink.add("parent", parent);
        newWebLink.add("url", linkURL.toString());

        if (description != null) {
            newWebLink.add("description", description);
        }

        BoxJSONRequest request = new BoxJSONRequest(this.getAPI(),
                CREATE_WEB_LINK_URL.build(this.getAPI().getBaseURL()), "POST");
        request.setBody(newWebLink.toString());
        BoxJSONResponse response = (BoxJSONResponse) request.send();
        JsonObject responseJSON = JsonObject.readFrom(response.getJSON());

        BoxWebLink createdWebLink = new BoxWebLink(this.getAPI(), responseJSON.get("id").asString());
        return createdWebLink.new Info(responseJSON);
    }
1295136
public function createGroup($name){
        if (!$this->access_token && !$this->checkAuth()) return false;
        $data = array(
                'group'=>array('name'=>$name)
        );
        $result = $this->http_post(self::API_URL_PREFIX.self::GROUP_CREATE_URL.'access_token='.$this->access_token,self::json_encode($data));
        if ($result)
        {
            $json = json_decode($result,true);
            if (!$json || !empty($json['errcode'])) {
                $this->errCode = $json['errcode'];
                $this->errMsg = $json['errmsg'];
                return false;
            }
            return $json;
        }
        return false;
    }
1366349
public function create(Description $description)
    {
        return new Tip(
            new Identifier($description->getMandatoryProperty('id')),
            $description->getMandatoryProperty('text'),
            $description->getMandatoryProperty('type'),
            $description->getMandatoryProperty('agreeCount'),
            $description->getMandatoryProperty('disagreeCount')
        );
    }
1265828
protected function addArgumentInput($name, $requirement, $description = '')
    {
        $this->inputs[] = new Argument($name, $requirement, $description);
    }