mirror of
https://github.com/Eyre-S/Coeur-Morny-Cono.git
synced 2024-11-25 04:27:41 +08:00
move external API docking code to extra
package from data
This commit is contained in:
parent
a9767ec1b0
commit
3d1699ea1d
@ -5,7 +5,7 @@ MORNY_ARCHIVE_NAME = morny-coeur
|
||||
MORNY_CODE_STORE = https://github.com/Eyre-S/Coeur-Morny-Cono
|
||||
MORNY_COMMIT_PATH = https://github.com/Eyre-S/Coeur-Morny-Cono/commit/%s
|
||||
|
||||
VERSION = 1.3.0-dev11
|
||||
VERSION = 1.3.0-dev11.1
|
||||
|
||||
USE_DELTA = false
|
||||
VERSION_DELTA =
|
||||
|
@ -1,11 +1,12 @@
|
||||
package cc.sukazyo.cono.morny.bot.command
|
||||
import cc.sukazyo.cono.morny.data.{twitter, weibo, TelegramStickers}
|
||||
import cc.sukazyo.cono.morny.data.TelegramStickers
|
||||
import cc.sukazyo.cono.morny.util.tgapi.InputCommand
|
||||
import cc.sukazyo.cono.morny.MornyCoeur
|
||||
import cc.sukazyo.cono.morny.data.twitter.{FXApi, TweetUrlInformation}
|
||||
import cc.sukazyo.cono.morny.extra.{twitter, weibo}
|
||||
import cc.sukazyo.cono.morny.extra.twitter.{FXApi, TweetUrlInformation}
|
||||
import cc.sukazyo.cono.morny.util.tgapi.TelegramExtensions.Bot.exec
|
||||
import cc.sukazyo.cono.morny.Log.{exceptionLog, logger}
|
||||
import cc.sukazyo.cono.morny.data.weibo.StatusUrlInfo
|
||||
import cc.sukazyo.cono.morny.extra.weibo.StatusUrlInfo
|
||||
import com.pengrad.telegrambot.model.Update
|
||||
import com.pengrad.telegrambot.model.request.{InputMedia, InputMediaPhoto, InputMediaVideo, ParseMode}
|
||||
import com.pengrad.telegrambot.request.{SendMediaGroup, SendMessage, SendSticker}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package cc.sukazyo.cono.morny.bot.command
|
||||
|
||||
import cc.sukazyo.cono.morny.MornyCoeur
|
||||
import cc.sukazyo.cono.morny.data.ip186.IP186QueryHandler
|
||||
import cc.sukazyo.cono.morny.extra.ip186.IP186QueryHandler
|
||||
import cc.sukazyo.cono.morny.util.tgapi.InputCommand
|
||||
import cc.sukazyo.cono.morny.util.tgapi.TelegramExtensions.Bot.exec
|
||||
import com.pengrad.telegrambot.model.Update
|
||||
|
@ -1,7 +1,8 @@
|
||||
package cc.sukazyo.cono.morny.bot.command
|
||||
|
||||
import cc.sukazyo.cono.morny.MornyCoeur
|
||||
import cc.sukazyo.cono.morny.data.{NbnhhshQuery, TelegramStickers}
|
||||
import cc.sukazyo.cono.morny.data.TelegramStickers
|
||||
import cc.sukazyo.cono.morny.extra.NbnhhshQuery
|
||||
import cc.sukazyo.cono.morny.util.tgapi.formatting.TelegramParseEscape.escapeHtml as h
|
||||
import cc.sukazyo.cono.morny.util.tgapi.InputCommand
|
||||
import cc.sukazyo.cono.morny.util.tgapi.TelegramExtensions.Bot.exec
|
||||
|
@ -24,7 +24,7 @@ class ShareToolBilibili (using coeur: MornyCoeur) extends ITelegramQuery {
|
||||
if (event.inlineQuery.query == null) return null
|
||||
if (event.inlineQuery.query isBlank) return null
|
||||
|
||||
import cc.sukazyo.cono.morny.data.BilibiliForms.*
|
||||
import cc.sukazyo.cono.morny.extra.BilibiliForms.*
|
||||
val result: BiliVideoId =
|
||||
try
|
||||
parse_videoUrl(event.inlineQuery.query)
|
||||
|
@ -1,7 +1,7 @@
|
||||
package cc.sukazyo.cono.morny.bot.query
|
||||
|
||||
import cc.sukazyo.cono.morny.data.twitter
|
||||
import cc.sukazyo.cono.morny.data.twitter.TweetUrlInformation
|
||||
import cc.sukazyo.cono.morny.extra.twitter
|
||||
import cc.sukazyo.cono.morny.extra.twitter.TweetUrlInformation
|
||||
import cc.sukazyo.cono.morny.util.tgapi.formatting.NamingUtils.inlineQueryId
|
||||
import com.pengrad.telegrambot.model.Update
|
||||
import com.pengrad.telegrambot.model.request.InlineQueryResultArticle
|
||||
|
@ -1,4 +1,4 @@
|
||||
package cc.sukazyo.cono.morny.data
|
||||
package cc.sukazyo.cono.morny.extra
|
||||
|
||||
import cc.sukazyo.cono.morny.util.BiliTool
|
||||
import cc.sukazyo.cono.morny.util.SttpPublic.{mornyBasicRequest, Schemes}
|
@ -1,4 +1,4 @@
|
||||
package cc.sukazyo.cono.morny.data
|
||||
package cc.sukazyo.cono.morny.extra
|
||||
|
||||
import cc.sukazyo.cono.morny.util.SttpPublic.mornyBasicRequest
|
||||
import com.google.gson.Gson
|
@ -1,4 +1,4 @@
|
||||
package cc.sukazyo.cono.morny.data.ip186
|
||||
package cc.sukazyo.cono.morny.extra.ip186
|
||||
|
||||
import cc.sukazyo.cono.morny.util.SttpPublic.{mornyBasicRequest, Schemes}
|
||||
import sttp.client3.{asString, HttpError, SttpClientException, UriContext}
|
@ -1,3 +1,3 @@
|
||||
package cc.sukazyo.cono.morny.data.ip186
|
||||
package cc.sukazyo.cono.morny.extra.ip186
|
||||
|
||||
case class IP186Response (url: String, body: String)
|
@ -1,4 +1,4 @@
|
||||
package cc.sukazyo.cono.morny.data.twitter
|
||||
package cc.sukazyo.cono.morny.extra.twitter
|
||||
|
||||
import cc.sukazyo.cono.morny.util.SttpPublic
|
||||
import cc.sukazyo.cono.morny.util.SttpPublic.mornyBasicRequest
|
@ -1,4 +1,4 @@
|
||||
package cc.sukazyo.cono.morny.data.twitter
|
||||
package cc.sukazyo.cono.morny.extra.twitter
|
||||
|
||||
/** Information about the author of a tweet.
|
||||
*
|
@ -1,4 +1,4 @@
|
||||
package cc.sukazyo.cono.morny.data.twitter
|
||||
package cc.sukazyo.cono.morny.extra.twitter
|
||||
|
||||
/** Data for external media, currently only video.
|
||||
*
|
@ -1,6 +1,6 @@
|
||||
package cc.sukazyo.cono.morny.data.twitter
|
||||
package cc.sukazyo.cono.morny.extra.twitter
|
||||
|
||||
import cc.sukazyo.cono.morny.data.twitter.FXMosaicPhoto.formatsType
|
||||
import cc.sukazyo.cono.morny.extra.twitter.FXMosaicPhoto.formatsType
|
||||
|
||||
/** Data for the mosaic service, which stitches photos together
|
||||
*
|
@ -1,4 +1,4 @@
|
||||
package cc.sukazyo.cono.morny.data.twitter
|
||||
package cc.sukazyo.cono.morny.extra.twitter
|
||||
|
||||
/** This can help compare items in a pool of media
|
||||
*
|
@ -1,4 +1,4 @@
|
||||
package cc.sukazyo.cono.morny.data.twitter
|
||||
package cc.sukazyo.cono.morny.extra.twitter
|
||||
|
||||
/** Data for a poll on a given Tweet.
|
||||
*
|
@ -1,4 +1,4 @@
|
||||
package cc.sukazyo.cono.morny.data.twitter
|
||||
package cc.sukazyo.cono.morny.extra.twitter
|
||||
|
||||
/** Data for a single choice in a poll
|
||||
*
|
@ -1,4 +1,4 @@
|
||||
package cc.sukazyo.cono.morny.data.twitter
|
||||
package cc.sukazyo.cono.morny.extra.twitter
|
||||
|
||||
/** Information about a requested translation for a Tweet, when asked.
|
||||
*
|
@ -1,6 +1,6 @@
|
||||
package cc.sukazyo.cono.morny.data.twitter
|
||||
package cc.sukazyo.cono.morny.extra.twitter
|
||||
|
||||
import cc.sukazyo.cono.morny.data.twitter.FXTweet.mediaType
|
||||
import cc.sukazyo.cono.morny.extra.twitter.FXTweet.mediaType
|
||||
import cc.sukazyo.cono.morny.util.EpochDateTime.EpochSeconds
|
||||
|
||||
/** The container of all the information for a Tweet.
|
@ -1,4 +1,4 @@
|
||||
package cc.sukazyo.cono.morny.data.twitter
|
||||
package cc.sukazyo.cono.morny.extra.twitter
|
||||
|
||||
/** Data for a Tweet's video
|
||||
*
|
@ -1,4 +1,4 @@
|
||||
package cc.sukazyo.cono.morny.data
|
||||
package cc.sukazyo.cono.morny.extra
|
||||
|
||||
import scala.util.matching.Regex
|
||||
|
@ -1,4 +1,4 @@
|
||||
package cc.sukazyo.cono.morny.data.weibo
|
||||
package cc.sukazyo.cono.morny.extra.weibo
|
||||
|
||||
case class MApi [D] (
|
||||
ok: Int,
|
@ -1,4 +1,4 @@
|
||||
package cc.sukazyo.cono.morny.data.weibo
|
||||
package cc.sukazyo.cono.morny.extra.weibo
|
||||
|
||||
case class MPic (
|
||||
pid: String,
|
@ -1,4 +1,4 @@
|
||||
package cc.sukazyo.cono.morny.data.weibo
|
||||
package cc.sukazyo.cono.morny.extra.weibo
|
||||
|
||||
case class MStatus (
|
||||
|
@ -1,4 +1,4 @@
|
||||
package cc.sukazyo.cono.morny.data.weibo
|
||||
package cc.sukazyo.cono.morny.extra.weibo
|
||||
|
||||
case class MUser (
|
||||
|
@ -1,4 +1,4 @@
|
||||
package cc.sukazyo.cono.morny.data
|
||||
package cc.sukazyo.cono.morny.extra
|
||||
|
||||
package object weibo {
|
||||
|
@ -1,6 +1,6 @@
|
||||
package cc.sukazyo.cono.morny.test.data
|
||||
package cc.sukazyo.cono.morny.test.extra
|
||||
|
||||
import cc.sukazyo.cono.morny.data.BilibiliForms.*
|
||||
import cc.sukazyo.cono.morny.extra.BilibiliForms.*
|
||||
import cc.sukazyo.cono.morny.test.MornyTests
|
||||
import org.scalatest.prop.TableDrivenPropertyChecks
|
||||
import org.scalatest.tagobjects.{Network, Slow}
|
@ -1,7 +1,7 @@
|
||||
package cc.sukazyo.cono.morny.test.data.twitter
|
||||
package cc.sukazyo.cono.morny.test.extra.twitter
|
||||
|
||||
import cc.sukazyo.cono.morny.data.twitter.FXApi
|
||||
import cc.sukazyo.cono.morny.data.twitter.FXApi.Fetch
|
||||
import cc.sukazyo.cono.morny.extra.twitter.FXApi
|
||||
import cc.sukazyo.cono.morny.extra.twitter.FXApi.Fetch
|
||||
import cc.sukazyo.cono.morny.test.MornyTests
|
||||
import org.scalatest.prop.TableDrivenPropertyChecks
|
||||
import org.scalatest.tagobjects.{Network, Slow}
|
@ -1,6 +1,6 @@
|
||||
package cc.sukazyo.cono.morny.test.data.twitter
|
||||
package cc.sukazyo.cono.morny.test.extra.twitter
|
||||
|
||||
import cc.sukazyo.cono.morny.data.twitter.{parseTweetUrl, TweetUrlInformation}
|
||||
import cc.sukazyo.cono.morny.extra.twitter.{parseTweetUrl, TweetUrlInformation}
|
||||
import cc.sukazyo.cono.morny.test.MornyTests
|
||||
|
||||
class PackageTest extends MornyTests {
|
Loading…
Reference in New Issue
Block a user