Cli-microsoft365: Add 'spo list view get' command capability

Created on 28 Dec 2018  路  9Comments  路  Source: pnp/cli-microsoft365

Summary

Add a support for spo list view get command in order to :

  • [ ] Get informations about specific SharePoint view
  • [ ] Here the list of necessary parameters :

    • [ ] --listId / --listTitle (ID or Title not both)

    • [ ] --viewId / --viewTitle (ID or Title not both)

    • [ ] -u, --webUrl Web URL

  • [ ] Support at least the following additional parameters :

    • [ ] -o, --output

    • [ ] --verbose

    • [ ] --debug

To Do

  • [ ] Add command from solution
  • [ ] Add documentation of usage (MkDocs)
  • [ ] Validate cmdlet usage
  • [ ] Validate Unit test)
good first issue new feature work in progress

Most helpful comment

@VelinGeorgiev good suggestion and I agree with @Laul0 that we should aim for consistency. So I'd be up for introducing all three options here, and then we could have separate issues for extending each relevant command with support for list URL.

All 9 comments

Thanks for the suggestion @Laul0. In the CLI we use a naming convention, where get is reserved for retrieving a single instance of an object. If you want to get multiple objects, then you should list list as a verb instead. See others specs, like https://github.com/pnp/office365-cli/issues/268 (spo list item list) and https://github.com/pnp/office365-cli/issues/269 (spo list item get)

Hi, sorry I didn't take notice on that 馃檹
In accordance with this guidance, that is not confusing if the command for retrieve multiple list view look like spo list view list ?

If you think that's ok, no problem 馃槈 I'll update this issue

No problem. It's your first time here, so happy to show you around 馃檪

Yes, to list the available views, having a command named spo list view list would be matching the existing naming convention. Let's create a separate issue for it so that we can track it.

Hey @waldekmastykarz, feel free to assign that to me.

Perfect! All yours @VelinGeorgiev!

@Laul0, @waldekmastykarz, how about getting the list by url as well? It seems that the pnp powershell does it https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/get-pnpview?view=sharepoint-ps.

In that case we will have to add additional option so:
--listId / --listTitle / --listUrl (One of the following options is enough)

With PnP Powershell you can get list by URL or ID only. With CLI you can get list by ID or Title.

I think it is more revenant to use internal name or url (without talk about ID) because that not change. But, because several cmdlet of CLI use title/id, all cmdlets should be update to keep coherent no ?

@VelinGeorgiev good suggestion and I agree with @Laul0 that we should aim for consistency. So I'd be up for introducing all three options here, and then we could have separate issues for extending each relevant command with support for list URL.

Ok, I will implement it with the three options. Then we replicate.

Was this page helpful?
0 / 5 - 0 ratings