Class EndpointWrapper

java.lang.Object
com.patreonshout.patreon.endpoints.EndpointWrapper

@Component
public class EndpointWrapper
extends java.lang.Object
Helps connect to the Patreon OAuth endpoint
  • Field Summary

    Fields
    Modifier and Type Field Description
    private static java.lang.String baseUrl
    url to the Patreon OAuth endpoint
  • Constructor Summary

    Constructors
    Constructor Description
    EndpointWrapper()  
  • Method Summary

    Modifier and Type Method Description
    static User fetchUser​(java.lang.String accessToken)
    Sends a Patreon OAuth request

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • baseUrl

      private static java.lang.String baseUrl
      url to the Patreon OAuth endpoint
  • Constructor Details

    • EndpointWrapper

      public EndpointWrapper()
  • Method Details

    • fetchUser

      public static User fetchUser​(java.lang.String accessToken) throws java.io.IOException
      Sends a Patreon OAuth request
      Parameters:
      accessToken - is the content creator access token
      Returns:
      the json output from the OAuth request
      Throws:
      java.io.IOException - when the Patreon OAuth request doesn't go as planned