Sha256: 4cd3499b1c1819ae4b66a50eb63f9b324ef19aac2394d62303461e5bdc1f2f33

Contents?: true

Size: 729 Bytes

Versions: 10

Compression:

Stored size: 729 Bytes

Contents

module MeducationSDK
  class ExternalResource < Loquor::Resource
    self.path = "/external_resources"

    def created_by
      @created_by ||= User.find(created_by_id)
    end
    
    def self.reimport_metadata(id)
      new Loquor.post("#{path}/#{id}/reimport_metadata", {})
    end

  end

  class ExternalResourceMock < ExternalResource
    extend Loquor::ResourceMock

    self.attributes = {
      id: 1,
      created_by_id: 1,
      site_name: 'FooTube',
      url: 'http://footube.example.com/foo/bar',
      title: 'Foo Bar Baz',
      description: 'The Foo Bar Baz mock external resource is a great FooTube video.',
      rating: 10,
      views_in_last_30_days: 30,
      views_in_last_60_days: 60
    }

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
meducation_sdk-2.0.2 lib/meducation_sdk/resources/external_resource.rb
meducation_sdk-2.0.1 lib/meducation_sdk/resources/external_resource.rb
meducation_sdk-2.0.0 lib/meducation_sdk/resources/external_resource.rb
meducation_sdk-1.6.16 lib/meducation_sdk/resources/external_resource.rb
meducation_sdk-1.6.15 lib/meducation_sdk/resources/external_resource.rb
meducation_sdk-1.6.14 lib/meducation_sdk/resources/external_resource.rb
meducation_sdk-1.6.13 lib/meducation_sdk/resources/external_resource.rb
meducation_sdk-1.6.12 lib/meducation_sdk/resources/external_resource.rb
meducation_sdk-1.6.11 lib/meducation_sdk/resources/external_resource.rb
meducation_sdk-1.6.10 lib/meducation_sdk/resources/external_resource.rb