Class: RestfulSharePoint::List
- Inherits:
-
Object
- Object
- CommonBase
- Object
- RestfulSharePoint::List
- Defined in:
- lib/restful-sharepoint/objects/list.rb
Constant Summary
Constants inherited from Object
Instance Attribute Summary
Attributes inherited from Object
#connection, #options, #properties
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Object
#==, #[], #each, #eql?, #fetch_deferred, #initialize, #to_h, #to_json
Constructor Details
This class inherits a constructor from RestfulSharePoint::Object
Class Method Details
.from_title(title, connection) ⇒ Object
4 5 6 7 8 |
# File 'lib/restful-sharepoint/objects/list.rb', line 4 def self.from_title(title, connection) new(connection: connection).tap do |list| list.define_singleton_method(:endpoint) { "/_api/web/lists/getbytitle('#{Addressable::URI.encode title}')" } end end |
Instance Method Details
#endpoint ⇒ Object
10 11 12 |
# File 'lib/restful-sharepoint/objects/list.rb', line 10 def endpoint "/_api/web/lists(guid'#{@id}')" end |