Class: Sharepoint::ViewFieldCollection

Inherits:
Object show all
Includes:
Type
Defined in:
lib/sharepoint-lists.rb

Instance Attribute Summary

Attributes inherited from Object

#parent

Attributes inherited from ObjectProperties

#data, #site, #updated_data

Instance Method Summary collapse

Methods included from Type

#initialize

Methods inherited from Object

#copy, #destroy, #guid, #initialize, #reload, #save

Methods inherited from ObjectProperties

#add_properties, #add_property, #available_properties, #initialize

Instance Method Details

#add_view_field(name) ⇒ Object



216
217
218
# File 'lib/sharepoint-lists.rb', line 216

def add_view_field name
  @site.query :post, "#{['uri']}/addviewfield('#{URI.encode name}')"
end

#move_view_field_to(name, index) ⇒ Object



220
221
222
223
224
225
# File 'lib/sharepoint-lists.rb', line 220

def move_view_field_to name, index
  @site.query :post, "#{['uri']}/moveviewfieldto", {
    field: name,
    index: index
  }.to_json
end

#remove_all_view_fieldsObject



227
228
229
# File 'lib/sharepoint-lists.rb', line 227

def remove_all_view_fields
  @site.query :post, "#{['uri']}/removeallviewfields"
end

#remove_view_field(name) ⇒ Object



231
232
233
# File 'lib/sharepoint-lists.rb', line 231

def remove_view_field name
  @site.query :post, "#{['uri']}/removeviewfield('#{URI.encode name}')"
end