New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Get-ItemReferrer & Get-ItemReference to enable finding items linking to each other easily #196

Closed
AdamNaj opened this Issue Jun 4, 2014 · 5 comments

Comments

Projects
None yet
2 participants
@AdamNaj
Copy link
Member

AdamNaj commented Jun 4, 2014

AdamNaj added a commit that referenced this issue Jun 4, 2014

@AdamNaj

This comment has been minimized.

Copy link
Member

AdamNaj commented Jun 17, 2014

Additional changes in commit c77ecc2

@AdamNaj

This comment has been minimized.

Copy link
Member

AdamNaj commented Jun 17, 2014

Get-ItemReference - returns links to items the specified item refers to.

Get-ItemReference [[-Item] <Item>] [[-GetItems]]
Get-ItemReference [-Path <String>] [-Language <Language>] [[-GetItems]]
Get-ItemReference [-Id <String>] [-Language <Language>] [[-GetItems]]

Accepts items from pipeline for first syntax
if -GetItems parameter specified the commandlet returns items that are linked instead of ItemLinks.

Get-ItemReferrer - returns links from items that refer to the specified item.

Get-ItemReferrer [[-Item] <Item>] [[-GetItems]]
Get-ItemReferrer [-Path <String>] [-Language <Language>] [[-GetItems]]
Get-ItemReferrer [-Id <String>] [-Language <Language>] [[-GetItems]]

Accepts items from pipeline for first syntax
if -GetItems parameter specified the commandlet returns items that link to specified item instead of ItemLinks.

@AdamNaj AdamNaj closed this Jun 17, 2014

@michaellwest

This comment has been minimized.

Copy link
Member

michaellwest commented Jun 18, 2014

Just throwing out some ideas, would it make sense to make the default
behavior return the Item and then have a switch called -ItemLink (instead
of GetItems which sounds like a command).

Get-ItemReference [[-Item] <Item>] [[-ItemLink]]
Get-ItemReference [-Path <String>] [-Language <Language>] [[-ItemLink]]
Get-ItemReference [-Id <String>] [-Language <Language>] [[-ItemLink]]
Get-ItemReferrer [[-Item] <Item>] [[-ItemLink]]
Get-ItemReferrer [-Path <String>] [-Language <Language>] [[-ItemLink]]
Get-ItemReferrer [-Id <String>] [-Language <Language>] [[-ItemLink]]
@AdamNaj

This comment has been minimized.

Copy link
Member

AdamNaj commented Jun 20, 2014

Done
Current spec for the commandlet is:

Get-ItemReference - returns items the specified item refers to.

Get-ItemReference [[-Item] <Item>] [[-GetItems]]
Get-ItemReference [-Path <String>] [-Language <Language>] [[-ItemLink]]
Get-ItemReference [-Id <String>] [-Language <Language>] [[-ItemLink]]

Accepts items from pipeline for first syntax
if -ItemLink parameter specified the commandlet returns links to items rather than the items themselves

Get-ItemReferrer - returns items that refer to the specified item.

Get-ItemReferrer [[-Item] <Item>] [[-GetItems]]
Get-ItemReferrer [-Path <String>] [-Language <Language>] [[-ItemLink]]
Get-ItemReferrer [-Id <String>] [-Language <Language>] [[-ItemLink]]

Accepts items from pipeline for first syntax
if -ItemLink parameter specified the commandlet returns items that link to specified item instead of ItemLinks.

@michaellwest

This comment has been minimized.

Copy link
Member

michaellwest commented Jun 20, 2014

Excellent Work!

@AdamNaj AdamNaj added this to the 2.6.5 milestone Jun 25, 2014

@AdamNaj AdamNaj self-assigned this Jul 23, 2014

AdamNaj added a commit that referenced this issue Jul 24, 2014

Issue #196 - fixed ItemLink parameter on Get-ItemReference not being …
…exposed to PowerShell & added documentation.

AdamNaj added a commit that referenced this issue Jul 25, 2014

Issue #196 - improved parameter set definition on Get-ItemReference.
Added documentation for Get-Database commandlet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment