kopia lustrzana https://github.com/reiver/greatape
304 wiersze
6.0 KiB
YAML
304 wiersze
6.0 KiB
YAML
basePath: /
|
|
definitions:
|
|
Auth:
|
|
properties:
|
|
token:
|
|
type: string
|
|
type: object
|
|
LoginRequest:
|
|
properties:
|
|
email:
|
|
type: string
|
|
password:
|
|
type: string
|
|
required:
|
|
- email
|
|
- password
|
|
type: object
|
|
LoginResponse:
|
|
properties:
|
|
auth:
|
|
$ref: '#/definitions/Auth'
|
|
user:
|
|
$ref: '#/definitions/User'
|
|
type: object
|
|
SignupRequest:
|
|
properties:
|
|
email:
|
|
type: string
|
|
password:
|
|
type: string
|
|
username:
|
|
type: string
|
|
required:
|
|
- email
|
|
- password
|
|
- username
|
|
type: object
|
|
SignupResponse:
|
|
properties:
|
|
code:
|
|
type: string
|
|
type: object
|
|
User:
|
|
properties:
|
|
actor:
|
|
type: string
|
|
api_key:
|
|
type: string
|
|
avatar:
|
|
type: string
|
|
banner:
|
|
type: string
|
|
bio:
|
|
type: string
|
|
display_name:
|
|
type: string
|
|
email:
|
|
type: string
|
|
github:
|
|
type: string
|
|
id:
|
|
type: integer
|
|
private_profile:
|
|
type: boolean
|
|
public_key:
|
|
type: string
|
|
username:
|
|
type: string
|
|
webfinger:
|
|
type: string
|
|
type: object
|
|
VerifyRequest:
|
|
properties:
|
|
code:
|
|
type: string
|
|
email:
|
|
type: string
|
|
required:
|
|
- code
|
|
- email
|
|
type: object
|
|
VerifyResponse:
|
|
properties:
|
|
auth:
|
|
$ref: '#/definitions/Auth'
|
|
user:
|
|
$ref: '#/definitions/User'
|
|
type: object
|
|
info:
|
|
contact: {}
|
|
description: |-
|
|
GreatApe is a free audio and video social-media platform that can be used via an app.
|
|
It is a Fediverse technology that supports federation via ActivityPub.
|
|
title: GreatApe API
|
|
version: "1.0"
|
|
paths:
|
|
/.well-known/webfinger:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
parameters:
|
|
- default: acct:user@domain.com
|
|
description: Resource
|
|
in: query
|
|
name: resource
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
additionalProperties: true
|
|
type: object
|
|
tags:
|
|
- WebFinger
|
|
/api/v1/feed/types:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
items:
|
|
type: string
|
|
type: array
|
|
type: array
|
|
tags:
|
|
- Feed
|
|
/api/v1/login:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
parameters:
|
|
- description: Payload
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/LoginRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/LoginResponse'
|
|
tags:
|
|
- Authentication
|
|
/api/v1/profile:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/User'
|
|
security:
|
|
- JWT: []
|
|
tags:
|
|
- User
|
|
/api/v1/signup:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
parameters:
|
|
- description: Payload
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/SignupRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/SignupResponse'
|
|
tags:
|
|
- Authentication
|
|
/api/v1/users/{username}/feed/{type}:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
parameters:
|
|
- description: Username
|
|
in: path
|
|
name: username
|
|
required: true
|
|
type: string
|
|
- description: Type
|
|
in: path
|
|
name: type
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
additionalProperties: true
|
|
type: object
|
|
security:
|
|
- JWT: []
|
|
tags:
|
|
- Feed
|
|
/api/v1/verify:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
parameters:
|
|
- description: Payload
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/VerifyRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/VerifyResponse'
|
|
tags:
|
|
- Authentication
|
|
/u/{username}:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
parameters:
|
|
- description: Username
|
|
in: path
|
|
name: username
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
additionalProperties: true
|
|
type: object
|
|
tags:
|
|
- ActivityPub
|
|
/u/{username}/followers:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
parameters:
|
|
- description: Username
|
|
in: path
|
|
name: username
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
additionalProperties: true
|
|
type: object
|
|
tags:
|
|
- ActivityPub
|
|
/u/{username}/following:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
parameters:
|
|
- description: Username
|
|
in: path
|
|
name: username
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
additionalProperties: true
|
|
type: object
|
|
tags:
|
|
- ActivityPub
|
|
securityDefinitions:
|
|
JWT:
|
|
description: 'Example: Bearer {Your JWT Token}'
|
|
in: header
|
|
name: Authorization
|
|
type: apiKey
|
|
swagger: "2.0"
|