Skip to content

djkcyl/AunlyLive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

live_auth

v1.0.0

Base URLs: live.a60.one:88/api

Docs URL: Docs

Authentication

POST Login For Access Token

POST /auth/token

Body 请求参数

grant_type: string
username: string
password: string
scope: string
client_id: string
client_secret: string

请求参数

名称 位置 类型 必选 说明
body body object none
» grant_type body string none
» username body string none
» password body string none
» scope body string none
» client_id body string none
» client_secret body string none

返回示例

200 Response

{
  "access_token": "string",
  "token_type": "string"
}

返回结果

状态码 状态码含义 说明 数据模型
200 OK Successful Response Token
422 Unprocessable Entity Validation Error HTTPValidationError

Users

POST Create New User

POST /users/create

Body 请求参数

{
  "username": "string",
  "email": "[email protected]",
  "full_name": "string",
  "password": "string"
}

请求参数

名称 位置 类型 必选 中文名 说明
body body UserCreate UserCreate none

返回示例

200 Response

{
  "username": "string",
  "email": "string",
  "full_name": "string",
  "permission_level": 0
}

返回结果

状态码 状态码含义 说明 数据模型
200 OK Successful Response User
422 Unprocessable Entity Validation Error HTTPValidationError

GET Read Users Me

GET /users/me

返回示例

200 Response

{
  "username": "string",
  "email": "string",
  "full_name": "string",
  "permission_level": 0
}

返回结果

状态码 状态码含义 说明 数据模型
200 OK Successful Response User

Live Streaming

POST Create Live Token Route

POST /live/create_token

请求参数

名称 位置 类型 必选 中文名 说明
stream query string none
level query integer none

返回示例

200 Response

{
  "username": "string",
  "stream": "string",
  "token": "string",
  "play_token": "string",
  "permissions_level": 0
}

返回结果

状态码 状态码含义 说明 数据模型
200 OK Successful Response LiveToken
422 Unprocessable Entity Validation Error HTTPValidationError

DELETE Destroy Live Token Route

DELETE /live/destroy_token

请求参数

名称 位置 类型 必选 中文名 说明
token query string none

返回示例

200 Response

"string"

返回结果

状态码 状态码含义 说明 数据模型
200 OK Successful Response string
422 Unprocessable Entity Validation Error HTTPValidationError

GET List Live Tokens

GET /live/list_tokens

返回示例

200 Response

[
  {
    "username": "string",
    "stream": "string",
    "token": "string",
    "play_token": "string",
    "permissions_level": 0
  }
]

返回结果

状态码 状态码含义 说明 数据模型
200 OK Successful Response Inline

返回数据结构

状态码 200

Response List Live Tokens Live List Tokens Get

名称 类型 必选 约束 中文名 说明
Response List Live Tokens Live List Tokens Get [LiveToken] false none Response List Live Tokens Live List Tokens Get none
» LiveToken LiveToken false none LiveToken none
»» username string true none Username none
»» stream string true none Stream none
»» token string true none Token none
»» play_token string true none Play Token none
»» permissions_level integer true none Permissions Level none

Callback

POST On Publish

POST /callback/on_publish

Body 请求参数

{
  "server_id": "string",
  "action": "string",
  "client_id": "string",
  "ip": "string",
  "vhost": "string",
  "app": "string",
  "tcUrl": "string",
  "stream": "string",
  "param": "string",
  "stream_url": "string",
  "stream_id": "string"
}

请求参数

名称 位置 类型 必选 中文名 说明
body body LiveStreamCallback LiveStreamCallback none

返回示例

200 Response

"string"

返回结果

状态码 状态码含义 说明 数据模型
200 OK Successful Response string
422 Unprocessable Entity Validation Error HTTPValidationError

POST On Play

POST /callback/on_play

Body 请求参数

{
  "server_id": "string",
  "action": "string",
  "client_id": "string",
  "ip": "string",
  "vhost": "string",
  "app": "string",
  "tcUrl": "string",
  "stream": "string",
  "param": "string",
  "stream_url": "string",
  "stream_id": "string"
}

请求参数

名称 位置 类型 必选 中文名 说明
body body LiveStreamCallback LiveStreamCallback none

返回示例

200 Response

"string"

返回结果

状态码 状态码含义 说明 数据模型
200 OK Successful Response string
422 Unprocessable Entity Validation Error HTTPValidationError

POST On Dvr

POST /callback/on_dvr

Body 请求参数

{
  "action": "string",
  "client_id": "string",
  "ip": "string",
  "vhost": "string",
  "app": "string",
  "stream": "string",
  "param": "string",
  "cwd": "string",
  "file": "string",
  "server_id": "string",
  "stream_url": "string",
  "stream_id": "string"
}

请求参数

名称 位置 类型 必选 中文名 说明
body body DvrCallback DvrCallback none

返回示例

200 Response

"string"

返回结果

状态码 状态码含义 说明 数据模型
200 OK Successful Response string
422 Unprocessable Entity Validation Error HTTPValidationError

Streams

GET Get Streams

GET /streams/list

返回示例

200 Response

{
  "code": 0,
  "streams": [
    {
      "name": "string",
      "play_url": "string",
      "kbps": {},
      "video": {
        "codec": "string",
        "profile": "string",
        "level": "string",
        "width": 0,
        "height": 0
      },
      "audio": {
        "codec": "string",
        "sample_rate": 0,
        "channel": 0,
        "profile": "string"
      },
      "clients": 0
    }
  ]
}

返回结果

