Module: Rooftop

Defined in:
lib/rooftop/hook_calls.rb,
lib/rooftop.rb,
lib/rooftop/base.rb,
lib/rooftop/page.rb,
lib/rooftop/post.rb,
lib/rooftop/client.rb,
lib/rooftop/nested.rb,
lib/rooftop/headers.rb,
lib/rooftop/version.rb,
lib/rooftop/coercions.rb,
lib/rooftop/models/menu.rb,
lib/rooftop/field_aliases.rb,
lib/rooftop/models/author.rb,
lib/rooftop/models/taxonomy.rb,
lib/rooftop/queries/queries.rb,
lib/rooftop/models/menu_item.rb,
lib/rooftop/models/media_item.rb,
lib/rooftop/resource_links/link.rb,
lib/rooftop/content_fields/field.rb,
lib/rooftop/models/taxonomy_term.rb,
lib/rooftop/errors/record_not_found.rb,
lib/rooftop/coercions/author_coercion.rb,
lib/rooftop/coercions/parent_coercion.rb,
lib/rooftop/content_fields/collection.rb,
lib/rooftop/resource_links/collection.rb,
lib/rooftop/content_fields/content_fields.rb,
lib/rooftop/resource_links/resource_links.rb

Overview

Coerce any field called ‘parent’ which returns an ID into an actual object

Defined Under Namespace

Modules: Base, Client, Coercions, Content, FieldAliases, HookCalls, Nested, Page, Post, Queries, ResourceLinks Classes: Author, Configuration, Headers, MediaItem, Menu, MenuItem, RecordNotFound, Taxonomy, TaxonomyTerm

Constant Summary collapse

DEFAULT_API_NAMESPACE =
"wp"
DEFAULT_API_VERSION =
2
VERSION =
"0.0.3"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject

access the configuration class as Rooftop.configuration



16
17
18
# File 'lib/rooftop.rb', line 16

def configuration
  @configuration
end

.use_preview_apiObject

accessor to set the preview API for use instead of the production one



13
14
15
# File 'lib/rooftop.rb', line 13

def use_preview_api
  @use_preview_api
end

Class Method Details

.configure {|configuration| ... } ⇒ Object

block for configuration.

Yields:



19
20
21
22
23
# File 'lib/rooftop.rb', line 19

def configure
  self.configuration ||= Configuration.new
  yield(configuration)
  self.configuration.configure_connection
end