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



158
159
160
# File 'lib/sharepoint-lists.rb', line 158

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

#move_view_field_to(name, index) ⇒ Object



162
163
164
165
166
167
# File 'lib/sharepoint-lists.rb', line 162

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

#remove_all_view_fieldsObject



169
170
171
# File 'lib/sharepoint-lists.rb', line 169

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

#remove_view_field(name) ⇒ Object



173
174
175
# File 'lib/sharepoint-lists.rb', line 173

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