状态码 状态码含义 说明 数据模型
200 OK Successful Response LiveStreamResponse

数据模型

ValidationError

{
  "loc": [
    "string"
  ],
  "msg": "string",
  "type": "string"
}

ValidationError

属性

名称 类型 必选 约束 中文名 说明
loc [anyOf] true none Location none

anyOf

名称 类型 必选 约束 中文名 说明
» anonymous string false none none

or

名称 类型 必选 约束 中文名 说明
» anonymous integer false none none

continued

名称 类型 必选 约束 中文名 说明
msg string true none Message none
type string true none Error Type none

UserCreate

{
  "username": "string",
  "email": "[email protected]",
  "full_name": "string",
  "password": "string"
}

UserCreate

属性

名称 类型 必选 约束 中文名 说明
username string true none Username none
email string(email) true none Email none
full_name string true none Full Name none
password string true none Password none

User

{
  "username": "string",
  "email": "string",
  "full_name": "string",
  "permission_level": 0
}

User

属性

名称 类型 必选 约束 中文名 说明
username string true none Username none
email string false none Email none
full_name string false none Full Name none
permission_level integer true none Permission Level none

Token

{
  "access_token": "string",
  "token_type": "string"
}

Token

属性

名称 类型 必选 约束 中文名 说明
access_token string true none Access Token none
token_type string true none Token Type none

StreamVideo

{
  "codec": "string",
  "profile": "string",
  "level": "string",
  "width": 0,
  "height": 0
}

StreamVideo

属性

名称 类型 必选 约束 中文名 说明
codec string true none Codec none
profile string true none Profile none
level string true none Level none
width integer true none Width none
height integer true none Height none

StreamAudio

{
  "codec": "string",
  "sample_rate": 0,
  "channel": 0,
  "profile": "string"
}

StreamAudio

属性

名称 类型 必选 约束 中文名 说明
codec string true none Codec none
sample_rate integer true none Sample Rate none
channel integer true none Channel none
profile string true none Profile none

ResponseStream

{
  "name": "string",
  "play_url": "string",
  "kbps": {},
  "video": {
    "codec": "string",
    "profile": "string",
    "level": "string",
    "width": 0,
    "height": 0
  },
  "audio": {
    "codec": "string",
    "sample_rate": 0,
    "channel": 0,
    "profile": "string"
  },
  "clients": 0
}

ResponseStream

属性

名称 类型 必选 约束 中文名 说明
name string true none Name none
play_url string true none Play Url none
kbps object true none Kbps none
video StreamVideo true none none
audio StreamAudio true none none
clients integer true none Clients none

LiveToken

{
  "username": "string",
  "stream": "string",
  "token": "string",
  "play_token": "string",
  "permissions_level": 0
}

LiveToken

属性

名称 类型 必选 约束 中文名 说明
username string true none Username none
stream string true none Stream none
token string true none Token none
play_token string true none Play Token none
permissions_level integer true none Permissions Level none

LiveStreamResponse

{
  "code": 0,
  "streams": [
    {
      "name": "string",
      "play_url": "string",
      "kbps": {},
      "video": {
        "codec": "string",
        "profile": "string",
        "level": "string",
        "width": 0,
        "height": 0
      },
      "audio": {
        "codec": "string",
        "sample_rate": 0,
        "channel": 0,
        "profile": "string"
      },
      "clients": 0
    }
  ]
}

LiveStreamResponse

属性

名称 类型 必选 约束 中文名 说明
code integer true none Code none
streams [ResponseStream] true none Streams none

LiveStreamCallback

{
  "server_id": "string",
  "action": "string",
  "client_id": "string",
  "ip": "string",
  "vhost": "string",
  "app": "string",
  "tcUrl": "string",
  "stream": "string",
  "param": "string",
  "stream_url": "string",
  "stream_id": "string"
}

LiveStreamCallback

属性

名称 类型 必选 约束 中文名 说明
server_id string true none Server Id none
action string true none Action none
client_id string true none Client Id none
ip string true none Ip none
vhost string true none Vhost none
app string true none App none
tcUrl string true none Tcurl none
stream string true none Stream none
param string true none Param none
stream_url string true none Stream Url none
stream_id string true none Stream Id none

HTTPValidationError

{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

HTTPValidationError

属性

名称 类型 必选 约束 中文名 说明
detail [ValidationError] false none Detail none

DvrCallback

{
  "action": "string",
  "client_id": "string",
  "ip": "string",
  "vhost": "string",
  "app": "string",
  "stream": "string",
  "param": "string",
  "cwd": "string",
  "file": "string",
  "server_id": "string",
  "stream_url": "string",
  "stream_id": "string"
}

DvrCallback

属性

名称 类型 必选 约束 中文名 说明
action string true none Action none
client_id string true none Client Id none
ip string true none Ip none
vhost string true none Vhost none
app string true none App none
stream string true none Stream none
param string true none Param none
cwd string true none Cwd none
file string true none File none
server_id string true none Server Id none
stream_url string true none Stream Url none
stream_id string true none Stream Id none

Body_login_for_access_token_auth_token_post

{
  "grant_type": "string",
  "username": "string",
  "password": "string",
  "scope": "",
  "client_id": "string",
  "client_secret": "string"
}

Body_login_for_access_token_auth_token_post

属性

名称 类型 必选 约束 中文名 说明
grant_type string(string) false none Grant Type none
username string(string) true none Username none
password string(string) true none Password none
scope string(string) false none Scope none
client_id string(string) false none Client Id none
client_secret string(string) false none Client Secret none

About

自用私人直播站前端

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published