This include resolution strategy is in place in order to avoid having infinite circular recursion on resources with circular dependencies. Tree is allowed to resolved before falling back to Link objects). (this is independent of API-level includes - it represents the maximum depth the include resolution Maximum amount of levels to resolve includes for library entities It is set to a default of 60 seconds in order to avoid blocking processes for too long, as rate limit retry behaviour Keep in mind that if you hit the hourly rate limit maximum, you can have up to 60 minutes of blocked requests. Maximum time to wait for next available request (in seconds). Which contains the amount of seconds until the next non rate limited request is available, has passed. Using 0 will disable retry behaviour.Įach retry will be attempted after the value (in seconds) of the X-Contentful-RateLimit-Reset header, To increase or decrease the retry attempts after a 429 Rate Limit error. If enabled, API responses are not parsed and the raw response object is returned instead.Īllows for overriding default resource classes with custom ones.Īllows for overriding of specific entry classes by content type. Sets the authentication mechanisms, valid options are :header or :query_stringĭetermines whether errors are raised or returned.ĭetermines whether EmptyFieldError is raised when empty fields are requested on an entry or nil is returned.ĭetermines if content type caching is enabled automatically or not,Īllowing for accessing of fields even when they are not present on the response. Set the host used to build the request URIs.ĭefines whether to use HTTPS or HTTP. The client constructor supports several options you may set to achieve the expected behavior:Ĭlient = Contentful:: Client. To help you get the most out of this library, we've prepared all available client configuration options, reference documentation, tutorials and other examples that will help you learn and understand how to use this library. Done.įor more information, check the Contentful REST API reference on Authentication. Open the API Keys section and create your first token. Go to the app, open the space that you want to access (top left corner lists all the spaces), and navigate to the APIs area. You can create API keys using the Contentful web interface. To get your own content from Contentful, an app should authenticate with an OAuth bearer token. Please note, that all methods of the Ruby client library are snake_cased, instead of JavaScript's camelCase: Authentication very similar as described in theĭelivery API Documentation. new ( space: 'cfexampleapi', access_token: 'b4c0n73n7fu1', api_url: '' ) Require 'contentful' client = Contentful:: Client. In order to get started with the Contentful Ruby library you'll need not only to install it, but also to get credentials which will allow you to have access to your content in Contentful.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |