Client for the pixeldrain API. Used by pixeldrain itself for tranferring data between the web UI and API server. And for rendering JSON responses
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
536 B

  1. package pixelapi
  2. import (
  3. "fornaxian.tech/pixeldrain_server/api/restapi/apitype"
  4. )
  5. // GetPatreonByID returns information about a patron by the ID
  6. func (p *PixelAPI) GetPatreonByID(id string) (resp apitype.Patron, err error) {
  7. return resp, p.jsonRequest("GET", "patreon/"+id, &resp)
  8. }
  9. // PostPatreonLink links a patreon subscription to the pixeldrain account which
  10. // is logged into this API client
  11. func (p *PixelAPI) PostPatreonLink(id string) (err error) {
  12. return p.jsonRequest("POST", "patreon/"+id+"/link_subscription", nil)
  13. }