根据标签发送图片消息

@param string $group_id
@param string $media_id
@param string $title
@param string $description
@return array
358744
public function sendImageByTag($tag_id, $media_id, $is_to_all = false)
    {
        $ret = array();
        $ret['filter']['tag_id'] = $tag_id;
        $ret['filter']['is_to_all'] = $is_to_all;
        $ret['msgtype'] = 'image';
        $ret['image']['media_id'] = $media_id;
        return $this->sendAll($ret);
    }
477819
public function uploadVideo($path, $title, $description)
    {
        $params = [
            'description' => json_encode(
                [
                    'title' => $title,
                    'introduction' => $description,
                ], JSON_UNESCAPED_UNICODE),
        ];

        return $this->uploadMedia('video', $path, $params);
    }
783630
def get_or_create_data_group(self, title: str) -> DataGroup:
        
        return DataGroup(self.__document_controller.document_model.get_or_create_data_group(title))
320713
public function getMediaWithHttpInfo($media_id, $is_video = false)
    {
        if (!$this->access_token && !$this->getAccessToken()) {
            return false;
        }
        $url_prefix = $is_video ? str_replace('https', 'http', self::API_URL_PREFIX) : self::API_URL_PREFIX;
        $url = $url_prefix . self::MEDIA_GET_URL . "access_token={$this->access_token}" . '&media_id=' . $media_id;
        $oCurl = curl_init();
        if (stripos($url, "https://") !== false) {
            curl_setopt($oCurl, CURLOPT_SSL_VERIFYPEER, false);
            curl_setopt($oCurl, CURLOPT_SSL_VERIFYHOST, false);
            curl_setopt($oCurl, CURLOPT_SSLVERSION, 1);
        }
        curl_setopt($oCurl, CURLOPT_URL, $url);
        curl_setopt($oCurl, CURLOPT_RETURNTRANSFER, 1);
        $sContent = curl_exec($oCurl);
        $aStatus = curl_getinfo($oCurl);
        $result = array();
        if (intval($aStatus["http_code"]) !== 200) {
            return false;
        }
        if ($sContent) {
            if (is_string($sContent)) {
                $json = json_decode($sContent, true);
                if (isset($json['errcode'])) {
                    $this->errCode = $json['errcode'];
                    $this->errMsg = $json['errmsg'];
                    return $this->checkRetry(__FUNCTION__, func_get_args());
                }
            }
            $result['content'] = $sContent;
            $result['info'] = $aStatus;
            return $result;
        }
        return false;
    }
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;
	}
923697
public static function create(string $title, string $link, string $description): self
    {
        return new self($title, $link, $description);
    }
896873
function title( $contentObjectAttribute,  $name = "original_filename" )
    {
        $mediaFile = eZMedia::fetch( $contentObjectAttribute->attribute( "id" ),
                                      $contentObjectAttribute->attribute( "version" ) );

        if ( $mediaFile != null )
            $value = $mediaFile->attribute( $name );
        else
            $value = "";
        return $value;
    }
551379
public function openidVoice($media_id = '', $openids = [])
    {
        $queryStr                      = [];
        $queryStr['touser']            = $openids;
        $queryStr['voice']['media_id'] = $media_id;
        $queryStr['msgtype']           = 'voice';

        $this->module = 'message';

        $res = $this->_post('mass/send', $queryStr);

        return $res;
    }
674512
public function video($mediaid='',$title='',$description='')
	{
		$msg = array(
			'ToUserName' => $this->getRevFrom(),
			'FromUserName'=>$this->getRevTo(),
			'MsgType'=>self::MSGTYPE_IMAGE,
			'Video'=>array(
			        'MediaId'=>$mediaid,
			        'Title'=>$title,
			        'Description'=>$description
			),
			'CreateTime'=>time(),
		);
		$this->Message($msg);
		return $this;
	}
1120749
public static function group_description() {
        return new external_single_structure(
            array(
                'id' => new external_value(PARAM_INT, 'group record id'),
                'name' => new external_value(PARAM_TEXT, 'multilang compatible name, course unique'),
                'description' => new external_value(PARAM_RAW, 'group description text'),
                'descriptionformat' => new external_format_value('description'),
                'idnumber' => new external_value(PARAM_RAW, 'id number'),
                'courseid' => new external_value(PARAM_INT, 'course id', VALUE_OPTIONAL),
            )
        );
    }
