mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-12 18:28:27 -04:00
Killed history
This commit is contained in:
@@ -0,0 +1,114 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace NadekoBot.Core.Modules.Searches.Common
|
||||
{
|
||||
public class PicartoChannelResponse
|
||||
{
|
||||
[JsonProperty("user_id")] public int UserId { get; set; }
|
||||
|
||||
[JsonProperty("name")] public string Name { get; set; }
|
||||
|
||||
[JsonProperty("avatar")] public string Avatar { get; set; }
|
||||
|
||||
[JsonProperty("online")] public bool Online { get; set; }
|
||||
|
||||
[JsonProperty("viewers")] public int Viewers { get; set; }
|
||||
|
||||
[JsonProperty("viewers_total")] public int ViewersTotal { get; set; }
|
||||
|
||||
[JsonProperty("thumbnails")] public Thumbnails Thumbnails { get; set; }
|
||||
|
||||
[JsonProperty("followers")] public int Followers { get; set; }
|
||||
|
||||
[JsonProperty("subscribers")] public int Subscribers { get; set; }
|
||||
|
||||
[JsonProperty("adult")] public bool Adult { get; set; }
|
||||
|
||||
[JsonProperty("category")] public string Category { get; set; }
|
||||
|
||||
[JsonProperty("account_type")] public string AccountType { get; set; }
|
||||
|
||||
[JsonProperty("commissions")] public bool Commissions { get; set; }
|
||||
|
||||
[JsonProperty("recordings")] public bool Recordings { get; set; }
|
||||
|
||||
[JsonProperty("title")] public string Title { get; set; }
|
||||
|
||||
[JsonProperty("description_panels")] public List<DescriptionPanel> DescriptionPanels { get; set; }
|
||||
|
||||
[JsonProperty("private")] public bool Private { get; set; }
|
||||
|
||||
[JsonProperty("private_message")] public string PrivateMessage { get; set; }
|
||||
|
||||
[JsonProperty("gaming")] public bool Gaming { get; set; }
|
||||
|
||||
[JsonProperty("chat_settings")] public ChatSettings ChatSettings { get; set; }
|
||||
|
||||
[JsonProperty("last_live")] public DateTime LastLive { get; set; }
|
||||
|
||||
[JsonProperty("tags")] public List<string> Tags { get; set; }
|
||||
|
||||
[JsonProperty("multistream")] public List<Multistream> Multistream { get; set; }
|
||||
|
||||
[JsonProperty("languages")] public List<Language> Languages { get; set; }
|
||||
|
||||
[JsonProperty("following")] public bool Following { get; set; }
|
||||
}
|
||||
public class Thumbnails
|
||||
{
|
||||
[JsonProperty("web")] public string Web { get; set; }
|
||||
|
||||
[JsonProperty("web_large")] public string WebLarge { get; set; }
|
||||
|
||||
[JsonProperty("mobile")] public string Mobile { get; set; }
|
||||
|
||||
[JsonProperty("tablet")] public string Tablet { get; set; }
|
||||
}
|
||||
|
||||
public class DescriptionPanel
|
||||
{
|
||||
[JsonProperty("title")] public string Title { get; set; }
|
||||
|
||||
[JsonProperty("body")] public string Body { get; set; }
|
||||
|
||||
[JsonProperty("image")] public string Image { get; set; }
|
||||
|
||||
[JsonProperty("image_link")] public string ImageLink { get; set; }
|
||||
|
||||
[JsonProperty("button_text")] public string ButtonText { get; set; }
|
||||
|
||||
[JsonProperty("button_link")] public string ButtonLink { get; set; }
|
||||
|
||||
[JsonProperty("position")] public int Position { get; set; }
|
||||
}
|
||||
|
||||
public class ChatSettings
|
||||
{
|
||||
[JsonProperty("guest_chat")] public bool GuestChat { get; set; }
|
||||
|
||||
[JsonProperty("links")] public bool Links { get; set; }
|
||||
|
||||
[JsonProperty("level")] public int Level { get; set; }
|
||||
}
|
||||
|
||||
public class Multistream
|
||||
{
|
||||
[JsonProperty("user_id")] public int UserId { get; set; }
|
||||
|
||||
[JsonProperty("name")] public string Name { get; set; }
|
||||
|
||||
[JsonProperty("online")] public bool Online { get; set; }
|
||||
|
||||
[JsonProperty("adult")] public bool Adult { get; set; }
|
||||
}
|
||||
|
||||
public class Language
|
||||
{
|
||||
[JsonProperty("id")] public int Id { get; set; }
|
||||
|
||||
[JsonProperty("name")] public string Name { get; set; }
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,20 @@
|
||||
using NadekoBot.Core.Services.Database.Models;
|
||||
|
||||
namespace NadekoBot.Core.Modules.Searches.Common
|
||||
{
|
||||
public class StreamData
|
||||
{
|
||||
public FollowedStream.FType StreamType { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string UniqueName { get; set; }
|
||||
public int Viewers { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string Game { get; set; }
|
||||
public string Preview { get; set; }
|
||||
public bool IsLive { get; set; }
|
||||
public string StreamUrl { get; set; }
|
||||
public string AvatarUrl { get; set; }
|
||||
|
||||
public StreamDataKey CreateKey() => new StreamDataKey(StreamType, UniqueName.ToLower());
|
||||
}
|
||||
}
|
@@ -0,0 +1,16 @@
|
||||
using NadekoBot.Core.Services.Database.Models;
|
||||
|
||||
namespace NadekoBot.Core.Modules.Searches.Common
|
||||
{
|
||||
public readonly struct StreamDataKey
|
||||
{
|
||||
public FollowedStream.FType Type { get; }
|
||||
public string Name { get; }
|
||||
|
||||
public StreamDataKey(FollowedStream.FType type, string name)
|
||||
{
|
||||
Type = type;
|
||||
Name = name;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
namespace NadekoBot.Core.Modules.Searches.Common
|
||||
{
|
||||
//
|
||||
// public class TwitchResponse
|
||||
// {
|
||||
// public List<StreamApiData> Data { get; set; }
|
||||
//
|
||||
// public class StreamApiData
|
||||
// {
|
||||
// public string Id { get; set; }
|
||||
// public string UserId { get; set; }
|
||||
// public string UserName { get; set; }
|
||||
// public string GameId { get; set; }
|
||||
// public string Type { get; set; }
|
||||
// public string Title { get; set; }
|
||||
// public int ViewerCount { get; set; }
|
||||
// public string Language { get; set; }
|
||||
// public string ThumbnailUrl { get; set; }
|
||||
// public DateTime StartedAt { get; set; }
|
||||
// }
|
||||
// }
|
||||
}
|
@@ -0,0 +1,85 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace NadekoBot.Core.Modules.Searches.Common
|
||||
{
|
||||
public class TwitchResponseV5
|
||||
{
|
||||
public List<Stream> Streams { get; set; }
|
||||
|
||||
public class Channel
|
||||
{
|
||||
[JsonProperty("_id")] public int Id { get; set; }
|
||||
|
||||
[JsonProperty("broadcaster_language")] public string BroadcasterLanguage { get; set; }
|
||||
|
||||
[JsonProperty("created_at")] public DateTime CreatedAt { get; set; }
|
||||
|
||||
[JsonProperty("display_name")] public string DisplayName { get; set; }
|
||||
|
||||
[JsonProperty("followers")] public int Followers { get; set; }
|
||||
|
||||
[JsonProperty("game")] public string Game { get; set; }
|
||||
|
||||
[JsonProperty("language")] public string Language { get; set; }
|
||||
|
||||
[JsonProperty("logo")] public string Logo { get; set; }
|
||||
|
||||
[JsonProperty("mature")] public bool Mature { get; set; }
|
||||
|
||||
[JsonProperty("name")] public string Name { get; set; }
|
||||
|
||||
[JsonProperty("partner")] public bool Partner { get; set; }
|
||||
|
||||
[JsonProperty("profile_banner")] public string ProfileBanner { get; set; }
|
||||
|
||||
[JsonProperty("profile_banner_background_color")]
|
||||
public object ProfileBannerBackgroundColor { get; set; }
|
||||
|
||||
[JsonProperty("status")] public string Status { get; set; }
|
||||
|
||||
[JsonProperty("updated_at")] public DateTime UpdatedAt { get; set; }
|
||||
|
||||
[JsonProperty("url")] public string Url { get; set; }
|
||||
|
||||
[JsonProperty("video_banner")] public string VideoBanner { get; set; }
|
||||
|
||||
[JsonProperty("views")] public int Views { get; set; }
|
||||
}
|
||||
|
||||
public class Preview
|
||||
{
|
||||
[JsonProperty("large")] public string Large { get; set; }
|
||||
|
||||
[JsonProperty("medium")] public string Medium { get; set; }
|
||||
|
||||
[JsonProperty("small")] public string Small { get; set; }
|
||||
|
||||
[JsonProperty("template")] public string Template { get; set; }
|
||||
}
|
||||
|
||||
public class Stream
|
||||
{
|
||||
[JsonProperty("_id")] public long Id { get; set; }
|
||||
|
||||
[JsonProperty("average_fps")] public double AverageFps { get; set; }
|
||||
|
||||
[JsonProperty("channel")] public Channel Channel { get; set; }
|
||||
|
||||
[JsonProperty("created_at")] public DateTime CreatedAt { get; set; }
|
||||
|
||||
[JsonProperty("delay")] public double Delay { get; set; }
|
||||
|
||||
[JsonProperty("game")] public string Game { get; set; }
|
||||
|
||||
[JsonProperty("is_playlist")] public bool IsPlaylist { get; set; }
|
||||
|
||||
[JsonProperty("preview")] public Preview Preview { get; set; }
|
||||
|
||||
[JsonProperty("video_height")] public int VideoHeight { get; set; }
|
||||
|
||||
[JsonProperty("viewers")] public int Viewers { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,39 @@
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace NadekoBot.Core.Modules.Searches.Common
|
||||
{
|
||||
public class TwitchUsersResponseV5
|
||||
{
|
||||
[JsonProperty("users")] public List<User> Users { get; set; }
|
||||
|
||||
public class User
|
||||
{
|
||||
|
||||
[JsonProperty("_id")]
|
||||
public string Id { get; set; }
|
||||
|
||||
// [JsonProperty("bio")]
|
||||
// public string Bio { get; set; }
|
||||
//
|
||||
// [JsonProperty("created_at")]
|
||||
// public DateTime CreatedAt { get; set; }
|
||||
//
|
||||
// [JsonProperty("display_name")]
|
||||
// public string DisplayName { get; set; }
|
||||
//
|
||||
// [JsonProperty("logo")]
|
||||
// public string Logo { get; set; }
|
||||
//
|
||||
// [JsonProperty("name")]
|
||||
// public string Name { get; set; }
|
||||
//
|
||||
// [JsonProperty("type")]
|
||||
// public string Type { get; set; }
|
||||
//
|
||||
// [JsonProperty("updated_at")]
|
||||
// public DateTime UpdatedAt { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user