import { AxiosResponse } from 'axios' ; import debug from 'debug' ; import { Send } from '../interfaces/send' ; import { ajax } from '@/utils/ajax' ; const Debugger = debug ( 'push:i-got' ) ; author CaoMeiYouRen
 *  date export class export class IGot implements Send { private private I_GOT_KEY : string ; author CaoMeiYouRen
     *  date param I_GOT_KEY constructor ( I_GOT_KEY ) { this . I_GOT_KEY = I_GOT_KEY ; Debugger ( 'set I_GOT_KEY: "%s"' , I_GOT_KEY ) ; if ( ! this . I_GOT_KEY ) { throw new Error ( 'I_GOT_KEY 是必须的！' ) ; } } author CaoMeiYouRen
     *  date param title param content param url returns send ( title , content ? , url ? ) { Debugger ( 'title: "%s", content: "%s", url: "%s"' , title , content , url ) ; return ajax ( { url : `https://push.hellyw.com/${ this . I_GOT_KEY }` , method : 'POST' , headers : { 'Content-Type' : 'application/json' , } , data : { title , content : content || title , url , automaticallyCopy : 0 , } , } ) ; } }