All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hn.robot.dingtalk.domain.FeedCard Maven / Gradle / Ivy

There is a newer version: 1.0.18
Show newest version
package com.hn.robot.dingtalk.domain;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 描述: FeedCard
 *
 * @author fei
 */
public class FeedCard {
    /**
     * links
     */
    private List links = new ArrayList<>();

    public FeedCard add(String title,String messageURL,String picURL){
        Link link = new Link(title,messageURL,picURL);
        links.add(link);
        return this;
    }

    public List getLinks() {
        return links;
    }

    public void setLinks(List links) {
        this.links = links;
    }

    @Data
    public class Link{
        /**
         * 单条信息文本
         */
        private String title;
        /**
         * 点击单条信息到跳转链接
         */
        private String messageURL;
        /**
         * 单条信息后面图片的URL
         */
        private String picURL;
        public Link(String title, String messageURL, String picURL) {
            this.title = title;
            this.messageURL = messageURL;
            this.picURL = picURL;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy