Skip to content
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

New command: Create a single part app page #874

Closed
waldekmastykarz opened this issue Mar 13, 2019 · 12 comments
Closed

New command: Create a single part app page #874

waldekmastykarz opened this issue Mar 13, 2019 · 12 comments

Comments

@waldekmastykarz
Copy link
Member

waldekmastykarz commented Mar 13, 2019

Creates a single-part app page

spo apppage add -u|--webUrl <webUrl> -t|--title <title> -d|--webPartData <webPartData> --addToQuickLaunch

  • webUrl: The URL of the site where the page should be created
  • title: The title of the page to create
  • webPartData: JSON string of the web part to put on the page
  • addToQuickLaunch: Set, to add the page to the quick launch

Request:

POST {{siteUrl}}/_api/sitepages/Pages/CreateFullPageApp
Accept: application/json;odata=nometadata
Content-Type: application/json;odata=nometadata

{
    "webPartDataAsJson": "{\"id\":\"e6599e48-c875-4c0e-8b1f-abe2f54c1132\",\"instanceId\":\"9c6edb6e-199a-4a30-a3b6-73466a68187b\",\"title\":\"Full App Page testing wp\",\"description\":\"HelloWorld description\",\"dataVersion\":\"1.0\",\"properties\":{\"description\":\"HelloWorld\"}}",
    "title": "My-app",
    "addToQuickLaunch": true
}

Source: https://spblog.net/post/2019/03/05/what-s-new-and-what-s-changed-in-sharepoint-online-rest-api-in-january-february-2019

@siata13
Copy link

siata13 commented Mar 15, 2019

Hey Waldek, I would like to pick it.

@waldekmastykarz
Copy link
Member Author

All yours! 💪

@waldekmastykarz
Copy link
Member Author

Are you still working on it @siata13?

@waldekmastykarz
Copy link
Member Author

Setting as free to pick up due to lack of response

@rabwill
Copy link
Contributor

rabwill commented Jun 10, 2019

Hey @waldekmastykarz assign this to me please if not already taken. Thanks

@waldekmastykarz
Copy link
Member Author

All yours @rabwill! Thank you!

@rabwill
Copy link
Contributor

rabwill commented Jun 17, 2019

Hey @waldekmastykarz there is a strange issue after pulling down the latest beta code base to add a command to it, I clone the branch , fetch upstream to keep upto-date , I ran npm run build and npm link but it keeps complaining Invalid Command.
Not sure what is different or if I am missing a step. It builds fine and even the test is 100% for this command. I can see the files generated in the dist folder.
I am away from home so I have my work laptop (windows10) instead of the mac , this is the only diff I can think off.

@waldekmastykarz
Copy link
Member Author

Recently, we've updated the project dependencies. Could that be the culprit?

Could you please try:

  • npm run clean
  • remove node_modules
  • npm i
  • npm run build
  • npm link

Please let me know if this helps. If it doesn't, we'll keep looking further until we find what's not working.

@rabwill
Copy link
Contributor

rabwill commented Jun 17, 2019

Recently, we've updated the project dependencies. Could that be the culprit?

Could you please try:

  • npm run clean
  • remove node_modules
  • npm i
  • npm run build
  • npm link

Please let me know if this helps. If it doesn't, we'll keep looking further until we find what's not working.

Hey there,

Tried it , even clone a fresh repos

here is how things look
image

image

Here are my new files

image

Package.json
image

Do you see anything out of the ordinary ?
Thanks for looking into this

@waldekmastykarz
Copy link
Member Author

Screenshots look all fine. Do you have your changes in a branch somewhere where I could have a look at them?

@rabwill
Copy link
Contributor

rabwill commented Jun 18, 2019

Screenshots look all fine. Do you have your changes in a branch somewhere where I could have a look at them?
I have pushed the branch to my remote just now.
https://github.com/rabwill/office365-cli/tree/issue-apppage-874/src/o365/spo/commands/apppage
Thank you.

@rabwill
Copy link
Contributor

rabwill commented Jun 21, 2019

Hey @waldekmastykarz, you can leave this for now, i will be able to pick it up today in my mac.

VelinGeorgiev pushed a commit to VelinGeorgiev/office365-cli that referenced this issue Jun 28, 2019
@waldekmastykarz waldekmastykarz added this to the v2.0 milestone Jun 30, 2019
VelinGeorgiev pushed a commit to VelinGeorgiev/office365-cli that referenced this issue Jul 26, 2019
VelinGeorgiev pushed a commit to VelinGeorgiev/office365-cli that referenced this issue Aug 15, 2019
VelinGeorgiev pushed a commit to VelinGeorgiev/office365-cli that referenced this issue Aug 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants