1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

feat: implement wakatime projects endpoint (resolve #196)

This commit is contained in:
Ferdinand Mütsch
2021-05-01 13:52:03 +02:00
parent 0fbb554fc3
commit cf3d293688
15 changed files with 770 additions and 402 deletions

View File

@ -160,6 +160,48 @@ var doc = `{
}
}
},
"/compat/wakatime/v1/users/{user}/projects": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Mimics https://wakatime.com/developers#projects",
"produces": [
"application/json"
],
"tags": [
"wakatime"
],
"summary": "Retrieve and fitler the user's projects",
"operationId": "get-wakatime-projects",
"parameters": [
{
"type": "string",
"description": "User ID to fetch data for (or 'current')",
"name": "user",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Query to filter projects by",
"name": "q",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/v1.ProjectsViewModel"
}
}
}
}
},
"/compat/wakatime/v1/users/{user}/stats/{range}": {
"get": {
"security": [
@ -574,6 +616,31 @@ var doc = `{
}
}
},
"v1.Project": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"repository": {
"type": "string"
}
}
},
"v1.ProjectsViewModel": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/v1.Project"
}
}
}
},
"v1.StatsData": {
"type": "object",
"properties": {