mirror of https://github.com/leiurayer/downkyi
parent
8d15ce4018
commit
1ca966f617
@ -1,10 +0,0 @@
|
||||
namespace Avalonia.Gif.Decoding
|
||||
{
|
||||
internal enum BlockTypes
|
||||
{
|
||||
Empty = 0,
|
||||
Extension = 0x21,
|
||||
ImageDescriptor = 0x2C,
|
||||
Trailer = 0x3B,
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
namespace Avalonia.Gif.Decoding
|
||||
{
|
||||
internal enum ExtensionType
|
||||
{
|
||||
GraphicsControl = 0xF9,
|
||||
Application = 0xFF
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
namespace Avalonia.Gif.Decoding
|
||||
{
|
||||
public enum FrameDisposal
|
||||
{
|
||||
Unknown = 0,
|
||||
Leave = 1,
|
||||
Background = 2,
|
||||
Restore = 3
|
||||
}
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Avalonia.Gif
|
||||
{
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
public readonly struct GifColor
|
||||
{
|
||||
[FieldOffset(3)]
|
||||
public readonly byte A;
|
||||
|
||||
[FieldOffset(2)]
|
||||
public readonly byte R;
|
||||
|
||||
[FieldOffset(1)]
|
||||
public readonly byte G;
|
||||
|
||||
[FieldOffset(0)]
|
||||
public readonly byte B;
|
||||
|
||||
/// <summary>
|
||||
/// A struct that represents a ARGB color and is aligned as
|
||||
/// a BGRA bytefield in memory.
|
||||
/// </summary>
|
||||
/// <param name="r">Red</param>
|
||||
/// <param name="g">Green</param>
|
||||
/// <param name="b">Blue</param>
|
||||
/// <param name="a">Alpha</param>
|
||||
public GifColor(byte r, byte g, byte b, byte a = byte.MaxValue)
|
||||
{
|
||||
A = a;
|
||||
R = r;
|
||||
G = g;
|
||||
B = b;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,657 +0,0 @@
|
||||
// This source file's Lempel-Ziv-Welch algorithm is derived from Chromium's Android GifPlayer
|
||||
// as seen here (https://github.com/chromium/chromium/blob/master/third_party/gif_player/src/jp/tomorrowkey/android/gifplayer)
|
||||
// Licensed under the Apache License, Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0)
|
||||
// Copyright (C) 2015 The Gifplayer Authors. All Rights Reserved.
|
||||
|
||||
// The rest of the source file is licensed under MIT License.
|
||||
// Copyright (C) 2018 Jumar A. Macato, All Rights Reserved.
|
||||
|
||||
using Avalonia.Media.Imaging;
|
||||
using System;
|
||||
using System.Buffers;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using static Avalonia.Gif.Extensions.StreamExtensions;
|
||||
|
||||
namespace Avalonia.Gif.Decoding
|
||||
{
|
||||
public sealed class GifDecoder : IDisposable
|
||||
{
|
||||
private static readonly ReadOnlyMemory<byte> G87AMagic
|
||||
= "GIF87a"u8.ToArray().AsMemory();
|
||||
|
||||
private static readonly ReadOnlyMemory<byte> G89AMagic
|
||||
= "GIF89a"u8.ToArray().AsMemory();
|
||||
|
||||
private static readonly ReadOnlyMemory<byte> NetscapeMagic
|
||||
= "NETSCAPE2.0"u8.ToArray().AsMemory();
|
||||
|
||||
private static readonly TimeSpan FrameDelayThreshold = TimeSpan.FromMilliseconds(10);
|
||||
private static readonly TimeSpan FrameDelayDefault = TimeSpan.FromMilliseconds(100);
|
||||
private static readonly GifColor TransparentColor = new(0, 0, 0, 0);
|
||||
private static readonly int MaxTempBuf = 768;
|
||||
private static readonly int MaxStackSize = 4096;
|
||||
private static readonly int MaxBits = 4097;
|
||||
|
||||
private readonly Stream _fileStream;
|
||||
private readonly CancellationToken _currentCtsToken;
|
||||
private readonly bool _hasFrameBackups;
|
||||
|
||||
private int _gctSize, _bgIndex, _prevFrame = -1, _backupFrame = -1;
|
||||
private bool _gctUsed;
|
||||
|
||||
private GifRect _gifDimensions;
|
||||
|
||||
// private ulong _globalColorTable;
|
||||
private readonly int _backBufferBytes;
|
||||
private GifColor[] _bitmapBackBuffer;
|
||||
|
||||
private short[] _prefixBuf;
|
||||
private byte[] _suffixBuf;
|
||||
private byte[] _pixelStack;
|
||||
private byte[] _indexBuf;
|
||||
private byte[] _backupFrameIndexBuf;
|
||||
private volatile bool _hasNewFrame;
|
||||
|
||||
public GifHeader Header { get; private set; }
|
||||
|
||||
public readonly List<GifFrame> Frames = new();
|
||||
|
||||
public PixelSize Size => new PixelSize(Header.Dimensions.Width, Header.Dimensions.Height);
|
||||
|
||||
public GifDecoder(Stream fileStream, CancellationToken currentCtsToken)
|
||||
{
|
||||
_fileStream = fileStream;
|
||||
_currentCtsToken = currentCtsToken;
|
||||
|
||||
ProcessHeaderData();
|
||||
ProcessFrameData();
|
||||
|
||||
Header.IterationCount = Header.Iterations switch
|
||||
{
|
||||
-1 => new GifRepeatBehavior { Count = 1 },
|
||||
0 => new GifRepeatBehavior { LoopForever = true },
|
||||
> 0 => new GifRepeatBehavior { Count = Header.Iterations },
|
||||
_ => Header.IterationCount
|
||||
};
|
||||
|
||||
var pixelCount = _gifDimensions.TotalPixels;
|
||||
|
||||
_hasFrameBackups = Frames
|
||||
.Any(f => f.FrameDisposalMethod == FrameDisposal.Restore);
|
||||
|
||||
_bitmapBackBuffer = new GifColor[pixelCount];
|
||||
_indexBuf = new byte[pixelCount];
|
||||
|
||||
if (_hasFrameBackups)
|
||||
_backupFrameIndexBuf = new byte[pixelCount];
|
||||
|
||||
_prefixBuf = new short[MaxStackSize];
|
||||
_suffixBuf = new byte[MaxStackSize];
|
||||
_pixelStack = new byte[MaxStackSize + 1];
|
||||
|
||||
_backBufferBytes = pixelCount * Marshal.SizeOf(typeof(GifColor));
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Frames.Clear();
|
||||
|
||||
_bitmapBackBuffer = null;
|
||||
_prefixBuf = null;
|
||||
_suffixBuf = null;
|
||||
_pixelStack = null;
|
||||
_indexBuf = null;
|
||||
_backupFrameIndexBuf = null;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
private int PixCoord(int x, int y) => x + y * _gifDimensions.Width;
|
||||
|
||||
static readonly (int Start, int Step)[] Pass =
|
||||
{
|
||||
(0, 8),
|
||||
(4, 8),
|
||||
(2, 4),
|
||||
(1, 2)
|
||||
};
|
||||
|
||||
private void ClearImage()
|
||||
{
|
||||
Array.Fill(_bitmapBackBuffer, TransparentColor);
|
||||
//ClearArea(_gifDimensions);
|
||||
|
||||
_prevFrame = -1;
|
||||
_backupFrame = -1;
|
||||
}
|
||||
|
||||
public void RenderFrame(int fIndex, WriteableBitmap writeableBitmap, bool forceClear = false)
|
||||
{
|
||||
if (_currentCtsToken.IsCancellationRequested)
|
||||
return;
|
||||
|
||||
if (fIndex < 0 | fIndex >= Frames.Count)
|
||||
return;
|
||||
|
||||
if (_prevFrame == fIndex)
|
||||
return;
|
||||
|
||||
if (fIndex == 0 || forceClear || fIndex < _prevFrame)
|
||||
ClearImage();
|
||||
|
||||
DisposePreviousFrame();
|
||||
|
||||
_prevFrame++;
|
||||
|
||||
// render intermediate frame
|
||||
for (int idx = _prevFrame; idx < fIndex; ++idx)
|
||||
{
|
||||
var prevFrame = Frames[idx];
|
||||
|
||||
if (prevFrame.FrameDisposalMethod == FrameDisposal.Restore)
|
||||
continue;
|
||||
|
||||
if (prevFrame.FrameDisposalMethod == FrameDisposal.Background)
|
||||
{
|
||||
ClearArea(prevFrame.Dimensions);
|
||||
continue;
|
||||
}
|
||||
|
||||
RenderFrameAt(idx, writeableBitmap);
|
||||
}
|
||||
|
||||
RenderFrameAt(fIndex, writeableBitmap);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
private void RenderFrameAt(int idx, WriteableBitmap writeableBitmap)
|
||||
{
|
||||
var tmpB = ArrayPool<byte>.Shared.Rent(MaxTempBuf);
|
||||
|
||||
var curFrame = Frames[idx];
|
||||
DecompressFrameToIndexBuffer(curFrame, _indexBuf, tmpB);
|
||||
|
||||
if (_hasFrameBackups & curFrame.ShouldBackup)
|
||||
{
|
||||
Buffer.BlockCopy(_indexBuf, 0, _backupFrameIndexBuf, 0, curFrame.Dimensions.TotalPixels);
|
||||
_backupFrame = idx;
|
||||
}
|
||||
|
||||
DrawFrame(curFrame, _indexBuf);
|
||||
|
||||
_prevFrame = idx;
|
||||
_hasNewFrame = true;
|
||||
|
||||
using var lockedBitmap = writeableBitmap.Lock();
|
||||
WriteBackBufToFb(lockedBitmap.Address);
|
||||
|
||||
ArrayPool<byte>.Shared.Return(tmpB);
|
||||
}
|
||||
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
private void DrawFrame(GifFrame curFrame, Memory<byte> frameIndexSpan)
|
||||
{
|
||||
var activeColorTable =
|
||||
curFrame.IsLocalColorTableUsed ? curFrame.LocalColorTable : Header.GlobarColorTable;
|
||||
|
||||
var cX = curFrame.Dimensions.X;
|
||||
var cY = curFrame.Dimensions.Y;
|
||||
var cH = curFrame.Dimensions.Height;
|
||||
var cW = curFrame.Dimensions.Width;
|
||||
var tC = curFrame.TransparentColorIndex;
|
||||
var hT = curFrame.HasTransparency;
|
||||
|
||||
if (curFrame.IsInterlaced)
|
||||
{
|
||||
for (var i = 0; i < 4; i++)
|
||||
{
|
||||
var curPass = Pass[i];
|
||||
var y = curPass.Start;
|
||||
while (y < cH)
|
||||
{
|
||||
DrawRow(y);
|
||||
y += curPass.Step;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (var i = 0; i < cH; i++)
|
||||
DrawRow(i);
|
||||
}
|
||||
|
||||
//for (var row = 0; row < cH; row++)
|
||||
void DrawRow(int row)
|
||||
{
|
||||
// Get the starting point of the current row on frame's index stream.
|
||||
var indexOffset = row * cW;
|
||||
|
||||
// Get the target backbuffer offset from the frames coords.
|
||||
var targetOffset = PixCoord(cX, row + cY);
|
||||
var len = _bitmapBackBuffer.Length;
|
||||
|
||||
for (var i = 0; i < cW; i++)
|
||||
{
|
||||
var indexColor = frameIndexSpan.Span[indexOffset + i];
|
||||
|
||||
if (activeColorTable == null || targetOffset >= len ||
|
||||
indexColor > activeColorTable.Length) return;
|
||||
|
||||
if (!(hT & indexColor == tC))
|
||||
_bitmapBackBuffer[targetOffset] = activeColorTable[indexColor];
|
||||
|
||||
targetOffset++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
private void DisposePreviousFrame()
|
||||
{
|
||||
if (_prevFrame == -1)
|
||||
return;
|
||||
|
||||
var prevFrame = Frames[_prevFrame];
|
||||
|
||||
switch (prevFrame.FrameDisposalMethod)
|
||||
{
|
||||
case FrameDisposal.Background:
|
||||
ClearArea(prevFrame.Dimensions);
|
||||
break;
|
||||
case FrameDisposal.Restore:
|
||||
if (_hasFrameBackups && _backupFrame != -1)
|
||||
DrawFrame(Frames[_backupFrame], _backupFrameIndexBuf);
|
||||
else
|
||||
ClearArea(prevFrame.Dimensions);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
private void ClearArea(GifRect area)
|
||||
{
|
||||
for (var y = 0; y < area.Height; y++)
|
||||
{
|
||||
var targetOffset = PixCoord(area.X, y + area.Y);
|
||||
for (var x = 0; x < area.Width; x++)
|
||||
_bitmapBackBuffer[targetOffset + x] = TransparentColor;
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
private void DecompressFrameToIndexBuffer(GifFrame curFrame, Span<byte> indexSpan, byte[] tempBuf)
|
||||
{
|
||||
_fileStream.Position = curFrame.LzwStreamPosition;
|
||||
var totalPixels = curFrame.Dimensions.TotalPixels;
|
||||
|
||||
// Initialize GIF data stream decoder.
|
||||
var dataSize = curFrame.LzwMinCodeSize;
|
||||
var clear = 1 << dataSize;
|
||||
var endOfInformation = clear + 1;
|
||||
var available = clear + 2;
|
||||
var oldCode = -1;
|
||||
var codeSize = dataSize + 1;
|
||||
var codeMask = (1 << codeSize) - 1;
|
||||
|
||||
for (var code = 0; code < clear; code++)
|
||||
{
|
||||
_prefixBuf[code] = 0;
|
||||
_suffixBuf[code] = (byte)code;
|
||||
}
|
||||
|
||||
// Decode GIF pixel stream.
|
||||
int bits, first, top, pixelIndex;
|
||||
var datum = bits = first = top = pixelIndex = 0;
|
||||
|
||||
while (pixelIndex < totalPixels)
|
||||
{
|
||||
var blockSize = _fileStream.ReadBlock(tempBuf);
|
||||
|
||||
if (blockSize == 0)
|
||||
break;
|
||||
|
||||
var blockPos = 0;
|
||||
|
||||
while (blockPos < blockSize)
|
||||
{
|
||||
datum += tempBuf[blockPos] << bits;
|
||||
blockPos++;
|
||||
|
||||
bits += 8;
|
||||
|
||||
while (bits >= codeSize)
|
||||
{
|
||||
// Get the next code.
|
||||
var code = datum & codeMask;
|
||||
datum >>= codeSize;
|
||||
bits -= codeSize;
|
||||
|
||||
// Interpret the code
|
||||
if (code == clear)
|
||||
{
|
||||
// Reset decoder.
|
||||
codeSize = dataSize + 1;
|
||||
codeMask = (1 << codeSize) - 1;
|
||||
available = clear + 2;
|
||||
oldCode = -1;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Check for explicit end-of-stream
|
||||
if (code == endOfInformation)
|
||||
return;
|
||||
|
||||
if (oldCode == -1)
|
||||
{
|
||||
indexSpan[pixelIndex++] = _suffixBuf[code];
|
||||
oldCode = code;
|
||||
first = code;
|
||||
continue;
|
||||
}
|
||||
|
||||
var inCode = code;
|
||||
if (code >= available)
|
||||
{
|
||||
_pixelStack[top++] = (byte)first;
|
||||
code = oldCode;
|
||||
|
||||
if (top == MaxBits)
|
||||
ThrowException();
|
||||
}
|
||||
|
||||
while (code >= clear)
|
||||
{
|
||||
if (code >= MaxBits || code == _prefixBuf[code])
|
||||
ThrowException();
|
||||
|
||||
_pixelStack[top++] = _suffixBuf[code];
|
||||
code = _prefixBuf[code];
|
||||
|
||||
if (top == MaxBits)
|
||||
ThrowException();
|
||||
}
|
||||
|
||||
first = _suffixBuf[code];
|
||||
_pixelStack[top++] = (byte)first;
|
||||
|
||||
// Add new code to the dictionary
|
||||
if (available < MaxStackSize)
|
||||
{
|
||||
_prefixBuf[available] = (short)oldCode;
|
||||
_suffixBuf[available] = (byte)first;
|
||||
available++;
|
||||
|
||||
if ((available & codeMask) == 0 && available < MaxStackSize)
|
||||
{
|
||||
codeSize++;
|
||||
codeMask += available;
|
||||
}
|
||||
}
|
||||
|
||||
oldCode = inCode;
|
||||
|
||||
// Drain the pixel stack.
|
||||
do
|
||||
{
|
||||
indexSpan[pixelIndex++] = _pixelStack[--top];
|
||||
} while (top > 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
while (pixelIndex < totalPixels)
|
||||
indexSpan[pixelIndex++] = 0; // clear missing pixels
|
||||
|
||||
void ThrowException() => throw new LzwDecompressionException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Directly copies the <see cref="GifColor"/> struct array to a bitmap IntPtr.
|
||||
/// </summary>
|
||||
private void WriteBackBufToFb(IntPtr targetPointer)
|
||||
{
|
||||
if (_currentCtsToken.IsCancellationRequested)
|
||||
return;
|
||||
|
||||
if (!(_hasNewFrame & _bitmapBackBuffer != null)) return;
|
||||
|
||||
unsafe
|
||||
{
|
||||
fixed (void* src = &_bitmapBackBuffer[0])
|
||||
Buffer.MemoryCopy(src, targetPointer.ToPointer(), (uint)_backBufferBytes,
|
||||
(uint)_backBufferBytes);
|
||||
_hasNewFrame = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes GIF Header.
|
||||
/// </summary>
|
||||
private void ProcessHeaderData()
|
||||
{
|
||||
var str = _fileStream;
|
||||
var tmpB = ArrayPool<byte>.Shared.Rent(MaxTempBuf);
|
||||
var tempBuf = tmpB.AsSpan();
|
||||
|
||||
var _ = str.Read(tmpB, 0, 6);
|
||||
|
||||
if (!tempBuf[..3].SequenceEqual(G87AMagic[..3].Span))
|
||||
throw new InvalidGifStreamException("Not a GIF stream.");
|
||||
|
||||
if (!(tempBuf[..6].SequenceEqual(G87AMagic.Span) |
|
||||
tempBuf[..6].SequenceEqual(G89AMagic.Span)))
|
||||
throw new InvalidGifStreamException("Unsupported GIF Version: " +
|
||||
Encoding.ASCII.GetString(tempBuf[..6].ToArray()));
|
||||
|
||||
ProcessScreenDescriptor(tmpB);
|
||||
|
||||
Header = new GifHeader
|
||||
{
|
||||
Dimensions = _gifDimensions,
|
||||
HasGlobalColorTable = _gctUsed,
|
||||
// GlobalColorTableCacheID = _globalColorTable,
|
||||
GlobarColorTable = ProcessColorTable(ref str, tmpB, _gctSize),
|
||||
GlobalColorTableSize = _gctSize,
|
||||
BackgroundColorIndex = _bgIndex,
|
||||
HeaderSize = _fileStream.Position
|
||||
};
|
||||
|
||||
ArrayPool<byte>.Shared.Return(tmpB);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parses colors from file stream to target color table.
|
||||
/// </summary>
|
||||
private static GifColor[] ProcessColorTable(ref Stream stream, byte[] rawBufSpan, int nColors)
|
||||
{
|
||||
var nBytes = 3 * nColors;
|
||||
var target = new GifColor[nColors];
|
||||
|
||||
var n = stream.Read(rawBufSpan, 0, nBytes);
|
||||
|
||||
if (n < nBytes)
|
||||
throw new InvalidOperationException("Wrong color table bytes.");
|
||||
|
||||
int i = 0, j = 0;
|
||||
|
||||
while (i < nColors)
|
||||
{
|
||||
var r = rawBufSpan[j++];
|
||||
var g = rawBufSpan[j++];
|
||||
var b = rawBufSpan[j++];
|
||||
target[i++] = new GifColor(r, g, b);
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parses screen and other GIF descriptors.
|
||||
/// </summary>
|
||||
private void ProcessScreenDescriptor(byte[] tempBuf)
|
||||
{
|
||||
var width = _fileStream.ReadUShortS(tempBuf);
|
||||
var height = _fileStream.ReadUShortS(tempBuf);
|
||||
|
||||
var packed = _fileStream.ReadByteS(tempBuf);
|
||||
|
||||
_gctUsed = (packed & 0x80) != 0;
|
||||
_gctSize = 2 << (packed & 7);
|
||||
_bgIndex = _fileStream.ReadByteS(tempBuf);
|
||||
|
||||
_gifDimensions = new GifRect(0, 0, width, height);
|
||||
_fileStream.Skip(1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parses all frame data.
|
||||
/// </summary>
|
||||
private void ProcessFrameData()
|
||||
{
|
||||
_fileStream.Position = Header.HeaderSize;
|
||||
|
||||
var tempBuf = ArrayPool<byte>.Shared.Rent(MaxTempBuf);
|
||||
|
||||
var terminate = false;
|
||||
var curFrame = 0;
|
||||
|
||||
Frames.Add(new GifFrame());
|
||||
|
||||
do
|
||||
{
|
||||
var blockType = (BlockTypes)_fileStream.ReadByteS(tempBuf);
|
||||
|
||||
switch (blockType)
|
||||
{
|
||||
case BlockTypes.Empty:
|
||||
break;
|
||||
|
||||
case BlockTypes.Extension:
|
||||
ProcessExtensions(ref curFrame, tempBuf);
|
||||
break;
|
||||
|
||||
case BlockTypes.ImageDescriptor:
|
||||
ProcessImageDescriptor(ref curFrame, tempBuf);
|
||||
_fileStream.SkipBlocks(tempBuf);
|
||||
break;
|
||||
|
||||
case BlockTypes.Trailer:
|
||||
Frames.RemoveAt(Frames.Count - 1);
|
||||
terminate = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
_fileStream.SkipBlocks(tempBuf);
|
||||
break;
|
||||
}
|
||||
|
||||
// Break the loop when the stream is not valid anymore.
|
||||
if (_fileStream.Position >= _fileStream.Length & terminate == false)
|
||||
throw new InvalidProgramException("Reach the end of the filestream without trailer block.");
|
||||
} while (!terminate);
|
||||
|
||||
ArrayPool<byte>.Shared.Return(tempBuf);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parses GIF Image Descriptor Block.
|
||||
/// </summary>
|
||||
private void ProcessImageDescriptor(ref int curFrame, byte[] tempBuf)
|
||||
{
|
||||
var str = _fileStream;
|
||||
var currentFrame = Frames[curFrame];
|
||||
|
||||
// Parse frame dimensions.
|
||||
var frameX = str.ReadUShortS(tempBuf);
|
||||
var frameY = str.ReadUShortS(tempBuf);
|
||||
var frameW = str.ReadUShortS(tempBuf);
|
||||
var frameH = str.ReadUShortS(tempBuf);
|
||||
|
||||
frameW = (ushort)Math.Min(frameW, _gifDimensions.Width - frameX);
|
||||
frameH = (ushort)Math.Min(frameH, _gifDimensions.Height - frameY);
|
||||
|
||||
currentFrame.Dimensions = new GifRect(frameX, frameY, frameW, frameH);
|
||||
|
||||
// Unpack interlace and lct info.
|
||||
var packed = str.ReadByteS(tempBuf);
|
||||
currentFrame.IsInterlaced = (packed & 0x40) != 0;
|
||||
currentFrame.IsLocalColorTableUsed = (packed & 0x80) != 0;
|
||||
currentFrame.LocalColorTableSize = (int)Math.Pow(2, (packed & 0x07) + 1);
|
||||
|
||||
if (currentFrame.IsLocalColorTableUsed)
|
||||
currentFrame.LocalColorTable =
|
||||
ProcessColorTable(ref str, tempBuf, currentFrame.LocalColorTableSize);
|
||||
|
||||
currentFrame.LzwMinCodeSize = str.ReadByteS(tempBuf);
|
||||
currentFrame.LzwStreamPosition = str.Position;
|
||||
|
||||
curFrame += 1;
|
||||
Frames.Add(new GifFrame());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parses GIF Extension Blocks.
|
||||
/// </summary>
|
||||
private void ProcessExtensions(ref int curFrame, byte[] tempBuf)
|
||||
{
|
||||
var extType = (ExtensionType)_fileStream.ReadByteS(tempBuf);
|
||||
|
||||
switch (extType)
|
||||
{
|
||||
case ExtensionType.GraphicsControl:
|
||||
|
||||
_fileStream.ReadBlock(tempBuf);
|
||||
var currentFrame = Frames[curFrame];
|
||||
var packed = tempBuf[0];
|
||||
|
||||
currentFrame.FrameDisposalMethod = (FrameDisposal)((packed & 0x1c) >> 2);
|
||||
|
||||
if (currentFrame.FrameDisposalMethod != FrameDisposal.Restore
|
||||
&& currentFrame.FrameDisposalMethod != FrameDisposal.Background)
|
||||
currentFrame.ShouldBackup = true;
|
||||
|
||||
currentFrame.HasTransparency = (packed & 1) != 0;
|
||||
|
||||
currentFrame.FrameDelay =
|
||||
TimeSpan.FromMilliseconds(SpanToShort(tempBuf.AsSpan(1)) * 10);
|
||||
|
||||
if (currentFrame.FrameDelay <= FrameDelayThreshold)
|
||||
currentFrame.FrameDelay = FrameDelayDefault;
|
||||
|
||||
currentFrame.TransparentColorIndex = tempBuf[3];
|
||||
break;
|
||||
|
||||
case ExtensionType.Application:
|
||||
var blockLen = _fileStream.ReadBlock(tempBuf);
|
||||
var _ = tempBuf.AsSpan(0, blockLen);
|
||||
var blockHeader = tempBuf.AsSpan(0, NetscapeMagic.Length);
|
||||
|
||||
if (blockHeader.SequenceEqual(NetscapeMagic.Span))
|
||||
{
|
||||
var count = 1;
|
||||
|
||||
while (count > 0)
|
||||
count = _fileStream.ReadBlock(tempBuf);
|
||||
|
||||
var iterationCount = SpanToShort(tempBuf.AsSpan(1));
|
||||
|
||||
Header.Iterations = iterationCount;
|
||||
}
|
||||
else
|
||||
_fileStream.SkipBlocks(tempBuf);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
_fileStream.SkipBlocks(tempBuf);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Avalonia.Gif.Decoding
|
||||
{
|
||||
public class GifFrame
|
||||
{
|
||||
public bool HasTransparency, IsInterlaced, IsLocalColorTableUsed;
|
||||
public byte TransparentColorIndex;
|
||||
public int LzwMinCodeSize, LocalColorTableSize;
|
||||
public long LzwStreamPosition;
|
||||
public TimeSpan FrameDelay;
|
||||
public FrameDisposal FrameDisposalMethod;
|
||||
public bool ShouldBackup;
|
||||
public GifRect Dimensions;
|
||||
public GifColor[] LocalColorTable;
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
// Licensed under the MIT License.
|
||||
// Copyright (C) 2018 Jumar A. Macato, All Rights Reserved.
|
||||
|
||||
namespace Avalonia.Gif.Decoding
|
||||
{
|
||||
public class GifHeader
|
||||
{
|
||||
public bool HasGlobalColorTable;
|
||||
public int GlobalColorTableSize;
|
||||
public ulong GlobalColorTableCacheId;
|
||||
public int BackgroundColorIndex;
|
||||
public long HeaderSize;
|
||||
internal int Iterations = -1;
|
||||
public GifRepeatBehavior IterationCount;
|
||||
public GifRect Dimensions;
|
||||
private GifColor[] _globarColorTable;
|
||||
public GifColor[] GlobarColorTable;
|
||||
}
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
namespace Avalonia.Gif.Decoding
|
||||
{
|
||||
public readonly struct GifRect
|
||||
{
|
||||
public int X { get; }
|
||||
public int Y { get; }
|
||||
public int Width { get; }
|
||||
public int Height { get; }
|
||||
public int TotalPixels { get; }
|
||||
|
||||
public GifRect(int x, int y, int width, int height)
|
||||
{
|
||||
X = x;
|
||||
Y = y;
|
||||
Width = width;
|
||||
Height = height;
|
||||
TotalPixels = width * height;
|
||||
}
|
||||
|
||||
public static bool operator ==(GifRect a, GifRect b)
|
||||
{
|
||||
return a.X == b.X &&
|
||||
a.Y == b.Y &&
|
||||
a.Width == b.Width &&
|
||||
a.Height == b.Height;
|
||||
}
|
||||
public static bool operator !=(GifRect a, GifRect b)
|
||||
{
|
||||
return !(a == b);
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj == null || GetType() != obj.GetType())
|
||||
return false;
|
||||
|
||||
return this == (GifRect)obj;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return X.GetHashCode() ^ Y.GetHashCode() | Width.GetHashCode() ^ Height.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
// Licensed under the MIT License.
|
||||
// Copyright (C) 2018 Jumar A. Macato, All Rights Reserved.
|
||||
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Avalonia.Gif.Decoding
|
||||
{
|
||||
[Serializable]
|
||||
public class InvalidGifStreamException : Exception
|
||||
{
|
||||
public InvalidGifStreamException()
|
||||
{
|
||||
}
|
||||
|
||||
public InvalidGifStreamException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
|
||||
public InvalidGifStreamException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
}
|
||||
|
||||
protected InvalidGifStreamException(SerializationInfo info, StreamingContext context) : base(info, context)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
// Licensed under the MIT License.
|
||||
// Copyright (C) 2018 Jumar A. Macato, All Rights Reserved.
|
||||
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Avalonia.Gif.Decoding
|
||||
{
|
||||
[Serializable]
|
||||
public class LzwDecompressionException : Exception
|
||||
{
|
||||
public LzwDecompressionException()
|
||||
{
|
||||
}
|
||||
|
||||
public LzwDecompressionException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
|
||||
public LzwDecompressionException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
}
|
||||
|
||||
protected LzwDecompressionException(SerializationInfo info, StreamingContext context) : base(info, context)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -1,82 +0,0 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Avalonia.Gif.Extensions
|
||||
{
|
||||
[DebuggerStepThrough]
|
||||
internal static class StreamExtensions
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static ushort SpanToShort(Span<byte> b) => (ushort)(b[0] | (b[1] << 8));
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static void Skip(this Stream stream, long count)
|
||||
{
|
||||
stream.Position += count;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Read a Gif block from stream while advancing the position.
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static int ReadBlock(this Stream stream, byte[] tempBuf)
|
||||
{
|
||||
stream.Read(tempBuf, 0, 1);
|
||||
|
||||
var blockLength = (int)tempBuf[0];
|
||||
|
||||
if (blockLength > 0)
|
||||
stream.Read(tempBuf, 0, blockLength);
|
||||
|
||||
// Guard against infinite loop.
|
||||
if (stream.Position >= stream.Length)
|
||||
throw new InvalidGifStreamException("Reach the end of the filestream without trailer block.");
|
||||
|
||||
return blockLength;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Skips GIF blocks until it encounters an empty block.
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static void SkipBlocks(this Stream stream, byte[] tempBuf)
|
||||
{
|
||||
int blockLength;
|
||||
do
|
||||
{
|
||||
stream.Read(tempBuf, 0, 1);
|
||||
|
||||
blockLength = tempBuf[0];
|
||||
stream.Position += blockLength;
|
||||
|
||||
// Guard against infinite loop.
|
||||
if (stream.Position >= stream.Length)
|
||||
throw new InvalidGifStreamException("Reach the end of the filestream without trailer block.");
|
||||
|
||||
} while (blockLength > 0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Read a <see cref="ushort"/> from stream by providing a temporary buffer.
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static ushort ReadUShortS(this Stream stream, byte[] tempBuf)
|
||||
{
|
||||
stream.Read(tempBuf, 0, 2);
|
||||
return SpanToShort(tempBuf);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Read a <see cref="ushort"/> from stream by providing a temporary buffer.
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static byte ReadByteS(this Stream stream, byte[] tempBuf)
|
||||
{
|
||||
stream.Read(tempBuf, 0, 1);
|
||||
var finalVal = tempBuf[0];
|
||||
return finalVal;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,140 +0,0 @@
|
||||
using Avalonia.Animation;
|
||||
using Avalonia.Gif.Decoding;
|
||||
using Avalonia.Media.Imaging;
|
||||
using Avalonia.Platform;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
|
||||
namespace Avalonia.Gif
|
||||
{
|
||||
public class GifInstance : IDisposable
|
||||
{
|
||||
public IterationCount IterationCount { get; set; }
|
||||
public bool AutoStart { get; private set; } = true;
|
||||
private readonly GifDecoder _gifDecoder;
|
||||
private readonly WriteableBitmap? _targetBitmap;
|
||||
private TimeSpan _totalTime;
|
||||
private readonly List<TimeSpan> _frameTimes;
|
||||
private uint _iterationCount;
|
||||
private int _currentFrameIndex;
|
||||
private readonly List<ulong> _colorTableIdList;
|
||||
|
||||
public CancellationTokenSource CurrentCts { get; }
|
||||
|
||||
internal GifInstance(object newValue) : this(newValue switch
|
||||
{
|
||||
Stream s => s,
|
||||
Uri u => GetStreamFromUri(u),
|
||||
string str => GetStreamFromString(str),
|
||||
_ => throw new InvalidDataException("Unsupported source object")
|
||||
})
|
||||
{ }
|
||||
|
||||
public GifInstance(string uri) : this(GetStreamFromString(uri))
|
||||
{ }
|
||||
|
||||
public GifInstance(Uri uri) : this(GetStreamFromUri(uri))
|
||||
{ }
|
||||
|
||||
public GifInstance(Stream currentStream)
|
||||
{
|
||||
if (!currentStream.CanSeek)
|
||||
throw new InvalidDataException("The provided stream is not seekable.");
|
||||
|
||||
if (!currentStream.CanRead)
|
||||
throw new InvalidOperationException("Can't read the stream provided.");
|
||||
|
||||
currentStream.Seek(0, SeekOrigin.Begin);
|
||||
|
||||
CurrentCts = new CancellationTokenSource();
|
||||
|
||||
_gifDecoder = new GifDecoder(currentStream, CurrentCts.Token);
|
||||
var pixSize = new PixelSize(_gifDecoder.Header.Dimensions.Width, _gifDecoder.Header.Dimensions.Height);
|
||||
|
||||
_targetBitmap = new WriteableBitmap(pixSize, new Vector(96, 96), PixelFormat.Bgra8888, AlphaFormat.Opaque);
|
||||
GifPixelSize = pixSize;
|
||||
|
||||
_totalTime = TimeSpan.Zero;
|
||||
|
||||
_frameTimes = _gifDecoder.Frames.Select(frame =>
|
||||
{
|
||||
_totalTime = _totalTime.Add(frame.FrameDelay);
|
||||
return _totalTime;
|
||||
}).ToList();
|
||||
|
||||
_gifDecoder.RenderFrame(0, _targetBitmap);
|
||||
}
|
||||
|
||||
private static Stream GetStreamFromString(string str)
|
||||
{
|
||||
if (!Uri.TryCreate(str, UriKind.RelativeOrAbsolute, out var res))
|
||||
{
|
||||
throw new InvalidCastException("The string provided can't be converted to URI.");
|
||||
}
|
||||
|
||||
return GetStreamFromUri(res);
|
||||
}
|
||||
|
||||
private static Stream GetStreamFromUri(Uri uri)
|
||||
{
|
||||
var uriString = uri.OriginalString.Trim();
|
||||
|
||||
if (!uriString.StartsWith("resm") && !uriString.StartsWith("avares"))
|
||||
throw new InvalidDataException(
|
||||
"The URI provided is not currently supported.");
|
||||
|
||||
return AssetLoader.Open(uri);
|
||||
}
|
||||
|
||||
public int GifFrameCount => _frameTimes.Count;
|
||||
|
||||
public PixelSize GifPixelSize { get; }
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
IsDisposed = true;
|
||||
CurrentCts.Cancel();
|
||||
_targetBitmap?.Dispose();
|
||||
}
|
||||
|
||||
public bool IsDisposed { get; private set; }
|
||||
|
||||
|
||||
public WriteableBitmap? ProcessFrameTime(TimeSpan stopwatchElapsed)
|
||||
{
|
||||
if (!IterationCount.IsInfinite && _iterationCount > IterationCount.Value)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (CurrentCts.IsCancellationRequested || _targetBitmap is null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var elapsedTicks = stopwatchElapsed.Ticks;
|
||||
var timeModulus = TimeSpan.FromTicks(elapsedTicks % _totalTime.Ticks);
|
||||
var targetFrame = _frameTimes.FirstOrDefault(x => timeModulus < x);
|
||||
var currentFrame = _frameTimes.IndexOf(targetFrame);
|
||||
if (currentFrame == -1) currentFrame = 0;
|
||||
|
||||
if (_currentFrameIndex == currentFrame)
|
||||
return _targetBitmap;
|
||||
|
||||
_iterationCount = (uint)(elapsedTicks / _totalTime.Ticks);
|
||||
|
||||
return ProcessFrameIndex(currentFrame);
|
||||
}
|
||||
|
||||
internal WriteableBitmap ProcessFrameIndex(int frameIndex)
|
||||
{
|
||||
_gifDecoder.RenderFrame(frameIndex, _targetBitmap);
|
||||
_currentFrameIndex = frameIndex;
|
||||
|
||||
return _targetBitmap;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Avalonia.Gif
|
||||
{
|
||||
[Serializable]
|
||||
internal class InvalidGifStreamException : Exception
|
||||
{
|
||||
public InvalidGifStreamException()
|
||||
{
|
||||
}
|
||||
|
||||
public InvalidGifStreamException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
|
||||
public InvalidGifStreamException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
}
|
||||
|
||||
protected InvalidGifStreamException(SerializationInfo info, StreamingContext context) : base(info, context)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
<IsTestProject>true</IsTestProject>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
|
||||
<PackageReference Include="xunit" Version="2.6.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="coverlet.collector" Version="6.0.0">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\BiliSharp\BiliSharp.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -1 +0,0 @@
|
||||
global using Xunit;
|
@ -1,58 +0,0 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace BiliSharp.Api.Models.Login
|
||||
{
|
||||
/// <summary>
|
||||
/// https://api.bilibili.com/x/web-interface/nav/stat
|
||||
/// </summary>
|
||||
public class LoginInfoStat
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("code")]
|
||||
public int Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("message")]
|
||||
public string Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("ttl")]
|
||||
public int Ttl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("data")]
|
||||
public LoginInfoStatData Data { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class LoginInfoStatData
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("following")]
|
||||
public int Following { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("follower")]
|
||||
public int Follower { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("dynamic_count")]
|
||||
public int DynamicCount { get; set; }
|
||||
}
|
||||
}
|
@ -1,76 +0,0 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace BiliSharp.Api.Models.Login
|
||||
{
|
||||
/// <summary>
|
||||
/// https://api.bilibili.com/x/safecenter/login_notice?mid=
|
||||
/// </summary>
|
||||
public class LoginNotice
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("code")]
|
||||
public int Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("message")]
|
||||
public string Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("ttl")]
|
||||
public int Ttl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("data")]
|
||||
public LoginNoticeData Data { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class LoginNoticeData
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("mid")]
|
||||
public long Mid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("device_name")]
|
||||
public string DeviceName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("login_type")]
|
||||
public string LoginType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("login_time")]
|
||||
public string LoginTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("location")]
|
||||
public string Location { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("ip")]
|
||||
public string Ip { get; set; }
|
||||
}
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace BiliSharp.Api.Models.Login
|
||||
{
|
||||
/// <summary>
|
||||
/// https://passport.bilibili.com/x/passport-login/web/qrcode/generate
|
||||
/// </summary>
|
||||
public class LoginQRCode
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("code")]
|
||||
public int Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("message")]
|
||||
public string Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("ttl")]
|
||||
public int Ttl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("data")]
|
||||
public LoginQRCodeData Data { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class LoginQRCodeData
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("url")]
|
||||
public string Url { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("qrcode_key")]
|
||||
public string QrcodeKey { get; set; }
|
||||
}
|
||||
}
|
@ -1,70 +0,0 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace BiliSharp.Api.Models.Login
|
||||
{
|
||||
/// <summary>
|
||||
/// https://passport.bilibili.com/x/passport-login/web/qrcode/poll?qrcode_key=
|
||||
/// </summary>
|
||||
public class LoginQRCodePoll
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("code")]
|
||||
public int Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("message")]
|
||||
public string Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("ttl")]
|
||||
public int Ttl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("data")]
|
||||
public LoginQRCodePollData Data { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class LoginQRCodePollData
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("url")]
|
||||
public string Url { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("refresh_token")]
|
||||
public string RefreshToken { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("timestamp")]
|
||||
public long Timestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("code")]
|
||||
public long Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("message")]
|
||||
public string Message { get; set; }
|
||||
}
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace BiliSharp.Api.Models.Login
|
||||
{
|
||||
/// <summary>
|
||||
/// https://account.bilibili.com/site/getCoin
|
||||
/// </summary>
|
||||
public class MyCoin
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("code")]
|
||||
public int Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("status")]
|
||||
public bool Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("data")]
|
||||
public MyCoinData Data { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class MyCoinData
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("money")]
|
||||
public int Money { get; set; }
|
||||
}
|
||||
}
|
@ -1,556 +0,0 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace BiliSharp.Api.Models.Login
|
||||
{
|
||||
/// <summary>
|
||||
/// https://api.bilibili.com/x/web-interface/nav
|
||||
/// </summary>
|
||||
public class NavigationLoginInfo
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("code")]
|
||||
public int Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("message")]
|
||||
public string Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("ttl")]
|
||||
public int Ttl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("data")]
|
||||
public NavigationLoginInfoData Data { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class NavigationLoginInfoData
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("isLogin")]
|
||||
public bool Islogin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("email_verified")]
|
||||
public int EmailVerified { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("face")]
|
||||
public string Face { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("face_nft")]
|
||||
public int FaceNft { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("face_nft_type")]
|
||||
public int FaceNftType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("level_info")]
|
||||
public NavigationLoginInfoDataLevelInfo LevelInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("mid")]
|
||||
public long Mid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("mobile_verified")]
|
||||
public int MobileVerified { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("money")]
|
||||
public int Money { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("moral")]
|
||||
public int Moral { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("official")]
|
||||
public NavigationLoginInfoDataOfficial Official { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("officialVerify")]
|
||||
public NavigationLoginInfoDataOfficialverify Officialverify { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("pendant")]
|
||||
public NavigationLoginInfoDataPendant Pendant { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("scores")]
|
||||
public int Scores { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("uname")]
|
||||
public string Uname { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("vipDueDate")]
|
||||
public long Vipduedate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("vipStatus")]
|
||||
public int Vipstatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("vipType")]
|
||||
public int Viptype { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("vip_pay_type")]
|
||||
public int VipPayType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("vip_theme_type")]
|
||||
public int VipThemeType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("vip_label")]
|
||||
public NavigationLoginInfoDataVipLabel VipLabel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("vip_avatar_subscript")]
|
||||
public int VipAvatarSubscript { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("vip_nickname_color")]
|
||||
public string VipNicknameColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("vip")]
|
||||
public NavigationLoginInfoDataVip Vip { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("wallet")]
|
||||
public NavigationLoginInfoDataWallet Wallet { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("has_shop")]
|
||||
public bool HasShop { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("shop_url")]
|
||||
public string ShopUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("allowance_count")]
|
||||
public int AllowanceCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("answer_status")]
|
||||
public int AnswerStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("is_senior_member")]
|
||||
public int IsSeniorMember { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("wbi_img")]
|
||||
public NavigationLoginInfoDataWbiImg WbiImg { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("is_jury")]
|
||||
public bool IsJury { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class NavigationLoginInfoDataLevelInfo
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("current_level")]
|
||||
public int CurrentLevel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("current_min")]
|
||||
public int CurrentMin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("current_exp")]
|
||||
public int CurrentExp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("next_exp")]
|
||||
public object NextExp { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class NavigationLoginInfoDataOfficial
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("role")]
|
||||
public int Role { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("title")]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("desc")]
|
||||
public string Desc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("type")]
|
||||
public int Type { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class NavigationLoginInfoDataOfficialverify
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("type")]
|
||||
public int Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("desc")]
|
||||
public string Desc { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class NavigationLoginInfoDataPendant
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("pid")]
|
||||
public int Pid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("image")]
|
||||
public string Image { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("expire")]
|
||||
public int Expire { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("image_enhance")]
|
||||
public string ImageEnhance { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("image_enhance_frame")]
|
||||
public string ImageEnhanceFrame { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class NavigationLoginInfoDataVipLabel
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("path")]
|
||||
public string Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("text")]
|
||||
public string Text { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("label_theme")]
|
||||
public string LabelTheme { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("text_color")]
|
||||
public string TextColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("bg_style")]
|
||||
public int BgStyle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("bg_color")]
|
||||
public string BgColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("border_color")]
|
||||
public string BorderColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("use_img_label")]
|
||||
public bool UseImgLabel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("img_label_uri_hans")]
|
||||
public string ImgLabelUriHans { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("img_label_uri_hant")]
|
||||
public string ImgLabelUriHant { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("img_label_uri_hans_static")]
|
||||
public string ImgLabelUriHansStatic { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("img_label_uri_hant_static")]
|
||||
public string ImgLabelUriHantStatic { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class NavigationLoginInfoDataVip
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("type")]
|
||||
public int Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("status")]
|
||||
public int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("due_date")]
|
||||
public long DueDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("vip_pay_type")]
|
||||
public int VipPayType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("theme_type")]
|
||||
public int ThemeType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("label")]
|
||||
public NavigationLoginInfoDataVipLabel Label { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("avatar_subscript")]
|
||||
public int AvatarSubscript { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("nickname_color")]
|
||||
public string NicknameColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("role")]
|
||||
public int Role { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("avatar_subscript_url")]
|
||||
public string AvatarSubscriptUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("tv_vip_status")]
|
||||
public int TvVipStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("tv_vip_pay_type")]
|
||||
public int TvVipPayType { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class NavigationLoginInfoDataWallet
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("mid")]
|
||||
public long Mid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("bcoin_balance")]
|
||||
public int BcoinBalance { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("coupon_balance")]
|
||||
public int CouponBalance { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("coupon_due_time")]
|
||||
public int CouponDueTime { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class NavigationLoginInfoDataWbiImg
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("img_url")]
|
||||
public string ImgUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("sub_url")]
|
||||
public string SubUrl { get; set; }
|
||||
}
|
||||
}
|
@ -1,652 +0,0 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace BiliSharp.Api.Models.User
|
||||
{
|
||||
/// <summary>
|
||||
/// https://api.bilibili.com/x/space/myinfo
|
||||
/// </summary>
|
||||
public class MyInfo
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("code")]
|
||||
public int Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("message")]
|
||||
public string Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("ttl")]
|
||||
public int Ttl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("data")]
|
||||
public MyInfoData Data { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class MyInfoData
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("mid")]
|
||||
public long Mid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("sex")]
|
||||
public string Sex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("face")]
|
||||
public string Face { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("sign")]
|
||||
public string Sign { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("rank")]
|
||||
public int Rank { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("level")]
|
||||
public int Level { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("jointime")]
|
||||
public int Jointime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("moral")]
|
||||
public int Moral { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("silence")]
|
||||
public int Silence { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("email_status")]
|
||||
public int EmailStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("tel_status")]
|
||||
public int TelStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("identification")]
|
||||
public int Identification { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("vip")]
|
||||
public MyInfoDataVip Vip { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("pendant")]
|
||||
public MyInfoDataPendant Pendant { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("nameplate")]
|
||||
public MyInfoDataNameplate Nameplate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("official")]
|
||||
public MyInfoDataOfficial Official { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("birthday")]
|
||||
public long Birthday { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("is_tourist")]
|
||||
public int IsTourist { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("is_fake_account")]
|
||||
public int IsFakeAccount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("pin_prompting")]
|
||||
public int PinPrompting { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("is_deleted")]
|
||||
public int IsDeleted { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("in_reg_audit")]
|
||||
public int InRegAudit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("is_rip_user")]
|
||||
public bool IsRipUser { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("profession")]
|
||||
public MyInfoDataProfession Profession { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("face_nft")]
|
||||
public int FaceNft { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("face_nft_new")]
|
||||
public int FaceNftNew { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("is_senior_member")]
|
||||
public int IsSeniorMember { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("honours")]
|
||||
public MyInfoDataHonours Honours { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("digital_id")]
|
||||
public string DigitalId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("digital_type")]
|
||||
public int DigitalType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("level_exp")]
|
||||
public MyInfoDataLevelExp LevelExp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("coins")]
|
||||
public int Coins { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("following")]
|
||||
public int Following { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("follower")]
|
||||
public int Follower { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class MyInfoDataVip
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("type")]
|
||||
public int Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("status")]
|
||||
public int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("due_date")]
|
||||
public long DueDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("vip_pay_type")]
|
||||
public int VipPayType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("theme_type")]
|
||||
public int ThemeType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("label")]
|
||||
public MyInfoDataVipLabel Label { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("avatar_subscript")]
|
||||
public int AvatarSubscript { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("nickname_color")]
|
||||
public string NicknameColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("role")]
|
||||
public int Role { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("avatar_subscript_url")]
|
||||
public string AvatarSubscriptUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("tv_vip_status")]
|
||||
public int TvVipStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("tv_vip_pay_type")]
|
||||
public int TvVipPayType { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class MyInfoDataVipLabel
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("path")]
|
||||
public string Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("text")]
|
||||
public string Text { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("label_theme")]
|
||||
public string LabelTheme { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("text_color")]
|
||||
public string TextColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("bg_style")]
|
||||
public int BgStyle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("bg_color")]
|
||||
public string BgColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("border_color")]
|
||||
public string BorderColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("use_img_label")]
|
||||
public bool UseImgLabel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("img_label_uri_hans")]
|
||||
public string ImgLabelUriHans { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("img_label_uri_hant")]
|
||||
public string ImgLabelUriHant { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("img_label_uri_hans_static")]
|
||||
public string ImgLabelUriHansStatic { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("img_label_uri_hant_static")]
|
||||
public string ImgLabelUriHantStatic { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class MyInfoDataPendant
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("pid")]
|
||||
public int Pid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("image")]
|
||||
public string Image { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("expire")]
|
||||
public int Expire { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("image_enhance")]
|
||||
public string ImageEnhance { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("image_enhance_frame")]
|
||||
public string ImageEnhanceFrame { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class MyInfoDataNameplate
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("nid")]
|
||||
public int Nid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("image")]
|
||||
public string Image { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("image_small")]
|
||||
public string ImageSmall { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("level")]
|
||||
public string Level { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("condition")]
|
||||
public string Condition { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class MyInfoDataOfficial
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("role")]
|
||||
public int Role { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("title")]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("desc")]
|
||||
public string Desc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("type")]
|
||||
public int Type { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class MyInfoDataProfession
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("show_name")]
|
||||
public string ShowName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("is_show")]
|
||||
public int IsShow { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("category_one")]
|
||||
public string CategoryOne { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("realname")]
|
||||
public string Realname { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("title")]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("department")]
|
||||
public string Department { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class MyInfoDataHonours
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("mid")]
|
||||
public long Mid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("colour")]
|
||||
public MyInfoDataHonoursColour Colour { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("tags")]
|
||||
public object Tags { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class MyInfoDataHonoursColour
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("dark")]
|
||||
public string Dark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("normal")]
|
||||
public string Normal { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class MyInfoDataLevelExp
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("current_level")]
|
||||
public int CurrentLevel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("current_min")]
|
||||
public int CurrentMin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("current_exp")]
|
||||
public int CurrentExp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("next_exp")]
|
||||
public int NextExp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("level_up")]
|
||||
public long LevelUp { get; set; }
|
||||
}
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace BiliSharp.Api.Models.User
|
||||
{
|
||||
/// <summary>
|
||||
/// https://passport.bilibili.com/web/generic/check/nickname?nickName=hahaha
|
||||
/// </summary>
|
||||
public class Nickname
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("code")]
|
||||
public int Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("message")]
|
||||
public string Message { get; set; }
|
||||
}
|
||||
}
|
@ -1,599 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace BiliSharp.Api.Models.User
|
||||
{
|
||||
/// <summary>
|
||||
/// https://api.bilibili.com/x/web-interface/card?mid=314521322&photo=true
|
||||
/// </summary>
|
||||
public class UserCard
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("code")]
|
||||
public int Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("message")]
|
||||
public string Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("ttl")]
|
||||
public int Ttl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("data")]
|
||||
public UserCardData Data { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserCardData
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("card")]
|
||||
public UserCardDataCard Card { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("space")]
|
||||
public UserCardDataSpace Space { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("following")]
|
||||
public bool Following { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("archive_count")]
|
||||
public int ArchiveCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("article_count")]
|
||||
public int ArticleCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("follower")]
|
||||
public long Follower { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("like_num")]
|
||||
public long LikeNum { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserCardDataCard
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("mid")]
|
||||
public string Mid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("approve")]
|
||||
public bool Approve { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("sex")]
|
||||
public string Sex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("rank")]
|
||||
public string Rank { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("face")]
|
||||
public string Face { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("face_nft")]
|
||||
public int FaceNft { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("face_nft_type")]
|
||||
public int FaceNftType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("DisplayRank")]
|
||||
public string Displayrank { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("regtime")]
|
||||
public int Regtime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("spacesta")]
|
||||
public int Spacesta { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("birthday")]
|
||||
public string Birthday { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("place")]
|
||||
public string Place { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("description")]
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("article")]
|
||||
public int Article { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("attentions")]
|
||||
public List<object> Attentions { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("fans")]
|
||||
public long Fans { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("friend")]
|
||||
public int Friend { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("attention")]
|
||||
public int Attention { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("sign")]
|
||||
public string Sign { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("level_info")]
|
||||
public UserCardDataCardLevelInfo LevelInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("pendant")]
|
||||
public UserCardDataCardPendant Pendant { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("nameplate")]
|
||||
public UserCardDataCardNameplate Nameplate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("Official")]
|
||||
public UserCardDataCardOfficial Official { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("official_verify")]
|
||||
public UserCardDataCardOfficialVerify OfficialVerify { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("vip")]
|
||||
public UserCardDataCardVip Vip { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("is_senior_member")]
|
||||
public int IsSeniorMember { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserCardDataCardLevelInfo
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("current_level")]
|
||||
public int CurrentLevel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("current_min")]
|
||||
public int CurrentMin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("current_exp")]
|
||||
public int CurrentExp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("next_exp")]
|
||||
public int NextExp { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserCardDataCardPendant
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("pid")]
|
||||
public int Pid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("image")]
|
||||
public string Image { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("expire")]
|
||||
public int Expire { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("image_enhance")]
|
||||
public string ImageEnhance { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("image_enhance_frame")]
|
||||
public string ImageEnhanceFrame { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserCardDataCardNameplate
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("nid")]
|
||||
public int Nid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("image")]
|
||||
public string Image { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("image_small")]
|
||||
public string ImageSmall { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("level")]
|
||||
public string Level { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("condition")]
|
||||
public string Condition { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserCardDataCardOfficial
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("role")]
|
||||
public int Role { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("title")]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("desc")]
|
||||
public string Desc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("type")]
|
||||
public int Type { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserCardDataCardOfficialVerify
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("type")]
|
||||
public int Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("desc")]
|
||||
public string Desc { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserCardDataCardVip
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("type")]
|
||||
public int Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("status")]
|
||||
public int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("due_date")]
|
||||
public long DueDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("vip_pay_type")]
|
||||
public int VipPayType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("theme_type")]
|
||||
public int ThemeType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("label")]
|
||||
public UserCardDataCardVipLabel Label { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("avatar_subscript")]
|
||||
public int AvatarSubscript { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("nickname_color")]
|
||||
public string NicknameColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("role")]
|
||||
public int Role { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("avatar_subscript_url")]
|
||||
public string AvatarSubscriptUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("tv_vip_status")]
|
||||
public int TvVipStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("tv_vip_pay_type")]
|
||||
public int TvVipPayType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("vipType")]
|
||||
public int Viptype { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("vipStatus")]
|
||||
public int Vipstatus { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserCardDataCardVipLabel
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("path")]
|
||||
public string Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("text")]
|
||||
public string Text { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("label_theme")]
|
||||
public string LabelTheme { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("text_color")]
|
||||
public string TextColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("bg_style")]
|
||||
public int BgStyle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("bg_color")]
|
||||
public string BgColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("border_color")]
|
||||
public string BorderColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("use_img_label")]
|
||||
public bool UseImgLabel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("img_label_uri_hans")]
|
||||
public string ImgLabelUriHans { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("img_label_uri_hant")]
|
||||
public string ImgLabelUriHant { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("img_label_uri_hans_static")]
|
||||
public string ImgLabelUriHansStatic { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("img_label_uri_hant_static")]
|
||||
public string ImgLabelUriHantStatic { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserCardDataSpace
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("s_img")]
|
||||
public string SImg { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("l_img")]
|
||||
public string LImg { get; set; }
|
||||
}
|
||||
}
|
@ -1,443 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace BiliSharp.Api.Models.User
|
||||
{
|
||||
/// <summary>
|
||||
/// https://api.vc.bilibili.com/account/v1/user/cards?uids=314521322,206840230,49246269
|
||||
/// </summary>
|
||||
public class UserCards
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("code")]
|
||||
public int Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("msg")]
|
||||
public string Msg { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("message")]
|
||||
public string Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("data")]
|
||||
public List<UserCardsData> Data { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserCardsData
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("mid")]
|
||||
public long Mid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("sex")]
|
||||
public string Sex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("face")]
|
||||
public string Face { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("sign")]
|
||||
public string Sign { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("rank")]
|
||||
public int Rank { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("level")]
|
||||
public int Level { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("silence")]
|
||||
public int Silence { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("vip")]
|
||||
public UserCardsDataVip Vip { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("pendant")]
|
||||
public UserCardsDataPendant Pendant { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("nameplate")]
|
||||
public UserCardsDataNameplate Nameplate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("official")]
|
||||
public UserCardsDataOfficial Official { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("birthday")]
|
||||
public long Birthday { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("is_fake_account")]
|
||||
public int IsFakeAccount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("is_deleted")]
|
||||
public int IsDeleted { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("in_reg_audit")]
|
||||
public int InRegAudit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("face_nft")]
|
||||
public int FaceNft { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("face_nft_new")]
|
||||
public int FaceNftNew { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("is_senior_member")]
|
||||
public int IsSeniorMember { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("digital_id")]
|
||||
public string DigitalId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("digital_type")]
|
||||
public int DigitalType { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserCardsDataVip
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("type")]
|
||||
public int Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("status")]
|
||||
public int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("due_date")]
|
||||
public long DueDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("vip_pay_type")]
|
||||
public int VipPayType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("theme_type")]
|
||||
public int ThemeType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("label")]
|
||||
public UserCardsDataVipLabel Label { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("avatar_subscript")]
|
||||
public int AvatarSubscript { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("nickname_color")]
|
||||
public string NicknameColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("role")]
|
||||
public int Role { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("avatar_subscript_url")]
|
||||
public string AvatarSubscriptUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("tv_vip_status")]
|
||||
public int TvVipStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("tv_vip_pay_type")]
|
||||
public int TvVipPayType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("tv_due_date")]
|
||||
public long TvDueDate { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserCardsDataVipLabel
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("path")]
|
||||
public string Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("text")]
|
||||
public string Text { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("label_theme")]
|
||||
public string LabelTheme { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("text_color")]
|
||||
public string TextColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("bg_style")]
|
||||
public int BgStyle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("bg_color")]
|
||||
public string BgColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("border_color")]
|
||||
public string BorderColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("use_img_label")]
|
||||
public bool UseImgLabel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("img_label_uri_hans")]
|
||||
public string ImgLabelUriHans { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("img_label_uri_hant")]
|
||||
public string ImgLabelUriHant { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("img_label_uri_hans_static")]
|
||||
public string ImgLabelUriHansStatic { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("img_label_uri_hant_static")]
|
||||
public string ImgLabelUriHantStatic { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserCardsDataPendant
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("pid")]
|
||||
public int Pid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("image")]
|
||||
public string Image { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("expire")]
|
||||
public int Expire { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("image_enhance")]
|
||||
public string ImageEnhance { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("image_enhance_frame")]
|
||||
public string ImageEnhanceFrame { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserCardsDataNameplate
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("nid")]
|
||||
public int Nid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("image")]
|
||||
public string Image { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("image_small")]
|
||||
public string ImageSmall { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("level")]
|
||||
public string Level { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("condition")]
|
||||
public string Condition { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserCardsDataOfficial
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("role")]
|
||||
public int Role { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("title")]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("desc")]
|
||||
public string Desc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("type")]
|
||||
public int Type { get; set; }
|
||||
}
|
||||
}
|
@ -1,827 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace BiliSharp.Api.Models.User
|
||||
{
|
||||
/// <summary>
|
||||
/// https://api.bilibili.com/x/space/acc/info?mid=
|
||||
/// </summary>
|
||||
public class UserSpaceInfo
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("code")]
|
||||
public int Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("message")]
|
||||
public string Message { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("ttl")]
|
||||
public int Ttl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("data")]
|
||||
public UserSpaceInfoData Data { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserSpaceInfoData
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("mid")]
|
||||
public long Mid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("sex")]
|
||||
public string Sex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("face")]
|
||||
public string Face { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("face_nft")]
|
||||
public int FaceNft { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("face_nft_type")]
|
||||
public int FaceNftType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("sign")]
|
||||
public string Sign { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("rank")]
|
||||
public int Rank { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("level")]
|
||||
public int Level { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("jointime")]
|
||||
public int Jointime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("moral")]
|
||||
public int Moral { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("silence")]
|
||||
public int Silence { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("coins")]
|
||||
public int Coins { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("fans_badge")]
|
||||
public bool FansBadge { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("fans_medal")]
|
||||
public UserSpaceInfoDataFansMedal FansMedal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("official")]
|
||||
public UserSpaceInfoDataOfficial Official { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("vip")]
|
||||
public UserSpaceInfoDataVip Vip { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("pendant")]
|
||||
public UserSpaceInfoDataPendant Pendant { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("nameplate")]
|
||||
public UserSpaceInfoDataNameplate Nameplate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("user_honour_info")]
|
||||
public UserSpaceInfoDataUserHonourInfo UserHonourInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("is_followed")]
|
||||
public bool IsFollowed { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("top_photo")]
|
||||
public string TopPhoto { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("theme")]
|
||||
public UserSpaceInfoDataTheme Theme { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("sys_notice")]
|
||||
public UserSpaceInfoDataSysNotice SysNotice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("live_room")]
|
||||
public UserSpaceInfoDataLiveRoom LiveRoom { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("birthday")]
|
||||
public string Birthday { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("school")]
|
||||
public UserSpaceInfoDataSchool School { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("profession")]
|
||||
public UserSpaceInfoDataProfession Profession { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("tags")]
|
||||
public object Tags { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("series")]
|
||||
public UserSpaceInfoDataSeries Series { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("is_senior_member")]
|
||||
public int IsSeniorMember { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("mcn_info")]
|
||||
public object McnInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("gaia_res_type")]
|
||||
public int GaiaResType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("gaia_data")]
|
||||
public object GaiaData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("is_risk")]
|
||||
public bool IsRisk { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("elec")]
|
||||
public UserSpaceInfoDataElec Elec { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("contract")]
|
||||
public UserSpaceInfoDataContract Contract { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserSpaceInfoDataFansMedal
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("show")]
|
||||
public bool Show { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("wear")]
|
||||
public bool Wear { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("medal")]
|
||||
public object Medal { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserSpaceInfoDataOfficial
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("role")]
|
||||
public int Role { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("title")]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("desc")]
|
||||
public string Desc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("type")]
|
||||
public int Type { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserSpaceInfoDataVip
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("type")]
|
||||
public int Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("status")]
|
||||
public int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("due_date")]
|
||||
public long DueDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("vip_pay_type")]
|
||||
public int VipPayType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("theme_type")]
|
||||
public int ThemeType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("label")]
|
||||
public UserSpaceInfoDataVipLabel Label { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("avatar_subscript")]
|
||||
public int AvatarSubscript { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("nickname_color")]
|
||||
public string NicknameColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("role")]
|
||||
public int Role { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("avatar_subscript_url")]
|
||||
public string AvatarSubscriptUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("tv_vip_status")]
|
||||
public int TvVipStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("tv_vip_pay_type")]
|
||||
public int TvVipPayType { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserSpaceInfoDataVipLabel
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("path")]
|
||||
public string Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("text")]
|
||||
public string Text { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("label_theme")]
|
||||
public string LabelTheme { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("text_color")]
|
||||
public string TextColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("bg_style")]
|
||||
public int BgStyle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("bg_color")]
|
||||
public string BgColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("border_color")]
|
||||
public string BorderColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("use_img_label")]
|
||||
public bool UseImgLabel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("img_label_uri_hans")]
|
||||
public string ImgLabelUriHans { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("img_label_uri_hant")]
|
||||
public string ImgLabelUriHant { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("img_label_uri_hans_static")]
|
||||
public string ImgLabelUriHansStatic { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("img_label_uri_hant_static")]
|
||||
public string ImgLabelUriHantStatic { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserSpaceInfoDataPendant
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("pid")]
|
||||
public int Pid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("image")]
|
||||
public string Image { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("expire")]
|
||||
public int Expire { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("image_enhance")]
|
||||
public string ImageEnhance { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("image_enhance_frame")]
|
||||
public string ImageEnhanceFrame { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserSpaceInfoDataNameplate
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("nid")]
|
||||
public int Nid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("image")]
|
||||
public string Image { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("image_small")]
|
||||
public string ImageSmall { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("level")]
|
||||
public string Level { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("condition")]
|
||||
public string Condition { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserSpaceInfoDataUserHonourInfo
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("mid")]
|
||||
public int Mid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("colour")]
|
||||
public object Colour { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("tags")]
|
||||
public List<object> Tags { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserSpaceInfoDataTheme
|
||||
{ }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserSpaceInfoDataSysNotice
|
||||
{ }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserSpaceInfoDataLiveRoom
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("roomStatus")]
|
||||
public int Roomstatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("liveStatus")]
|
||||
public int Livestatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("url")]
|
||||
public string Url { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("title")]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("cover")]
|
||||
public string Cover { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("roomid")]
|
||||
public long Roomid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("roundStatus")]
|
||||
public int Roundstatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("broadcast_type")]
|
||||
public int BroadcastType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("watched_show")]
|
||||
public UserSpaceInfoDataLiveRoomWatchedShow WatchedShow { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserSpaceInfoDataLiveRoomWatchedShow
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("switch")]
|
||||
public bool Switch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("num")]
|
||||
public int Num { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("text_small")]
|
||||
public string TextSmall { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("text_large")]
|
||||
public string TextLarge { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("icon")]
|
||||
public string Icon { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("icon_location")]
|
||||
public string IconLocation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("icon_web")]
|
||||
public string IconWeb { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserSpaceInfoDataSchool
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserSpaceInfoDataProfession
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("department")]
|
||||
public string Department { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("title")]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("is_show")]
|
||||
public int IsShow { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserSpaceInfoDataSeries
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("user_upgrade_status")]
|
||||
public int UserUpgradeStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("show_upgrade_window")]
|
||||
public bool ShowUpgradeWindow { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserSpaceInfoDataElec
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("show_info")]
|
||||
public UserSpaceInfoDataElecShowInfo ShowInfo { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserSpaceInfoDataElecShowInfo
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("show")]
|
||||
public bool Show { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("state")]
|
||||
public int State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("title")]
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("icon")]
|
||||
public string Icon { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("jump_url")]
|
||||
public string JumpUrl { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class UserSpaceInfoDataContract
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("is_display")]
|
||||
public bool IsDisplay { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonPropertyName("is_follow_display")]
|
||||
public bool IsFollowDisplay { get; set; }
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue