Module: PublishingPlatformApi
- Defined in:
- lib/publishing_platform_api.rb,
lib/publishing_platform_api/railtie.rb,
lib/publishing_platform_api/version.rb,
lib/publishing_platform_api/response.rb,
lib/publishing_platform_api/exceptions.rb,
lib/publishing_platform_api/json_client.rb,
lib/publishing_platform_api/list_response.rb,
lib/publishing_platform_api/publishing_platform_headers.rb,
lib/publishing_platform_api/middleware/publishing_platform_header_sniffer.rb
Defined Under Namespace
Modules: ExceptionHandling Classes: Base, BaseError, EndpointNotFound, HTTPBadGateway, HTTPBadRequest, HTTPClientError, HTTPConflict, HTTPErrorResponse, HTTPForbidden, HTTPGatewayTimeout, HTTPGone, HTTPIntermittentClientError, HTTPIntermittentServerError, HTTPInternalServerError, HTTPNotFound, HTTPPayloadTooLarge, HTTPServerError, HTTPTooManyRequests, HTTPUnauthorized, HTTPUnavailable, HTTPUnprocessableEntity, InvalidUrl, JsonClient, ListResponse, PublishingApi, PublishingPlatformHeaderSniffer, PublishingPlatformHeaders, Railtie, Response, SocketErrorException, TimedOutException
Constant Summary collapse
- VERSION =
"0.3.0"
Class Method Summary collapse
-
.publishing_api(options = {}) ⇒ PublishingPlatformApi::PublishingApi
Creates a PublishingPlatformApi::PublishingApi adapter.
Class Method Details
.publishing_api(options = {}) ⇒ PublishingPlatformApi::PublishingApi
Creates a PublishingPlatformApi::PublishingApi adapter
This will set a bearer token if a PUBLISHING_API_BEARER_TOKEN environment variable is set
14 15 16 17 18 19 |
# File 'lib/publishing_platform_api.rb', line 14 def self.publishing_api( = {}) PublishingPlatformApi::PublishingApi.new( PublishingPlatformLocation.find("publishing-api"), { bearer_token: ENV["PUBLISHING_API_BEARER_TOKEN"] }.merge(), ) end |