2022-09-29 16:53:43 +00:00
{
"swagger" : "2.0" ,
"info" : {
2022-09-30 08:13:59 +00:00
"description" : "GreatApe is a free audio and video social-media platform that can be used via an app.\nIt is a Fediverse technology that supports federation via ActivityPub." ,
2022-09-29 16:53:43 +00:00
"title" : "GreatApe API" ,
"contact" : { } ,
"version" : "1.0"
} ,
"basePath" : "/" ,
"paths" : {
2022-09-30 06:58:58 +00:00
"/.well-known/webfinger" : {
"get" : {
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"WebFinger"
] ,
"parameters" : [
{
"type" : "string" ,
"default" : "acct:user@domain.com" ,
"description" : "Resource" ,
"name" : "resource" ,
"in" : "query" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
}
}
}
} ,
2022-10-10 09:03:35 +00:00
"/api/v1/feed/types" : {
"get" : {
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"Feed"
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"type" : "array" ,
"items" : {
"type" : "string"
}
}
}
}
}
} ,
2022-09-29 16:53:43 +00:00
"/api/v1/login" : {
"post" : {
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"Authentication"
] ,
"parameters" : [
{
"description" : "Payload" ,
"name" : "payload" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2022-09-30 08:13:59 +00:00
"$ref" : "#/definitions/LoginRequest"
2022-09-29 16:53:43 +00:00
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2022-09-30 08:13:59 +00:00
"$ref" : "#/definitions/LoginResponse"
2022-09-29 16:53:43 +00:00
}
}
}
}
} ,
2022-09-30 06:58:58 +00:00
"/api/v1/profile" : {
"get" : {
2022-09-30 08:13:59 +00:00
"security" : [
{
"JWT" : [ ]
}
] ,
2022-09-30 06:58:58 +00:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"User"
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2022-09-30 08:13:59 +00:00
"$ref" : "#/definitions/User"
2022-09-30 06:58:58 +00:00
}
}
}
}
} ,
2022-09-29 16:53:43 +00:00
"/api/v1/signup" : {
"post" : {
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"Authentication"
] ,
"parameters" : [
{
"description" : "Payload" ,
"name" : "payload" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2022-09-30 08:13:59 +00:00
"$ref" : "#/definitions/SignupRequest"
2022-09-29 16:53:43 +00:00
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2022-09-30 08:13:59 +00:00
"$ref" : "#/definitions/SignupResponse"
2022-09-29 16:53:43 +00:00
}
}
}
}
} ,
2022-10-10 09:03:35 +00:00
"/api/v1/users/{username}/feed" : {
"get" : {
"security" : [
{
"JWT" : [ ]
}
] ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"Feed"
] ,
"parameters" : [
{
"type" : "string" ,
"description" : "Username" ,
"name" : "username" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
}
}
}
} ,
2022-09-29 16:53:43 +00:00
"/api/v1/verify" : {
"post" : {
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"Authentication"
] ,
"parameters" : [
{
"description" : "Payload" ,
"name" : "payload" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2022-09-30 08:13:59 +00:00
"$ref" : "#/definitions/VerifyRequest"
2022-09-29 16:53:43 +00:00
}
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
2022-09-30 08:13:59 +00:00
"$ref" : "#/definitions/VerifyResponse"
2022-09-29 16:53:43 +00:00
}
}
}
}
2022-09-30 06:58:58 +00:00
} ,
"/u/{username}" : {
"get" : {
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"ActivityPub"
] ,
"parameters" : [
{
"type" : "string" ,
"description" : "Username" ,
"name" : "username" ,
"in" : "path" ,
2022-09-30 19:39:50 +00:00
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
}
}
}
} ,
"/u/{username}/followers" : {
"get" : {
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"ActivityPub"
] ,
"parameters" : [
{
"type" : "string" ,
"description" : "Username" ,
"name" : "username" ,
"in" : "path" ,
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
}
}
}
} ,
"/u/{username}/following" : {
"get" : {
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
"tags" : [
"ActivityPub"
] ,
"parameters" : [
{
"type" : "string" ,
"description" : "Username" ,
"name" : "username" ,
"in" : "path" ,
2022-09-30 06:58:58 +00:00
"required" : true
}
] ,
"responses" : {
"200" : {
"description" : "OK" ,
"schema" : {
"type" : "object" ,
"additionalProperties" : true
}
}
}
}
2022-09-29 16:53:43 +00:00
}
} ,
"definitions" : {
2022-09-30 08:13:59 +00:00
"Auth" : {
2022-09-29 16:53:43 +00:00
"type" : "object" ,
"properties" : {
"token" : {
"type" : "string"
}
}
} ,
2022-09-30 08:13:59 +00:00
"LoginRequest" : {
2022-09-29 16:53:43 +00:00
"type" : "object" ,
"required" : [
"email" ,
"password"
] ,
"properties" : {
"email" : {
"type" : "string"
} ,
"password" : {
"type" : "string"
}
}
} ,
2022-09-30 08:13:59 +00:00
"LoginResponse" : {
2022-09-29 16:53:43 +00:00
"type" : "object" ,
"properties" : {
"auth" : {
2022-09-30 08:13:59 +00:00
"$ref" : "#/definitions/Auth"
2022-09-29 16:53:43 +00:00
} ,
"user" : {
2022-09-30 08:13:59 +00:00
"$ref" : "#/definitions/User"
2022-09-29 16:53:43 +00:00
}
}
} ,
2022-09-30 08:13:59 +00:00
"SignupRequest" : {
2022-09-29 16:53:43 +00:00
"type" : "object" ,
"required" : [
"email" ,
"password" ,
"username"
] ,
"properties" : {
"email" : {
"type" : "string"
} ,
"password" : {
"type" : "string"
} ,
"username" : {
"type" : "string"
}
}
} ,
2022-09-30 08:13:59 +00:00
"SignupResponse" : {
2022-09-29 16:53:43 +00:00
"type" : "object" ,
"properties" : {
"code" : {
"type" : "string"
}
}
} ,
2022-09-30 08:13:59 +00:00
"User" : {
2022-09-29 16:53:43 +00:00
"type" : "object" ,
"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"
} ,
2022-09-30 06:58:58 +00:00
"public_key" : {
2022-09-29 16:53:43 +00:00
"type" : "string"
} ,
"username" : {
"type" : "string"
} ,
"webfinger" : {
"type" : "string"
}
}
} ,
2022-09-30 08:13:59 +00:00
"VerifyRequest" : {
2022-09-29 16:53:43 +00:00
"type" : "object" ,
"required" : [
"code" ,
"email"
] ,
"properties" : {
"code" : {
"type" : "string"
} ,
"email" : {
"type" : "string"
}
}
} ,
2022-09-30 08:13:59 +00:00
"VerifyResponse" : {
2022-09-29 16:53:43 +00:00
"type" : "object" ,
"properties" : {
"auth" : {
2022-09-30 08:13:59 +00:00
"$ref" : "#/definitions/Auth"
2022-09-29 16:53:43 +00:00
} ,
"user" : {
2022-09-30 08:13:59 +00:00
"$ref" : "#/definitions/User"
2022-09-29 16:53:43 +00:00
}
}
}
2022-09-30 08:13:59 +00:00
} ,
"securityDefinitions" : {
"JWT" : {
"description" : "Example: Bearer {Your JWT Token}" ,
"type" : "apiKey" ,
"name" : "Authorization" ,
"in" : "header"
}
2022-09-29 16:53:43 +00:00
}
}