diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index f1bed51..0b2a2dd 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -124,5 +124,10 @@ Interested in [SharePoint User Profile REST reference](https://docs.microsoft.co ### Hub Sites -Interested in [Hub Sites REST API](https://docs.microsoft.com/en-us/sharepoint/dev/features/hub-site/hub-site-rest-api)? [Open an issue](https://github.com/microsoftgraph/msgraph-sdk-dotnet-contrib/issues/new) +The following operations allow for retrieving HubSites. + +| Operation | Request Builder | Method | Released version | +|------------------|-----------------|--------------------------|------------------| +| GetHubSites | `.Hubs` | GetAsync | 4.54.5 | + diff --git a/src/Models/Hub.cs b/src/Models/Hub.cs new file mode 100644 index 0000000..ff92e16 --- /dev/null +++ b/src/Models/Hub.cs @@ -0,0 +1,50 @@ +namespace Graph.Community +{ + public class Hub + { + /// + /// Identifies the hub site. + /// + public string Id { get; set; } + + /// + /// The display name of the hub site. + /// + public string Title { get; set; } + + /// + /// ID of the hub parent site. + /// + public string SiteId { get; set; } + + /// + /// The tenant instance ID in which the hub site is located. Use empty GUID for the default tenant instance. + /// + public string TenantInstanceId { get; set; } + + /// + /// URL of the hub parent site. + /// + public string SiteUrl { get; set; } + + /// + /// The URL of a logo to use in the hub site navigation. + /// + public string LogoUrl { get; set; } + + /// + /// A description of the hub site. + /// + public string Description { get; set; } + + /// + /// List of security groups with access to join the hub site. Null if everyone has permission. + /// + public string Targets { get; set; } + + public bool HideNameInNavigation { get; set; } + public string ParentHubSiteId { get; set; } + public bool RequiresJoinApproval { get; set; } + public string SiteDesignId { get; set; } + } +} diff --git a/src/Models/RegionalSettings.cs b/src/Models/RegionalSettings.cs index 4ef224f..5f1883c 100644 --- a/src/Models/RegionalSettings.cs +++ b/src/Models/RegionalSettings.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; -using Microsoft.Graph; - -namespace Graph.Community.Models +namespace Graph.Community.Models { public class RegionalSettings { diff --git a/src/Requests/Hubs/HubCollectionPage.cs b/src/Requests/Hubs/HubCollectionPage.cs new file mode 100644 index 0000000..28a99b8 --- /dev/null +++ b/src/Requests/Hubs/HubCollectionPage.cs @@ -0,0 +1,8 @@ +using Microsoft.Graph; + +namespace Graph.Community +{ + public class HubCollectionPage: CollectionPage, IHubCollectionPage + { + } +} diff --git a/src/Requests/Hubs/HubCollectionRequest.cs b/src/Requests/Hubs/HubCollectionRequest.cs new file mode 100644 index 0000000..ff4f2b6 --- /dev/null +++ b/src/Requests/Hubs/HubCollectionRequest.cs @@ -0,0 +1,38 @@ +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Graph; + +namespace Graph.Community +{ + public class HubCollectionRequest : BaseSharePointAPIRequest, IHubCollectionRequest + { + public HubCollectionRequest( + string requestUrl, + IBaseClient client, + IEnumerable