819742
public function create($imageUrl, $boardId, $description = '', $link = '', $title = '', $sectionId = null)
    {
        // Upload image if first argument is a local file
        if (file_exists($imageUrl)) {
            $imageUrl = $this->upload($imageUrl);
        }

        $requestOptions = [
            'method' => 'scraped',
            'description' => $description,
            'link' => $link,
            'image_url' => $imageUrl,
            'board_id' => $boardId,
            'title' => $title,
        ];

        if ($sectionId !== null) {
            $requestOptions['section'] = $sectionId;
        }

        $this->post(UrlBuilder::RESOURCE_CREATE_PIN, $requestOptions);

        return $this->response->getResponseData();
    }
531975
public function uploadVideo(string $path, string $title, string $description)
    {
        $params = [
            'description' => json_encode(
                [
                    'title' => $title,
                    'introduction' => $description,
                ], JSON_UNESCAPED_UNICODE),
        ];

        return $this->upload('video', $path, $params);
    }
1051309
public function setScatterSerieDescription($ID, $Description = "My serie")
    {
        if (isset($this->Data["ScatterSeries"][$ID])) {
            $this->Data["ScatterSeries"][$ID]["Description"] = $Description;
        }
    }
671311
public function groupGetdetail($group_id,$begin=0,$count=1000){
        $params=array(
            'begin'=>$begin,
            'count'=>$count,
            'group_id'=>$group_id,
        );
        $rst = $this->_request->post($this->_url . 'group/getdetail', $params);
        return $this->_client->rst($rst);
    }
970893
private function getTipGroups(Description $description)
    {
        $tipsDescription = $description->getOptionalProperty('tips');

        if (!($tipsDescription instanceof Description)) {
            return [];
        }

        return array_map(
            function (\stdClass $groupDescription) {
                return $this->tipGroupFactory->create(new Description($groupDescription));
            },
            $tipsDescription->getOptionalProperty('groups', [])
        );
    }
1087424
public function setGroupTrailerByNumber($query_name, $trailer_number, $trailer_column, $value_column, $trailer_custom = false, $show_in_html, $show_in_pdf)
    {
        $tn = (int) $trailer_number;
        if (!$this->checkGroupNameR("createGroupTrailer", $query_name)) {
            ReporticoApp::handleError("Failure in Group Column Trailer: Unknown Group Name $query_name");
            return;
        }

        if (!$this->checkColumnNameR("createGroupTrailer", $trailer_column)) {
            ReporticoApp::handleError("Failure in Group Column Trailer: Unknown Column $trailer_column");
            return;
        }

        if (!$this->checkColumnNameR("createGroupTrailer", $value_column)) {
            ReporticoApp::handleError("Failure in Group Column Trailer: Unknown Column $value_column");
            return;
        }

        //$grp =& $this->groups[$query_name] ;
        $grp = ReporticoUtility::getGroupColumn($query_name, $this->groups);
        $col = ReporticoUtility::getQueryColumn($value_column, $this->columns);

        $trailer = array();
        $trailer["GroupTrailerValueColumn"] = $col;
        $trailer["GroupTrailerDisplayColumn"] = $trailer_column;
        $trailer["GroupTrailerCustom"] = $trailer_custom;
        $trailer["ShowInHTML"] = $show_in_html;
        $trailer["ShowInPDF"] = $show_in_pdf;

        $ct = 0;
        $k = false;
        $updtr = false;
        $looping = true;

        foreach ($grp->trailers as $k => $v) {
            if ($k == $tn) {
                $grp->trailers[$k] = $trailer;
                return;
            }
        }

    }
1231917
public function addColumnsGroup(string $group_title)
    {
        $args_count = \func_num_args();
        $args = \func_get_args();

        if ($args_count === 1) {
            throw new ArgumentCountError('Column group must contain at least one column.');
        }

        $columns = [];

        for ($i = 1; $i < $args_count; $i++) {
            $this->addColumn($args[$i]);
            /** @var Column $arg */
            $arg = $args[$i];
            $columns[] = $arg->getKey();
        }

        $this->grouped_columns[] = $columns;
        $this->columns_groups[] = $group_title;

        return $this;
    }