usersGetContextForUser
Get contextual information for a user
Details
- Method:
GET - Path:
/users/{username}/hovercard - Operation ID:
users/get-context-for-user
Parameters
{
"username": {
"description": "The handle for the GitHub user account.",
"required": true,
"location": "path",
"type": "string"
},
"subject_type": {
"description": "Identifies which additional information you'd like to receive about the person's hovercard. Can be `organization`, `repository`, `issue`, `pull_request`. **Required** when using `subject_id`.",
"required": false,
"location": "query",
"type": "string",
"enum": [
"organization",
"repository",
"issue",
"pull_request"
]
},
"subject_id": {
"description": "Uses the ID for the `subject_type` you specified. **Required** when using `subject_type`.",
"required": false,
"location": "query",
"type": "string"
}
}Response Schema
{
"title": "Hovercard",
"description": "Hovercard",
"type": "object",
"properties": {
"contexts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"octicon": {
"type": "string"
}
},
"required": [
"message",
"octicon"
]
}
}
},
"required": [
"contexts"
]
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('github')
# Call this tool
result = await agent.call_tool('usersGetContextForUser', {
# Add required parameters here
})