You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[discussion]
Maybe ap/show should live in its own service "client.Ap()" and all possible types will be added as a new function like client.Ap().ShowNote(string uri). It should have only one ShowRequest and a Show() function that returns with an ShowResponse and all other functions would just call that Show() function and typecast the Object property and return only with that property.
type ShowResponse struct {
Type string `json:"type"`
Object interface{} `json:"object"`
}
That way if someone wants to query an unimplemented resource or they want to use it as a detector "I got this URI, what is its type?", they can use Show() and use the type field to check what its Type, but if they know the resource type or they want a specific resource type like Note if it's not a Node they want an error, they can use the ShowNote() function.
Only one endpoint:
ap/show
Documentation: https://misskey.io/api-doc#operation/ap/show
The text was updated successfully, but these errors were encountered: