123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247 |
- <?php
- /**
- * dingtalk API: dingtalk.oapi.edu.recommend.create request
- *
- * @author auto create
- * @since 1.0, 2021.04.21
- */
- class OapiEduRecommendCreateRequest
- {
- /**
- * 班级ID
- **/
- private $classId;
-
- /**
- * 内容标签,推荐扩散给其他用户使用
- **/
- private $labelList;
-
- /**
- * ISV侧内容唯一ID
- **/
- private $outContentId;
-
- /**
- * 学段
- **/
- private $periodCode;
-
- /**
- * 回跳地址
- **/
- private $returnUrl;
-
- /**
- * 学科
- **/
- private $subjectCode;
-
- /**
- * 摘要
- **/
- private $summary;
-
- /**
- * 教材版本
- **/
- private $textbookCode;
-
- /**
- * 缩略图url地址
- **/
- private $thumbnail;
-
- /**
- * 内容标题
- **/
- private $title;
-
- /**
- * 内容总时长,单位秒
- **/
- private $totalTime;
-
- /**
- * 类型:1词汇 2课文 3题目 4考试 5知识点 6课程 7其他
- **/
- private $type;
-
- /**
- * 当前用户userid
- **/
- private $userid;
-
- private $apiParas = array();
-
- public function setClassId($classId)
- {
- $this->classId = $classId;
- $this->apiParas["class_id"] = $classId;
- }
- public function getClassId()
- {
- return $this->classId;
- }
- public function setLabelList($labelList)
- {
- $this->labelList = $labelList;
- $this->apiParas["labelList"] = $labelList;
- }
- public function getLabelList()
- {
- return $this->labelList;
- }
- public function setOutContentId($outContentId)
- {
- $this->outContentId = $outContentId;
- $this->apiParas["out_content_id"] = $outContentId;
- }
- public function getOutContentId()
- {
- return $this->outContentId;
- }
- public function setPeriodCode($periodCode)
- {
- $this->periodCode = $periodCode;
- $this->apiParas["period_code"] = $periodCode;
- }
- public function getPeriodCode()
- {
- return $this->periodCode;
- }
- public function setReturnUrl($returnUrl)
- {
- $this->returnUrl = $returnUrl;
- $this->apiParas["return_url"] = $returnUrl;
- }
- public function getReturnUrl()
- {
- return $this->returnUrl;
- }
- public function setSubjectCode($subjectCode)
- {
- $this->subjectCode = $subjectCode;
- $this->apiParas["subject_code"] = $subjectCode;
- }
- public function getSubjectCode()
- {
- return $this->subjectCode;
- }
- public function setSummary($summary)
- {
- $this->summary = $summary;
- $this->apiParas["summary"] = $summary;
- }
- public function getSummary()
- {
- return $this->summary;
- }
- public function setTextbookCode($textbookCode)
- {
- $this->textbookCode = $textbookCode;
- $this->apiParas["textbook_code"] = $textbookCode;
- }
- public function getTextbookCode()
- {
- return $this->textbookCode;
- }
- public function setThumbnail($thumbnail)
- {
- $this->thumbnail = $thumbnail;
- $this->apiParas["thumbnail"] = $thumbnail;
- }
- public function getThumbnail()
- {
- return $this->thumbnail;
- }
- public function setTitle($title)
- {
- $this->title = $title;
- $this->apiParas["title"] = $title;
- }
- public function getTitle()
- {
- return $this->title;
- }
- public function setTotalTime($totalTime)
- {
- $this->totalTime = $totalTime;
- $this->apiParas["totalTime"] = $totalTime;
- }
- public function getTotalTime()
- {
- return $this->totalTime;
- }
- public function setType($type)
- {
- $this->type = $type;
- $this->apiParas["type"] = $type;
- }
- public function getType()
- {
- return $this->type;
- }
- public function setUserid($userid)
- {
- $this->userid = $userid;
- $this->apiParas["userid"] = $userid;
- }
- public function getUserid()
- {
- return $this->userid;
- }
- public function getApiMethodName()
- {
- return "dingtalk.oapi.edu.recommend.create";
- }
-
- public function getApiParas()
- {
- return $this->apiParas;
- }
-
- public function check()
- {
-
- RequestCheckUtil::checkMaxListSize($this->labelList,100,"labelList");
- RequestCheckUtil::checkNotNull($this->outContentId,"outContentId");
- RequestCheckUtil::checkNotNull($this->periodCode,"periodCode");
- RequestCheckUtil::checkNotNull($this->returnUrl,"returnUrl");
- RequestCheckUtil::checkNotNull($this->thumbnail,"thumbnail");
- RequestCheckUtil::checkNotNull($this->title,"title");
- RequestCheckUtil::checkNotNull($this->type,"type");
- RequestCheckUtil::checkNotNull($this->userid,"userid");
- }
-
- public function putOtherTextParam($key, $value) {
- $this->apiParas[$key] = $value;
- $this->$key = $value;
- }
- }
|