Sha256: 86915bcdc539ed80b5d34491756da6cbbea6c7eed16d7cb9ec6d53908a72594c

Contents?: true

Size: 1.41 KB

Versions: 3

Compression:

Stored size: 1.41 KB

Contents

require 'rubygems'
require 'bundler/setup'

require "openactive/dataset_site"

feed_types = [
  OpenActive::DatasetSite::FeedType::FACILITY_USE,
  OpenActive::DatasetSite::FeedType::SCHEDULED_SESSION,
  OpenActive::DatasetSite::FeedType::SESSION_SERIES,
  OpenActive::DatasetSite::FeedType::SLOT,
]

settings = OpenActive::DatasetSite::Settings.new(
  open_data_feed_base_url: "http://example.com/feed/",
  dataset_site_url: "http://example.com/dataset/",
  dataset_discussion_url: "https://github.com/simpleweb/sw-oa-php-test-site",
  dataset_documentation_url: "https://developer.openactive.io/",
  dataset_languages: ["en-GB"],
  organisation_name: "Simpleweb",
  organisation_url: "https://www.simpleweb.co.uk/",
  organisation_legal_entity: "Simpleweb Ltd",
  organisation_plain_text_description: "Simpleweb is a purpose driven software company that specialises in new "\
                                       "technologies, product development, and human interaction.",
  organisation_logo_url: "https://simpleweb.co.uk/wp-content/uploads/2015/07/facebook-default.png",
  organisation_email: "spam@simpleweb.co.uk",
  background_image_url: "https://simpleweb.co.uk/wp-content/uploads/2017/06/IMG_8994-500x500-c-default.jpg",
  date_first_published: "2019-11-05", # remember, remember the fifth of November...
  data_feed_types: feed_types,
)

renderer = OpenActive::DatasetSite::TemplateRenderer.new(settings)

puts renderer.render

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
openactive-dataset_site-0.2.0 examples/basic_example.rb
openactive-dataset_site-0.1.1 examples/basic_example.rb
openactive-dataset_site-0.1.0 examples/example.rb