Open
Description
client = GraphClient(get_client)
site = client.sites
site = site.get_by_url('https://inghamcnty.sharepoint.com/sites/EmployeeDirectory')
lists = site.lists
directory_list = lists.get_by_name("Directory") # Retrieve items from the list
# Access the items collection
items = directory_list
print(type(directory_list))
print(inspect.getfile(directory_list.__class__))
item = directory_list.add_item({
"Title": title,
"Description": description
}).execute_query()
print(f'Item has been added with id: {item.id}')
I feel like i am close but then i look at the types they are always onedrive based and never sharepoint based
from office365.onedrive.sites.site import Site
class SitesWithRoot(EntityCollection[Site]):
"""Sites container"""
these lines in onedrive/sites/sites_with_root.py show how its not using a base object for inheritance causing it to not switch.
or maybe im not understanding how to do sharepoint lists properly