Skip to content

Instantly share code, notes, and snippets.

@Gesugao-san
Last active May 5, 2024 21:28
Show Gist options
  • Save Gesugao-san/6f743eae9dd10057e0c0f7acad6c6d45 to your computer and use it in GitHub Desktop.
Save Gesugao-san/6f743eae9dd10057e0c0f7acad6c6d45 to your computer and use it in GitHub Desktop.
Swagger UI OpenAPI for http://byond.com. How to use: copy content of this file, and insert in https://editor.swagger.io. For working preview use https://mybrowseraddon.com/access-control-allow-origin.html!
openapi: 3.0.0
info:
version: "1.0"
title: BYOND API
description: "Website offer a free API that provides some info for a players and about players, hubs and worlds."
termsOfService: https://www.byond.com/TOS
contact:
name: SS13HUB Team
url: http://discord.gg/HMwbBZyEum
license:
name: MIT
servers:
- url: https://www.byond.com/
description: Official website
tags:
- name: hub
description: Game and apps Hubs.
externalDocs:
description: Find out more
url: http://swagger.io
- name: rsc
description: BYOND platform resources.
- name: games
description: BYOND platform games.
paths:
/HubPorts:
get:
tags:
- hub
summary: "Public function. Get hub ports to connect to."
description: "For: hub.byond.com:port. The official client requests this information only once a day."
parameters:
- name: time
in: query
description: Time of request in Unix Timestamp. Parameter without (!) name.
schema:
type: integer
format: int64
responses:
'200':
description: OK
/Feed:
get:
tags:
- hub
summary: "Requires authentication. Get news feed. "
description: "Gives js-file, that injects into local pager file."
parameters:
- name: spid
in: query
description: Stands for "Session Process ID" or something like that. Updating when user relogging in.
required: true
schema:
type: string
- name: time
in: query
description: Time of request in Unix Timestamp.
required: true
schema:
type: integer
format: int64
responses:
'200':
description: OK
/PagerHome:
get:
tags:
- hub
summary: "Requires authentication. Get Pager home page script."
description: "Get home page jQuery-script for injecting in Pager."
parameters:
- name: time
in: query
description: Time of request in Unix Timestamp.
required: true
schema:
type: integer
format: int64
- name: version
in: query
description: Version of official BYOND launcher.
required: true
schema:
type: string
responses:
'200':
description: OK
/rsc/hubcache.js:
get:
tags:
- rsc
summary: "Public function. Get info about game hubs and other apps."
parameters:
- name: time
in: query
description: Time of request in Unix Timestamp. Parameter without (!) name.
schema:
type: integer
format: int64
responses:
'200':
description: OK
/games/{member}/:
get:
tags:
- games
summary: "Public function. Get info about all member creations."
parameters:
- name: member
in: path
description: Member name to return creations to.
required: true
schema:
type: string
responses:
'200':
description: OK
'404':
description: 'Redirects to "https://www.byond.com/forum/" with text "User {member} not found."'
/games/{member}/{game}:
get:
tags:
- games
summary: "Public function. Get info about member creation, as normal html page."
parameters:
- name: member
in: path
description: Member name to return creation to.
required: true
schema:
type: string
- name: game
in: path
description: Member creation to return creation to.
required: true
schema:
type: string
responses:
'200':
description: OK
'404':
description: '«Not Found; The page you have requested could not be found. Please check the url again, or search to find what you are looking for.»'
/games/{member}/{game}/:
get:
tags:
- games
summary: "Public function. Get info about member creation, in DM-TEXT format (with worlds)."
parameters:
- name: member
in: path
description: Member name to return creation to.
required: true
schema:
type: string
- name: game
in: path
description: Member creation to return creation to.
required: true
schema:
type: string
- name: format
in: query
description: Type of format. "text" is only seems avaliable. "json" is not avaliable, for it use next.
required: true
value: "text"
schema:
type: string
responses:
'200':
description: OK
'404':
description: '«general\n\ttype = "none"»'
/games/{member}/{game}/{format}:
get:
tags:
- games
summary: "Public function. Get info about member creation, in JSON format (without worlds)."
parameters:
- name: member
in: path
description: Member name to return creation to.
required: true
schema:
type: string
- name: game
in: path
description: Member creation to return creation to.
required: true
schema:
type: string
- name: format
in: path
description: Type of format. "json" is only seems avaliable. "text" is not avaliable, for it use previous.
required: true
value: json
schema:
type: string
responses:
'200':
description: OK
'404':
description: '«general\n\ttype = "none"»'
components:
schemas:
HubPorts:
type: object
properties:
timestamp:
type: integer
format: int64
example: 1662720096
xml:
name: order
BYOND_Versions:
type: object
properties:
version:
type: string
example: 514.1584
xml:
name: order
member:
type: object
properties:
member:
type: string
example: Exadv1
xml:
name: order
externalDocs:
description: Documentation
url: https://gist.github.com/Gesugao-san/6f743eae9dd10057e0c0f7acad6c6d45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment