|
3 | 3 | from office365.runtime.auth.authentication_context import AuthenticationContext
|
4 | 4 | from office365.runtime.auth.user_credential import UserCredential
|
5 | 5 | from office365.runtime.client_runtime_context import ClientRuntimeContext
|
| 6 | +from office365.runtime.compat import urlparse, is_absolute_url, get_absolute_url |
6 | 7 | from office365.runtime.http.http_method import HttpMethod
|
7 | 8 | from office365.runtime.http.request_options import RequestOptions
|
8 |
| -from office365.runtime.odata.v3.json_light_format import JsonLightFormat |
9 |
| -from office365.runtime.odata.v3.batch_request import ODataBatchV3Request |
10 | 9 | from office365.runtime.odata.request import ODataRequest
|
| 10 | +from office365.runtime.odata.v3.batch_request import ODataBatchV3Request |
| 11 | +from office365.runtime.odata.v3.json_light_format import JsonLightFormat |
| 12 | +from office365.runtime.paths.resource_path import ResourcePath |
11 | 13 | from office365.runtime.queries.delete_entity import DeleteEntityQuery
|
12 | 14 | from office365.runtime.queries.update_entity import UpdateEntityQuery
|
13 |
| -from office365.runtime.paths.resource_path import ResourcePath |
14 | 15 | from office365.sharepoint.portal.sites.status import SiteStatus
|
15 | 16 | from office365.sharepoint.publishing.pages.service import SitePageService
|
16 | 17 | from office365.sharepoint.request_user_context import RequestUserContext
|
17 | 18 | from office365.sharepoint.sites.site import Site
|
18 | 19 | from office365.sharepoint.tenant.administration.hubsites.collection import HubSiteCollection
|
19 | 20 | from office365.sharepoint.webs.context_web_information import ContextWebInformation
|
20 | 21 | from office365.sharepoint.webs.web import Web
|
21 |
| -from office365.runtime.compat import urlparse, is_absolute_url, get_absolute_url |
22 | 22 |
|
23 | 23 |
|
24 | 24 | class ClientContext(ClientRuntimeContext):
|
@@ -322,6 +322,11 @@ def site(self):
|
322 | 322 | self._site = Site(self)
|
323 | 323 | return self._site
|
324 | 324 |
|
| 325 | + @property |
| 326 | + def apps(self): |
| 327 | + from office365.sharepoint.apps.app_collection import AppCollection |
| 328 | + return AppCollection(self, ResourcePath("Apps")) |
| 329 | + |
325 | 330 | @property
|
326 | 331 | def me(self):
|
327 | 332 | """Gets the user context for the present request"""
|
@@ -404,6 +409,18 @@ def machine_learning(self):
|
404 | 409 | from office365.sharepoint.contentcenter.machinelearning.hub import SPMachineLearningHub
|
405 | 410 | return SPMachineLearningHub(self, ResourcePath("machinelearning"))
|
406 | 411 |
|
| 412 | + @property |
| 413 | + def org_news(self): |
| 414 | + """Alias to OrgNewsSite""" |
| 415 | + from office365.sharepoint.portal.organization_news import OrganizationNews |
| 416 | + return OrganizationNews(self, ResourcePath("OrgNews")) |
| 417 | + |
| 418 | + @property |
| 419 | + def org_news_site(self): |
| 420 | + """Alias to OrgNewsSite""" |
| 421 | + from office365.sharepoint.orgnewssite.api import OrgNewsSiteApi |
| 422 | + return OrgNewsSiteApi(self, ResourcePath("OrgNewsSite")) |
| 423 | + |
407 | 424 | @property
|
408 | 425 | def search_setting(self):
|
409 | 426 | """Alias to SearchSetting"""
|
@@ -433,6 +450,24 @@ def site_manager(self):
|
433 | 450 | from office365.sharepoint.portal.sites.manager import SPSiteManager
|
434 | 451 | return SPSiteManager(self, ResourcePath("spSiteManager"))
|
435 | 452 |
|
| 453 | + @property |
| 454 | + def home_service(self): |
| 455 | + """Alias to SharePointHomeServiceContextBuilder.""" |
| 456 | + from office365.sharepoint.portal.home.service_context_builder import SharePointHomeServiceContextBuilder |
| 457 | + return SharePointHomeServiceContextBuilder(self, ResourcePath("sphomeservice")) |
| 458 | + |
| 459 | + @property |
| 460 | + def home_site(self): |
| 461 | + """Alias to SPHSite.""" |
| 462 | + from office365.sharepoint.sites.sph_site import SPHSite |
| 463 | + return SPHSite(self, ResourcePath("SPHSite")) |
| 464 | + |
| 465 | + @property |
| 466 | + def publications(self): |
| 467 | + from office365.sharepoint.base_entity_collection import BaseEntityCollection |
| 468 | + from office365.sharepoint.contentcenter.machinelearning.publication import SPMachineLearningPublication |
| 469 | + return BaseEntityCollection(self, SPMachineLearningPublication, ResourcePath("publications")) |
| 470 | + |
436 | 471 | @property
|
437 | 472 | def social_following_manager(self):
|
438 | 473 | from office365.sharepoint.social.following.manager import SocialFollowingManager
|
@@ -462,6 +497,12 @@ def tenant_settings(self):
|
462 | 497 | from office365.sharepoint.tenant.settings import TenantSettings
|
463 | 498 | return TenantSettings.current(self)
|
464 | 499 |
|
| 500 | + @property |
| 501 | + def work_items(self): |
| 502 | + from office365.sharepoint.contentcenter.machinelearning.work_item_collection import \ |
| 503 | + SPMachineLearningWorkItemCollection |
| 504 | + return SPMachineLearningWorkItemCollection(self, ResourcePath("workitems")) |
| 505 | + |
465 | 506 | @property
|
466 | 507 | def tenant(self):
|
467 | 508 | from office365.sharepoint.tenant.administration.tenant import Tenant
|
|
0 commit comments