hub.js
hub.js copied to clipboard
Fetch content owner's full name as part of `getContent`
Getting an owner's full name requires an async request to the API to fetch the user object. Currently this work is being pushed into client applications. We should make it part of getContent so that they don't have to worry about it.
We can add an ownerFullName property to IContent that contains the owner's full name.
I wonder if we need more than just the fullName. I know that @ajturner has talked about having owner be the user:
https://github.com/Esri/hub.js/pull/271/files#diff-4b9c55dbc42166a101bfc837cf8c396c86ef25d3b5ea84da12561004d0ebb2ceR55
We could have owner: string | IHubMember w/o it being a breaking change I think.
Early on I had advocated that IHubContent extend IItem, and since up until now we've been making that work might want to play it safe and introduce a new property like publisher: IHubMember
For now in the Hub app we've added a ownerUser: IUser property to content and we are currently fetching it for all types.
@tomwayson would now be a good time to push this into Hub.js?
Sure. I guess we could.