|
@@ -79,6 +79,7 @@ public class FeishuDocApiService {
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 在文档中插入 text + link 块(用于“观看课程”超链接)
|
|
* 在文档中插入 text + link 块(用于“观看课程”超链接)
|
|
|
|
|
+ * 使用一级标题 + 居中,便于客户点击
|
|
|
*/
|
|
*/
|
|
|
public void createTextLinkBlock(Client client, String documentId, String url) throws Exception {
|
|
public void createTextLinkBlock(Client client, String documentId, String url) throws Exception {
|
|
|
CreateDocumentBlockChildrenReq req = CreateDocumentBlockChildrenReq.newBuilder()
|
|
CreateDocumentBlockChildrenReq req = CreateDocumentBlockChildrenReq.newBuilder()
|
|
@@ -90,8 +91,11 @@ public class FeishuDocApiService {
|
|
|
.index(0)
|
|
.index(0)
|
|
|
.children(new Block[]{
|
|
.children(new Block[]{
|
|
|
Block.newBuilder()
|
|
Block.newBuilder()
|
|
|
- .blockType(6)
|
|
|
|
|
- .heading4(Text.newBuilder()
|
|
|
|
|
|
|
+ .blockType(3)
|
|
|
|
|
+ .heading1(Text.newBuilder()
|
|
|
|
|
+ .style(TextStyle.newBuilder()
|
|
|
|
|
+ .align(2)
|
|
|
|
|
+ .build())
|
|
|
.elements(new TextElement[]{
|
|
.elements(new TextElement[]{
|
|
|
TextElement.newBuilder()
|
|
TextElement.newBuilder()
|
|
|
.textRun(TextRun.newBuilder()
|
|
.textRun(TextRun.newBuilder()
|