1
Fork 0
mirror of https://github.com/RGBCube/GitHubWrapper synced 2025-07-25 15:37:45 +00:00

Finish all user routes

This commit is contained in:
RGBCube 2022-06-28 16:05:01 +03:00
parent 5d1ce5b572
commit ba8c827bc1
3 changed files with 327 additions and 41 deletions

View file

@ -6,13 +6,28 @@ if TYPE_CHECKING:
from typing_extensions import NotRequired
class LicenseSimple(TypedDict):
key: str
name: str
url: Optional[str]
spdx_id: Optional[str]
class SimpleUser(TypedDict):
name: NotRequired[Optional[str]]
email: NotRequired[Optional[str]]
login: str
id: int
node_id: str
html_url: NotRequired[str]
avatar_url: str
gravatar_id: Optional[str]
url: str
html_url: str
followers_url: str
following_url: str
gists_url: str
starred_url: str
subscriptions_url: str
organizations_url: str
repos_url: str
events_url: str
received_events_url: str
type: str
site_admin: bool
starred_at: NotRequired[str]
GeneratedObjectResult = List[LicenseSimple]
GeneratedObject = List[SimpleUser]

View file

@ -1,58 +1,164 @@
{
"type": "array",
"items": {
"title": "License Simple",
"description": "License Simple",
"title": "Simple User",
"description": "Simple User",
"type": "object",
"properties": {
"key": {
"type": "string",
"examples": [
"mit"
]
},
"name": {
"type": [
"string",
"null"
]
},
"email": {
"type": [
"string",
"null"
]
},
"login": {
"type": "string",
"examples": [
"MIT License"
"octocat"
]
},
"url": {
"type": [
"string",
"null"
],
"format": "uri",
"id": {
"type": "integer",
"examples": [
"https://api.github.com/licenses/mit"
]
},
"spdx_id": {
"type": [
"string",
"null"
],
"examples": [
"MIT"
1
]
},
"node_id": {
"type": "string",
"examples": [
"MDc6TGljZW5zZW1pdA=="
"MDQ6VXNlcjE="
]
},
"avatar_url": {
"type": "string",
"format": "uri",
"examples": [
"https://github.com/images/error/octocat_happy.gif"
]
},
"gravatar_id": {
"type": [
"string",
"null"
],
"examples": [
"41d064eb2195891e12d0413f63227ea7"
]
},
"url": {
"type": "string",
"format": "uri",
"examples": [
"https://api.github.com/users/octocat"
]
},
"html_url": {
"type": "string",
"format": "uri"
"format": "uri",
"examples": [
"https://github.com/octocat"
]
},
"followers_url": {
"type": "string",
"format": "uri",
"examples": [
"https://api.github.com/users/octocat/followers"
]
},
"following_url": {
"type": "string",
"examples": [
"https://api.github.com/users/octocat/following{/other_user}"
]
},
"gists_url": {
"type": "string",
"examples": [
"https://api.github.com/users/octocat/gists{/gist_id}"
]
},
"starred_url": {
"type": "string",
"examples": [
"https://api.github.com/users/octocat/starred{/owner}{/repo}"
]
},
"subscriptions_url": {
"type": "string",
"format": "uri",
"examples": [
"https://api.github.com/users/octocat/subscriptions"
]
},
"organizations_url": {
"type": "string",
"format": "uri",
"examples": [
"https://api.github.com/users/octocat/orgs"
]
},
"repos_url": {
"type": "string",
"format": "uri",
"examples": [
"https://api.github.com/users/octocat/repos"
]
},
"events_url": {
"type": "string",
"examples": [
"https://api.github.com/users/octocat/events{/privacy}"
]
},
"received_events_url": {
"type": "string",
"format": "uri",
"examples": [
"https://api.github.com/users/octocat/received_events"
]
},
"type": {
"type": "string",
"examples": [
"User"
]
},
"site_admin": {
"type": "boolean"
},
"starred_at": {
"type": "string",
"examples": [
"\"2020-07-09T00:17:55Z\""
]
}
},
"required": [
"key",
"name",
"url",
"spdx_id",
"node_id"
"avatar_url",
"events_url",
"followers_url",
"following_url",
"gists_url",
"gravatar_id",
"html_url",
"id",
"node_id",
"login",
"organizations_url",
"received_events_url",
"repos_url",
"site_admin",
"starred_url",
"subscriptions_url",
"type",
"url"
]
}
}