Interface ReceiverImpl

All Known Implementing Classes:
ReceiverSvc

@RequestMapping("/receivers")
public interface ReceiverImpl
  • Method Summary

    Modifier and Type Method Description
    java.lang.String PatreonOAuth​(java.lang.String code, java.lang.String state)
    Is called by Patreon in order to give us information for linking a user's account via OAuth
    org.springframework.http.ResponseEntity<?> PatreonWebhook​(java.lang.String patreonSignature, java.lang.String patreonEvent, java.lang.String userAgent, WebhookRequest webhookRequest, long webaccountId)
    Receives post information from Patreon after a post is either published, updated, or deleted, initiates cross posting
    java.lang.String TwitterOAuth​(java.lang.String code, java.lang.String state)
    Is called by Twitter in order to give us information for linking a user's account via OAuth
  • Method Details

    • PatreonOAuth

      @GetMapping("/patreon/oauth") java.lang.String PatreonOAuth​(@RequestParam(required=false,name="code") java.lang.String code, @RequestParam(required=false,name="state") java.lang.String state) throws java.io.IOException, PSException
      Is called by Patreon in order to give us information for linking a user's account via OAuth
      Parameters:
      code - is used to fetch access tokens for the session that just signed in with Patreon
      state - is transparently appended from the state param provided in PatreonShout Client from Dev Portal
      Returns:
      a json body telling the user that their Patreon was successfully OAuth'd
      Throws:
      java.io.IOException - when we cannot parse the input
      PSException - when there is an internal error with Patreon Shout
    • TwitterOAuth

      @GetMapping("twitter/oauth") java.lang.String TwitterOAuth​(@RequestParam(required=false,name="code") java.lang.String code, @RequestParam(required=false,name="state") java.lang.String state) throws org.json.simple.parser.ParseException, PSException
      Is called by Twitter in order to give us information for linking a user's account via OAuth
      Parameters:
      code - is used to fetch access tokens for the session that just signed in with Patreon
      state - is transparently appended from the state param provided in PatreonShout Client from Dev Portal
      Returns:
      a json body telling the user that their Twitter was successfully OAuth'd
      Throws:
      org.json.simple.parser.ParseException
      PSException
    • PatreonWebhook

      @PostMapping("/patreon/webhook/{webaccountId}") org.springframework.http.ResponseEntity<?> PatreonWebhook​(@RequestHeader("x-patreon-signature") java.lang.String patreonSignature, @RequestHeader("x-patreon-event") java.lang.String patreonEvent, @RequestHeader("User-Agent") java.lang.String userAgent, @RequestBody WebhookRequest webhookRequest, @PathVariable long webaccountId) throws PSException
      Receives post information from Patreon after a post is either published, updated, or deleted, initiates cross posting
      Parameters:
      patreonSignature - is the HEX digest of the message body HMAC signed (with MD5) using your webhook's secret
      patreonEvent - is the event happening for the trigger request
      userAgent - is the user agent of the Patreon request
      webhookRequest - is the webhook request from Patreon
      webaccountId - is the user's web account id for the request
      Returns:
      HttpStatus.OK if successful
      Throws:
      PSException